News: This forum is now permanently frozen.
Pages: [1]
Topic: How to route external traffic on one port to a different internal port?  (Read 807 times)
« on: July 12, 2014, 00:35:31 »
halon314 *
Posts: 13

I have three different Linux boxes running behind my M0n0wall.  I want to be able to ssh into any one of them without having to SSH to one, and from that box ssh into either of the other two....

I would like to open three different external ports (49222, 49223 and 49224) and redirect traffic on each of those external ports to port 22 on one machine.  So if I want to ssh into the first box, I simply  "ssh -p 49222" and if I want to ssh into the second box, "ssh -p 49223"

I configured the NAT and Firewall rule, but the connection times out.  NAT rule has external port 49222 and internal port of 22 with the IP of the first box.  Firewall rule opens port 49222.  What am I missing?

 ~ Brian
« Reply #1 on: July 17, 2014, 05:30:28 »
Lee Sharp *****
Posts: 517

The firewall rules need to open the destination port, 22.  Not the NATed psudo port 49222.
« Reply #2 on: July 18, 2014, 05:06:29 »
halon314 *
Posts: 13

...and  THAT sir was my problem!   Ha ha !!
Lee, I thank you very kindly for the assistance.
Pages: [1]
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines