Hi all, this is the
first time I mail to this list and my english is not very good. I hope somebody
here can help because I'm trapped!! Anyway here is my
problem:
I have a network
scheme you can view here (it's important to understund the problem):
http://www.elviswireless.sytes.net/varios/network.jpg
The server has a
squid proxy server running on 3128 port. It's a transparent proxy redirecting
port 80 to 3128. But the problem come when a pc with 10.34.x.x ip wants to view
a web page from one of the 172.16.x.x ip based pcs and equal when a pc with
172.16.x.x ip wants to view a web page from one of the 10.34.x.x ip based
pcs.
I want that all pcs
can access to internet through the proxy and that all pcs can view web pages
from the other side of the server.
First I put
this:
iptables -t nat -A PREROUTING -p tcp -d ! 172.16.0.0/16
--dport 80 -j REDIRECT --to-port 3128
Ok with this, the 10.34.x.x pcs can access to internet through
the proxy and can view the web pages of the 172.16.x.x pcs ... It
works!!!
Then I put this:
iptables -t nat -A PREROUTING
-p tcp -d ! 10.34.0.0/16 --dport 80 -j REDIRECT --to-port
3128
With this, the 172.16.x.x pcs can access to
internet through the proxy and can view the web pages of the 10.34.x.x pcs ...
It works too!!!
This commands works separately, but when I put the two
at same time it doesn't work.
Can anybody help me
please????
Thanks in
advance.
Elvis