Port forwarding and redirection with ipmasq

I previously posted about port forwarding with ipmasq. The idea was to take port 80 on the internet-accessible interface and forward it to port 80 on another machine accessible from the internal interface.

Today I tried to do something fancier: redirect port 12345 on the internet-accessible interface and forward it to port 22 on another machine accessible from the internal interface. I.e., exactly the same as before except changing the destination port on the internal network. I failed. I ended up editing /etc/ssh/sshd_config and adding a ‘Port 12345’ line to cause it to listen on a non-standard port. I then forwarded that port as before. I’m not sure why changing the destination port on the internal network is harder, but it is. When I figure this out, I’ll update this post.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s