If I got the output correctly the rule has hits:
root@OpenWrt:~# iptables-save -c | grep Squid
[5:782] -A zone_lan_prerouting ! -s 192.168.1.180/32 ! -d 192.168.1.180/32 -p tcp -m tcp --dport 80 -m comment --comment "!fw3: Allow-transparent-Squid" -j DNAT --to-destination 192.168.1.180:3128
Everytime I try to do the curl on the test instance the values increase.
The tcpdump has also some output, but I'm not able to fully understand this. 192.168.1.50 is my test host.
If I understand this correctly the first lines are incoming packets from 192.168.1.50.40178 to 216.58.206.3.80. Then those packets are going out to 192.168.1.180.3128
But it seems there are no packets coming back from 192.168.1.180.3128?
root@OpenWrt:~# tcpdump -i any -vne -c 100 tcp port 80 or tcp port 3128
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes
13:52:48.129172 In f4:6d:04:79:52:6d ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 39180, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xd268 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370902730 ecr 0,nop,wscale 7], length 0
13:52:48.129172 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39180, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xd268 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370902730 ecr 0,nop,wscale 7], length 0
13:52:48.129172 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39180, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xd268 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370902730 ecr 0,nop,wscale 7], length 0
13:52:48.129447 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39180, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0xaa62 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370902730 ecr 0,nop,wscale 7], length 0
13:52:48.129465 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39180, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0xaa62 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370902730 ecr 0,nop,wscale 7], length 0
13:52:48.129475 Out fc:ec:da:7b:49:ec ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 63, id 39180, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0xaa62 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370902730 ecr 0,nop,wscale 7], length 0
13:52:49.160513 In f4:6d:04:79:52:6d ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 39181, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xce61 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370903761 ecr 0,nop,wscale 7], length 0
13:52:49.160513 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39181, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xce61 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370903761 ecr 0,nop,wscale 7], length 0
13:52:49.160513 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39181, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xce61 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370903761 ecr 0,nop,wscale 7], length 0
13:52:49.160812 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39181, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0xa65b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370903761 ecr 0,nop,wscale 7], length 0
13:52:49.160832 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39181, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0xa65b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370903761 ecr 0,nop,wscale 7], length 0
13:52:49.160844 Out fc:ec:da:7b:49:ec ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 63, id 39181, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0xa65b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370903761 ecr 0,nop,wscale 7], length 0
13:52:51.240494 In f4:6d:04:79:52:6d ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 39182, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xc641 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370905841 ecr 0,nop,wscale 7], length 0
13:52:51.240494 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39182, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xc641 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370905841 ecr 0,nop,wscale 7], length 0
13:52:51.240494 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39182, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xc641 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370905841 ecr 0,nop,wscale 7], length 0
13:52:51.240599 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39182, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0x9e3b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370905841 ecr 0,nop,wscale 7], length 0
13:52:51.240616 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39182, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0x9e3b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370905841 ecr 0,nop,wscale 7], length 0
13:52:51.240626 Out fc:ec:da:7b:49:ec ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 63, id 39182, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0x9e3b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370905841 ecr 0,nop,wscale 7], length 0
13:52:55.320492 In f4:6d:04:79:52:6d ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 39183, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xb651 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370909921 ecr 0,nop,wscale 7], length 0
13:52:55.320492 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39183, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xb651 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370909921 ecr 0,nop,wscale 7], length 0
13:52:55.320492 In f4:6d:04:79:52:6d ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 39183, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 216.58.206.3.80: Flags [S], cksum 0xb651 (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370909921 ecr 0,nop,wscale 7], length 0
13:52:55.320620 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39183, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0x8e4b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370909921 ecr 0,nop,wscale 7], length 0
13:52:55.320640 Out fc:ec:da:7b:49:ec ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 63, id 39183, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0x8e4b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370909921 ecr 0,nop,wscale 7], length 0
13:52:55.320651 Out fc:ec:da:7b:49:ec ethertype 802.1Q (0x8100), length 80: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 63, id 39183, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.50.40178 > 192.168.1.180.3128: Flags [S], cksum 0x8e4b (correct), seq 3978785822, win 29200, options [mss 1460,sackOK,TS val 370909921 ecr 0,nop,wscale 7], length 0