I use SSH tunnelling extensively to gain access to remote machines that are behind a firewall. So to access a development server I use something like http://localhost:8888 which is forwarded to port 80 on a remote host.

Is there a way to simplify my setup with custom domains? For instance, I want to be able to type in http://remote.dev and actually be accessing http://localhost:8888?


DNS and hosts are only for domain mapping of IP addresses. Ports aren't part of a domain, and according to this post, it cannot be done in the way you're asking. There is an alternative solution mentioned there, but things can get messy when modifying firewall tables. Essentially what you have to do is redirect to a remote server (you'll have to know the IP address of the server, and it'll have to be unique). That being said, it is possible, but may not be worth the effort or potential consequences.

  • Thanks. Probably time to setup a real intranet with a reverse proxy or something. – madh Mar 21 '12 at 17:26
  • I'd say that a VPN would suit your needs. – Andrew Larsson Mar 21 '12 at 17:29
  • Definitely! I settled on the low-tech solution of bookmarks. – madh Mar 23 '12 at 0:39
  • If it works, it works! – Andrew Larsson Mar 23 '12 at 1:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .