Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work in an environment which heavily utilises non-standard restricted ports in URL's for development environments for instance ports 81-104 & 444-456. As a front end developer this causes many problems with our testing e.g. most browsers won't load webpages using these ports at all or they require startup flags or heavy configuration. This is something the server admins aren't willing to change at the moment so I"m looking for a way to be able to hit a local URL that routes to these URL's using non standard ports. Would I be able to do this in my /etc/hosts file? Are there other options or tools I should consider?

share|improve this question

If you're looking to view a page in your browser over the standard HTTP port (80) that's generated by a server listening on a non-standard port (e.g., 81), you'd need to set up either a remote proxy on a server or a local proxy on your workstation to handle redirection.

For remote proxies, you can utilize nginx, squid, or varnish.

For local proxies, you can try Fiddler ( or Charles Proxy (

share|improve this answer

I would imagine that you should be able to use squid for this. AFAIK it can do URL redirections and port translations (in both directions).

share|improve this answer

You could do this through IPTables but that would have to be configured on the servers, alternatively you could set up some sort of proxy (NGINX, HAProxy etc.) to take connections on ports like 8000-9000 and forward them to the real ports but again this would need to be set up on the server.

share|improve this answer

Your Answer


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.