Hot answers tagged

14

Netcat is not a specialized HTTP client. Connecting through a proxy server for Netcat thus means creating a TCP connection through the server, which is why it expects a SOCKS or HTTPS proxy with the -x argument, specified by -X: -X proxy_protocol Requests that nc should use the specified protocol when talking to the proxy server. ...


8

1) Squid is a special proxy for http and https traffic. As it knows this protocol it can offer some advanced features like caching, filtering, rewrite rules, dns resolving. All web browsers know how to handle http proxies as it's part of that protocol spec. Additionally Squid can act as a transparent proxy where you don't configure your web browser to use ...


8

Both Perl and Python (and probably Ruby as well) have simple kits that you can use to quickly build simple HTTP proxies. In Perl, use HTTP::Proxy. Here's the 3-line example from the documentation. Add filters to filter, log or rewrite requests or responses; see the documentation for examples. use HTTP::Proxy; my $proxy = HTTP::Proxy->new( port => ...


7

Sorry, I think I've found the answer myself: http://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError. (quote begin) Illegal Instruction errors on Squid 3.4 Synopsis Squid 3.4 and later, running on certain paravirtualized systems and even some claiming full virtualization (at least KVM, Xen, and Xen derivatives are confirmed so far) ...


6

This may not be the best solution, but if you use any proxy then it will have a specific host:port so the netcat solution with still work, albeit you'll have to pick apart the proxy meta-data to make sense of it. The easiest way to do this might be to use any random anonymization proxy out there and just channel all the traffic through netcat. (I.e., set ...


6

Your allow google\..* is matching every URL with google. in it. The allow is matched first so access is allowed. Your rule will also be allowing any requests with google. anywhere in the URL, like http://example.com/google.asp Additionally, Google tries to do most requests via SSL so a deny via url_regex plays no part in these requests (There is no URL in ...


6

You are right, even with minimal installation, the current FreeBSD requires a minimum of 600 MB, especially if you go for a amd64 release. There is still some options left: Using an "old" 7.x or 8.x (i386) release I tried to install an "old" 7.3 (i386) with everything to minimal and it took 270 MB. Assuming your machine is old enough, you will not care ...


6

For having a local deb cache to server my Debian server farm, I actually prefer to use apt-cacher-ng (caching proxy server for software repositories) It is a proxy specially APT/deb aware, quite customisable and can cache your deb files for quite a while (configurable). You install it with: apt-get install apt-cacher-ng And by default it caches ...


5

Use the ASCII Punycode version of the domain name instead: xn--helfende-hnde-kfb.de


5

The usual solution for this problem is to use rotate the logfiles so that the current logfile only contains current entries, rather than removing outdated entries from the file. This is all handled by the logrotate program. The following configuration should do approximately what you want. It will keep the last 6 months of log entries from /var/squid/logs/...


5

By default the second column represents the time in milliseconds the request took: The native format for Squid The format is: time elapsed remotehost code/status bytes method URL rfc931 peerstatus/peerhost type See also http://wiki.squid-cache.org/Features/LogFormat for more details about the logformat.


4

You need to specify that the rule should go into the nat table, additionally DNAT commands need to go the PREROUTING chain and you need to be careful that you do not generate a loop. iptables -t nat -I PREROUTING -i br-lan -s ! 192.168.1.196 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.196:3128 The default table is the filter table. Do not forget,...


4

One method would be to make use of this directive in the squid.conf file to get the log file to show FQDNs instead of the IPs: log_fqdn on Source: http://www.squid-cache.org/Doc/config/log_fqdn/ But this will omit the <IP> <Name> format that you're showing in your question. For that if you look at the documentation for the logformat directive ...


4

I will try my best to address several questions, as you are talking about different subjects, and the broadness and entangling of the themes involved is more complex than it appears to be at the surface. We can easily identify a couple of problems: Slow peak time traffic: I will try to address several points here. About your setup, your biggest problem is ...


3

