Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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 127.0.0.1:8888 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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.