#StackBounty: #debian #iptables #firewall #proxy #squid How can I redirect internet traffic from local to proxy server with ip tables (…

Bounty: 150

So i made topology as shown in figure.


Router have 3 interfaces like this:

eth0 to internet side (with ip gateway

eth1 to server-PC side (with ip

eth2 to Client side (with ip

Server and client connected and get internet from router-pc. Server-pc uses a static ip (, while the client gets an automatic ip from DHCP on router-pc

And i want to configure iptables on my Router-PC to redirect client’s internet to Proxy server on my Server-PC. So client must using credential to access internet (i already configure authentication proxy on my squid and already configure proxy manually on client side).

The firewall i’ve running is:

iptables -t nat -A PREROUTING -p tcp -s -j DNAT –to is my Server’s ip address. So, can you help me to fix the configuration I have done, in order to according to what I want?

Sorry for my bad english. Thanks.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.