hi
some body help me
I have squid 2.6 stablbe
os centos 5.3
kernel 2.6.18
iptables 1.3.5
my computer is connected to internet through eth1 it also contains eth0 for external use but I have not connected any machine to it. I want to make it a transparent proxy server but it is not working on localhost.
when i configure squid.conf with changes like this
http_port 3128 transparent
and iptable rules as:
[root@localhost sysconfig]# /sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
[root@localhost sysconfig]# /sbin/iptables -A INPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -i eth1 -p tcp --dport 3128
[root@localhost sysconfig]# /sbin/iptables -A OUTPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -o eth0 -p tcp --dport 80
[root@localhost sysconfig]# /sbin/iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -i eth0 -p tcp --sport 80
[root@localhost sysconfig]# /sbin/iptables -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -o eth1 -p tcp --sport 80
I also enabled ip port forwarding
[root@localhost sysconfig]# /sbin/sysctl -p /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 1
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
when done with all these settings I am not able to run squid as transparent when I give manual proxy configurations through browser settings it works but does not work as transparent. squid starts and stops normally in either cases. I have tried almost every method discussed on web but have not managed to get it working. Hope some genius will come up with a great solution.

Reply With Quote