Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got Squid3 running on my MyBookLive (Debian Squeeze). I succesfully installed Squid3 but it stops serving http requests after some time, https does still work. If I check the access.log I see something like this multiple times:

1395679077.078   5250 TCP_MISS/000 0 GET - DIRECT/ -
1395679077.080   5250 TCP_MISS/000 0 GET - DIRECT/ -
1395679077.083   5250 TCP_MISS/000 0 GET - DIRECT/ -
1395679077.083   5247 TCP_MISS/000 0 GET - DIRECT/ -
1395679077.084   5245 TCP_MISS/000 0 GET - DIRECT/ -
1395679077.085   5243 TCP_MISS/000 0 GET - DIRECT/ -

And if I just keep refreshing, nothing gets added to the log so it makes me believe that Squid3 is not receiving anything.

Furthermore, I am using the default Squid3 config with the following edits:

http_port 3128 transparent
acl localnet src
http_access allow localnet
http_access allow localhost

Here is the complete config file in a paste:



2014/03/24 17:37:56| NetfilterInterception:  NF getsockopt(SO_ORIGINAL_DST) failed on FD 1912: (92) Protocol not available
2014/03/24 17:37:56| WARNING: Forwarding loop detected for:
GET /space HTTP/1.1
Via: 1.0 server01 (squid/3.1.6), 1.1 server01 (squid/3.1.6), 1.1 server01 (squid/3.1.6), 1.1 server01 (squid/3.1.6), 1.1 server01 (squid/3.1.6), 1.1 server01 (sq$
X-Forwarded-For:,,,,,,,,,,,,,, 10.0$
Cache-Control: max-age=259200
Connection: keep-alive

iptables in my dd-wrt router:

LAN_IP=`nvram get lan_ipaddr`
LAN_NET=$LAN_IP/`nvram get lan_netmask`

iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT
iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP
iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT
share|improve this question
looks like you have a forwarding loop on , see – LinuxDevOps Mar 24 '14 at 17:27
@LinuxDevOps I don't quite understand how, I only have one cache and that's on I also have the visible_hostname directive set in the conf. – NullBy7e Mar 24 '14 at 17:30
The log files are very telling about the loop. It may come from the iptables rules which are confusing with just one interface br0; you may want to create a new (alias/dummy) interface to distinguish incoming from outgoing traffic. To debug the current iptables rules and traffic flow you can use tcpdump or iptables' LOG facility. – LinuxDevOps Mar 24 '14 at 17:55
@LinuxDevOps I wouldn't know where to start honestly, before, when I had Squid3 on my HP Thin Client running Ubuntu 10.04, it worked good and without forwarding loops. – NullBy7e Mar 24 '14 at 18:04
@LinuxDevOps Ah I see where your going, I got the iptables code from dd-wrt forums and it was confirmed to be working by a poster there. So how can this be changed then? Gosh I wish I knew iptables more..I am just not much of a sysadmin lol. – NullBy7e Mar 24 '14 at 18:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.