Configuring tranparent proxy with squid and iptables
Hi
I want to configure transparent proxy using squid and iptables on Redhat 9.0. Currently I am using Redhat 7.3 (squid and iphains). I have configured router to route www requets to proxy server (ip policy route-map ). I edit file /etc/sysconfig/ipchains to configure it. My configuration for ipchains is: # Firewall configuration written by lokkit # Manual customization of this file is not recommended. # Note: ifup-post will punch the current nameservers through the # firewall; such entries will *not* be listed here. :input ACCEPT :output ACCEPT :forward ACCEPT -A input -p tcp -s 0/0 -d 0/0 80 -j REDIRECT 8080 -A input -p tcp -s 0/0 -d x.x.x.x/y.y.y.y 80 -j ACCEPT (x.x.x.x is the network in which our servers are i.e, proxy, ras, router etc and y.y.y.y is its subet). Can anyone help me in configuring iptables in similar way for transparent proxy. Thanks |
|
Thanks dear
but the problem is that i have only one eth interface "eth0". should i use PREROUTING and POSTROUTING on that signle interface. i mean is it possible or i have to add another interface. if i add an interface i must use another ip and i am already running out of ips. i havn't got anyother live ip. should i use: sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 /sbin/iptables -t nat -A POSTROUTING -s x.x.x.x/y.y.y.y -o eth0 -j MASQUERADE eth0 is it possible. Thanks again. |
I have'nt tried with a single NIC.But logically it should be possible.Try it out!!!!!!!!!!
|
Thanks dear
my problem solved. iwas trying to configure iptables for last one year. thanks a lot. a little prob is that when i restart iptables config is lost. i tried command iptables-save but it hadn't worked. how to solve this problem? THANKS AGAIN |
All times are GMT -5. The time now is 07:13 PM. |