How to forward to internal server and port from www



  • Not sure if this is NAT or DNS so sorry if i poster in the wrong place.

    What i am wanting to do it something i have no idea where to begin so am looking for assistence.

    I have a server behind my pfsense box, which i have a 1:1 NAT entry from a public IP to that server IP, and it works fine (tested apache)

    Here is what i want.  I have some software installed on that server which is web based and to login i need to go to: localhost:9080

    What i want is to know if i can setup a subdomain at where my DNS is hosted (already done this.. sub.mydomain.com and have pointed it to the public IP of said server.) and somehow have that be directed to server IP:9080 ?  Understand my question?

    So from the www, i want to be able to open um browser, type in http://sub.mydomain.com and have the GUI at :9080 open up.



  • Hello? Anybody?



  • You can do a port forward that'll override the 1:1, to send port 80 to port 9080, assuming that service actually listens on the interface IP and not just localhost. and assuming you don't have something already going through 80.



  • @cmb:

    You can do a port forward that'll override the 1:1, to send port 80 to port 9080, assuming that service actually listens on the interface IP and not just localhost. and assuming you don't have something already going through 80.

    Thanks for the reply, but dont understand fully.  Are you saying not to do a 1:1 and just port forward public ip:80 to local ip:9080 ?  The app on the internal server does listen o the interface IP, the server does have Apache running so i guess that would be listening on port 80.  Currently i just have the subdomain setup on my DNS host, and a 1:1 from public IP to local IP

    I should mention that the public IP is not my WAN IP, its another that is added in as a Virtual IP which is from a block i have thats forwarded to my WAN Public IP



  • @luke240778:

    Thanks for the reply, but dont understand fully.  Are you saying not to do a 1:1 and just port forward public ip:80 to local ip:9080 ?

    You can keep the 1:1 and add a port forward to do just that, the port forward will override the 1:1 for traffic matching it (otherwise dest port 80 would go to dest port 80).


Log in to reply