[squid-users] Squid as gateway

Yuri yvoinov at gmail.com
Tue Jul 11 14:11:21 UTC 2017


Feel free to take a look inside wiki:

http://wiki.squid-cache.org/SquidFaq/InterceptionProxy

http://wiki.squid-cache.org/ConfigExamples/Intercept


11.07.2017 19:35, erdosain9 пишет:
> 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.
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20170711/af0bc77b/attachment.sig>


More information about the squid-users mailing list