Date: Sun, 21 Sep 2014 14:56:08 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 193813] New: www/squid TP_PF does not work, especially inside jail Message-ID: <bug-193813-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193813 Bug ID: 193813 Summary: www/squid TP_PF does not work, especially inside jail Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: osho@pcc-software.org I installed www/squid with TP_PF (transparent proxy on packet filter) in jail of my FreeBSD router machine. When I tried to connect to a certain external web server, it showed a log like followings in access.log, and my browser got access denied error: | 2014/09/20 21:34:06 kid1| WARNING: Forwarding loop detected for: | GET / HTTP/1.1 | Host: www.example.com | Accept: application/json, text/javascript, */*; q=0.01 | User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36 | X-Chrome-UMA-Enabled: 1 | Accept-Encoding: gzip,deflate,sdch | Accept-Language: ja,en-US;q=0.8,en;q=0.6 | Via: 1.1 example.example.org (squid/3.4.8) | X-Forwarded-For: 172.16.0.1 | Cache-Control: max-age=0 | Connection: keep-alive What is your env? FreeBSD 10.0-STABLE r268457 How to repeat? My "router" FreeBSD machine has two network cards, one is for internal network, and the other is for external network. The steps is like followings: 1. Install www/squid in jail from ports. Don't forget to set TP_PF (Transparent proxy with packet filter). 2. configure squid.conf to listen on 8080 with intercept option. | http_port 8080 intercept 3. configure pf.conf to redirect connection on internal network interface from internal network to external network port 80 to the squid like: | rdr pass on $int_if inet proto tcp from $internal_net to ! <int_and_dmz> port http -> $squid port 8080 Then, you will see the same issue written above. As far as I checked with sockstat command, squid seems to tried to connect to its port 8080. I did not investigate why it tried to connect that port, though. Workaround? Workaround 1: do not use transparent proxy. If I connect to squid not as transparent proxy, i.e. set each browser HTTP proxy host and port, it works. However, it is very annoying. Workaround 2: use www/squid33 instead of www/squid. If I use www/squid33, I did not see the issue. However, it will be removed in next January. | DEPRECATED= Reached EOL on 28 August 2014, use www/squid (v3.4) instead | EXPIRATION_DATE=2015-01-31 When I roughly compared www/squid33 and www/squid, I noticed that www/squid do not use /dev/pf. According to work/squid-3.4.8/src/ip/Intercept.cc, it seems that USE_NAT_DEVPF should be defined to use /dev/pf on www/squid. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-193813-13>