|
Hi there,
I have a question with SNAT, and ask for your kind
help.
When I initiate a session, for example telnet, the
SNAT will take effect and change the source address of outgoing telnet
packets.
However, when the other user initiates the telnet
request to my host, the SNAT in my host will NOT take effect and just let the
telnet replying packets out without changing their source address. The command
is as the following:
iptables -t nat -A POSTROUTING -j SNAT --to-source
192.168.35.35
I was thinking all the packets will go through the
PREROUTING and POSTROUTING hooks, so the DNAT and SNAT will take effect on all
the packets coming and going out, but it seems that I was wrong.
Could anybody kindly help me how to achieve that
SNAT will take effect changing packets' source address even it's
replying.
Thank you very much
Ping-Yu
|
