Quote:
Originally Posted by smart_shell
Hi,
We have the network, 10.19.0.0/24 GW(10.19.0.222 centos) and two irc servers
one 10.19.0.7
two 10.19.0.222
I need to change connection from 10.19.0.220:6667 to 10.19.0.7:6667 on GW(10.19.0.222 iptables FW).
i did:
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 6667 -j DNAT --to-destination 10.19.0.7:6667
iptables -t nat -A POSTROUTING -p tcp --dst 10.9.0.7 --dport 6667 -j SNAT --to-source 10.19.0.222
but no result.
Please help.
Thnx
|
Just use this command, it's send all requests from eth0 with dst port 6667 to 10.19.0.7 and check the 10.19.0.7 to listen that port .
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 6667 -j DNAT --to-destination 10.19.0.7