Article 6ESX5 iptables redirect port connection to different host:port, continued

iptables redirect port connection to different host:port, continued

by
mfoley
from LinuxQuestions.org on (#6ESX5)
I want to route LAN request to host 192.168.0.2:1234 to host 192.168.0.99:4567. I've tried the following iptables rule on host 192.168.0.2:
Code:iptables -t nat -A PREROUTING -s 192.168.0.0/24 --protocol tcp --dport 1234 -j DNAT --to-destination 198.162.0.99:4567

# (from some host other than 192.168.0.2 ...)

$ telnet 192.168.0.2 1234
Trying 192.168.0.2...
telnet: connect to address 192.168.0.2: Connection timed outI'm no iptables expert. Maybe I should use the FORWARD table instead or in addition to?

Help appreciated.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments