Bit of a pickle with squid and iptables

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
mrpink57
Posts: 37
Joined: Sun Mar 19, 2017 6:42 pm
Location: a van down the river

Bit of a pickle with squid and iptables

Post 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.

ispyisail
Moderator
Posts: 5185
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Bit of a pickle with squid and iptables

Post by ispyisail »

This kind of question in my opinion is more suited in the openwrt forum.

Gargoyle is more about the GUI

Post Reply