What's new

Question about squid or iptables (redirect)

rogern

Occasional Visitor
I wonder if it is possible to install squid as i have an rt-ac3200 wich i think is strong enough to use squid/privoxy, i know it is only 256MB ram so i then wonder how to redirect 80/443 to a raspberrypi.

Maybe there is a better solution as i have on the raspberrypi a solution to filter https traffic.
iptables is not my thing though so i need some guidence if that`s gonna be the solution i go for.
 
Last edited:
How can you convert this so it works with my asus and firewall-start.sh ?

Code:
# Create an exception for the squid server:
iptables -t nat -A PREROUTING -p tcp -s 192.168.1.1 --dport 80 -j ACCEPT
# Redirect all other LAN requests:
iptables -t nat -A PREROUTING -p tcp -s 192.168.1.0/24 --dport 80 -j DNAT --to 192.168.1.1:8080
# Create an exception for root:
iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner root --dport 80 -j ACCEPT
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner squid --dport 80 -j REDIRECT --to-port 8080
iptables -I OUTPUT -o eth1 -p tcp -s 127.0.0.1 -d 127.0.0.1 --dport 8080 -j ACCEPT
 
Remove .sh
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top