Page 1 of 1
Bit of a pickle with squid and iptables
Posted: Wed Mar 28, 2018 11:48 pm
by mrpink57
Code: Select all
#router
iptables -t mangle -A PREROUTING -p tcp --dport 80 -s 192.168.2.136 -j ACCEPT
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 3
ip rule add fwmark 3 table 2
ip route add default via 192.168.2.136 dev br-lan table 2
Code: Select all
#rpi
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
These are the iptable rules I use to re-route traffic to my squid proxy RPI, now I want to use iptables to have certain devices like a nvidia shield, a wii u and a couple rokus not pass through the proxy. What I have been told to use is:
Code: Select all
#bypass devices
iptables -t nat -A PREROUTING -d [IP ADDRESS] -j ACCEPT
I have tried this piece on both my router and raspberry pi I have also tried it with the -I prefix and the traffic is still routed, I have looked all over the interwebs but I cannot find any other information telling me how to stop a re-route of this traffic or if I can put the IPs in squid.conf to have them not cached (I think this would miss the point, I want it to never hit my proxy).
For an illustartion I give you
modem <--> router <--> squid proxy
My squid proxy is attached to one of the lan ports on my router.
Re: Bit of a pickle with squid and iptables
Posted: Tue Apr 03, 2018 2:53 pm
by ispyisail
This kind of question in my opinion is more suited in the openwrt forum.
Gargoyle is more about the GUI