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'm running in to a mental roadblock trying to figure this one out.

We have a Juniper firewall at our office and we do a lot of port forwarding to reach internal services that we need to access from the outside. For example, our build server lives at http://machine1:8190 so we forward all requests on that port at the firewall to the internal machine on the same port.

Instead, I want to access the build server at Internally I have the DNS setup to point to our nginx server running a reverse proxy so that all internal requests for get proxied to http://machine1:8190. Where I'm struggling is figuring out how I can get my external requests (from outside the office) to work the same way. If I setup DNS to point to our public IP of our office, what do I need to configure at the firewall? Obviously the requests comes in through :80 but I have another port forwarding rules that uses that port. Do I just need to point the firewall DNS at our internal DNS server? I'm just not sure what the right approach is.


share|improve this question
up vote 1 down vote accepted

I would consider three options:

  • Use port 443 for access to internal services. Forward this to nginx from the firewall and have nginx do appropriate authentication before forwarding. (This would be my preferred option, as I would require authentication for remote access.)
  • Have the current server for port 80 forward request to nginx. apache/apache2 has the appropriate proxy capabilities. Many other web server have similar capablities.
  • Have nginx forward web traffic to the existing server. You already have it forwarding. This would just be one more forwarding rule (perhaps the default rule.)

To support this you may want additional DNS aliases for the external IP address.

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.