IP/PORT forward requests to another server

The commands in your question are enough to enable routing and forward 12.345.67.890:3636 to 09.876.54.321:3636.


Use iptables' LOG target to monitor what is happening:

iptables -I FORWARD -j LOG

You should see something like this in /var/log/syslog:

Aug 19 08:43:23 hostname kernel: [190951.964227] IN=eth0 OUT=eth0 SRC=11.22.33.44 DST=09.876.54.321 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=51600 DF PROTO=TCP SPT=41960 DPT=3636 WINDOW=246 RES=0x00 ACK URGP=0
  • SRC: Source IP address
  • DST: Destination IP address
  • SPT: Source port
  • DPT: Destination port

Flush iptables rules to clean up everything:

iptables -F