[squid-users] Squid as gateway

erdosain9 erdosain9 at gmail.com
Tue Jul 11 13:35:01 UTC 2017


Hi, and thanks.
Maybe i dont explain well.
I just want this:

 WanRouter-------Squid---------switch------PC

I want to declare in "PC" IP, MASK, AND GATEWAY, instead of the WanRouter, i
want that PC have for gateway the ip of the Squid.

I do this by now.

sudo iptables -A PREROUTING -t nat -s 192.168.1.0/24 -p tcp --dport 80 -j
REDIRECT --to-port 3128

[root at squid ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:3128
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            state
RELATED,ESTABLISHED
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            state NEW tcp
dpt:22
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with
icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with
icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         


 iptables -t nat --line-numbers -L
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination         
1    REDIRECT   tcp  --  192.168.1.0/24       anywhere             tcp
dpt:http redir ports 3128


And in squid.conf 
i have
http 192.168.1.35:3128 intercept

But... this is not working... so
Can anyone give me a hand?

Thanks to all.

 



--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-as-gateway-tp4683022p4683053.html
Sent from the Squid - Users mailing list archive at Nabble.com.


More information about the squid-users mailing list