IP Tables and Transparent Proxy
Hi. I am a linux n00b and am having some problems configuring a transparent proxy. I have setup a linux router that has 2 network cards and is also running a proxy server.
Clients on eth1 are on a 10.0.0.0 network and assigned IPs dynamically. I added the following rules to IP tables.
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
iptables –A FORWARD –i eth1 –j ACCEPT
I was able to surf the web from clients on eth1 after I added those rules.
I configured the proxy to listen on 10.0.0.1:8118. I can configure the browser to use the proxy successfully.
Next I wanted to configure the proxy to work transparently. I tried adding the following rule to IP Tables:
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to--port 8118
I configure the client broswers to use no proxy. When I try to go to any website, I get a blank page...so I don't think my iptable rules are correct. If anyone can help me, it would be GREATLY appreciated.
|