This is a discussion on iptables -> DNAT & SNAT within the Linux Security forums, part of the System Security and Security Related category; hello i want to redirect everything going to the internet to be redirected transparently to squid sitting on 10.0....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hello
i want to redirect everything going to the internet to be redirected transparently to squid sitting on 10.0.0.10:3128. 10.0.210.200 is my firewall. both are in the same subnet (255.255.0.0). Now i have setup the following rules: Chain PREROUTING (policy ACCEPT 143 packets, 27617 bytes) pkts bytes target prot opt in out source destination 17 1020 DNAT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcp dpt:80 to:10.0.0.10:3128 0 0 DNAT udp -- * * 0.0.0.0/0 !127.0.0.1 udp dpt:80 to:10.0.0.10:3128 Chain POSTROUTING (policy ACCEPT 2 packets, 138 bytes) pkts bytes target prot opt in out source destination 0 0 SNAT tcp -- * * 0.0.0.0/0 10.0.0.10 tcp dpt:3128 to:10.0.210.200 0 0 SNAT udp -- * * 0.0.0.0/0 10.0.0.10 udp dpt:3128 to:10.0.210.200 Chain OUTPUT (policy ACCEPT 2 packets, 138 bytes) pkts bytes target prot opt in out source destination i know that i have will have problems with routing the proxy back through the firewall, but i will ignore that for now. what makes me a real headache is that in the POSTROUTING chain no rule matches the packets to SNAT the addresses. does anyone have any clue/tip/hint/idea !? thanks in advance ! |