file log : redirect ip and port using iptables
I try to telnet from PC 3 To PC 1 and it's redirect to PC 2. Firewall/iptables in PC 1
PC 1 : 192.168.0.1
PC 2 : 192.168.0.2
PC 3 : 192.168.0.3
i have command like this in PC 1:
1. iptables -t nat -A PREROUTING -p tcp -d 192.168.0.1 --dport 23 -j DNAT --to-destination 192.168.0.2:23
2. iptables -t nat -A POSTROUTING -j MASQUARADE
If I just do command number 1, In PC 2 shows(log file) that who telnet is a PC 3(is success) but it's can not telnet(can't telnet) just only send the connection. But when i combined with command number 2, telnet can be done(telnet is success) but in file log(in PC 2) shows that ip who telnet is PC 1, but actually that does telnet is PC 3. PC 1 is just redirect
How i resolve that?
Last edited by newbie_ubu; 12-24-2012 at 08:15 AM.