Is it possible to use squid in same ip subnet with WAN IP? Iptables Squid port problem.
I have squid machines they all have 2 nics and
Modem --> eth0(192.168.1.0/24) Squid eth1(192.168.2.0/24) --> LocalSwitch
But recently, Programmers requested from me that I have to use the same ip subnet for two nics.
Ex:
Modem(192.168.1.2)------->eth0(192.168.1.3)Squid eth1(192.168.1.20)------->LocalSwitch
Before this request my iptables rules:
#!/bin/bash
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.10:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-port 3128
But this is not working anymore and
I have trouble writing new iptables script.
How can I do that?
Can you help me on this?
Thanks in advance.
Last edited by neopandid; 03-14-2013 at 03:44 AM.
|