You can't make everything transparent with Squid. Only HTTP can be transparent and HTTPS with a non recommended hack. For FTP, you need a pure FTP proxy like Frox. Anyway, it doesn't make any sense to use proxies if you want to make everything transparent, use NAT. HTTP could be useful only because the cache.


3

Take a look at socat: http://www.dest-unreach.org/socat/doc/README


3

Depending on which browser you are using, using a proxy auto-config file might work best. Most modern browsers will support this. Something like this should be a good start: function FindProxyForURL(url, host) { isp = "PROXY ip_address:port; DIRECT"; tor = "SOCKS 127.0.0.1:9050"; if (shExpMatch(host,"*.onion")) { return tor; } ...


3

Thanks to sr_, I used driftnet: sudo driftnet -i eth0 -a -d ./browserPic


3

From here. me@host:~$ date -d @1286536351.746 Fri Oct 8 11:12:31 UTC 2010


3

To transparently intercept traffic use policy based routing via NAT to redirect the web traffic to the squid proxy, then intercept it. Set policy routing on your GW or NAT box, adjust the ip's and interfaces to suit. Your diagram implies the first rule to allow your squid box access to the internet might not be needed. iptables -t mangle -A PREROUTING -j ...


3

Here you can find fine-tuned squid.conf for rpm caching: https://github.com/spacewalkproject/spacewalk/blob/master/proxy/installer/squid.conf You just should modify memory and port setting.


3

OK, I got it now. After a few check on the FreeBSD forum, I can now confirm that FreeBSD jails act a bit like some Swiss cheese as long as SHM objects are concerned. Indeed, FreeBSD does not provide any isolation at all for SHM objects: all jails can access all SHM objects, system-wide, with no way to prevent it. The error mentioned in this question is ...


3

Unless you're using a transparent proxy, the behaviour you're seeing is normal: clients connect to the proxy to retrieve content, so you see packets from the clients to the proxy and back; the proxy connects to the target servers on behalf of the clients, so you see packets from the proxy to the target servers and back. At the IP level, there is no way of ...


3

In squid v3.5 the hierarchy_stoplist and client_db configuration directives are obsolete. Commented them out, restarted the service and squid started working properly. From squid mailing list As part of the Squid configuration cleanup project hierarchy_stoplist has appeared as a directive which is almost but not quite obsolete. Points against it: ...


3

You don't tell a browser to “use Squid” as a proxy, you tell it to use whatever proxy is running on a certain host and port. Many web browsers, including w3m, can take proxy settings from the environment. Set the variable http_proxy, e.g. export http_proxy=http://localhost:3128/ Put this line in that account's ~/.profile, or put the line http_proxy=http://...


3

You seem to have used sport instead of dport and vice versa in the firewall rules. It should be: iptables -A INPUT -p tcp -s "$my_pc_ip" --dport 3128 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -p tcp -d "$my_pc_ip" --sport 3128 -m state --state ESTABLISHED -j ACCEPT Since the rules are on your proxy server, in INPUT chain the packets ...


2

Many, but not all, programs honor the environment variables http_proxy, https_proxy, ftp_proxy, and no_proxy. You could add them to your ~/.bashrc . export http_proxy="http://username:password@yourproxy:port" export https_proxy="http://username:password@yourproxy:port" export ftp_proxy="http://username:password@yourproxy:port" export no_proxy="localhost,127....


2

Create a file /etc/squid/white.acl Put the following data there: finam.ru/analysis/.* finam.ru/.*\.js finam.ru/.*\.css Put this code into squid.conf. You have to put the whitelist before the blacklist: acl good_url url_regex "/etc/squid/white.acl" http_access allow good_url acl bad_url url_regex "/etc/squid/block.acl" http_access deny bad_url


2

You don't need --uid-owner in PREROUTING, you need it in OUTPUT (like in your example).


2

Here you can look at the Squid configuration directives on this page maintained by the Squid project. This page shows the different directives and which versions of squid they're available in. The page is titled: Squid configuration directives.   


Only top voted, non community-wiki answers of a minimum length are eligible