I try to telnet from PC 3 To PC 1 and it's redirect to PC 2
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:
iptables -t nat -A PREROUTING -p tcp -d 192.168.0.1 --dport 23 -j DNAT --to-destination 192.168.0.2:23
iptables -t nat -A POSTROUTING -j MASQUARADE
If I just do command number 1, In PC 2 shows(log file) that the 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 success) but in file log(in PC 2) shows that ip who telnet is PC 1, but actually that does telnet is PC 3.
How i resolve that?