Using port 80 instead of port 8080

A small office has a single internet static ip address coming in through a router. There are three computers A, B and C in the office. Normally ports 8080 and 1099 are forwarded by the router to computer B which is hosting a Servoy solution.

The customer decides they want to use port 80 instead of port 8080 for Servoy, so they change their port setting on their computer B Servoy/Tomcat from 8080 to 80. They also change the router so that it is forwarding ports 80 and 1099 to computer B. The Servoy/Tomcat is the only web server running in their office.

How will this setup affect computer A and C’s access to the internet. Will they still be able to use the internet if the router is forwarding ports 80 and 1099 to computer B? Also, in this scenario is it necessary to forward port 80 to computer B, or will it find computer B without port forwarding?

There’s absolutely no problem. The router is NATting the 3 computers when they browse the web, the port redirection is only for incoming connections, so if someone on the net ask for their Ip:port80 the request is redirected from the router (the real owner of the external IP) to computer B.

You just need to forward port 80 and 1099 from the router to computer B.

You can even redirect port 80 from the router to port 8080 on computer B with most routers. This has the extra advantage that you do not need to change the tomcat configuration file, nor do you have to bind Servoy to a privileged port (a port < 1024; which in UN*X installs means that you do not have to run Servoy as root).

Thank you Nicola and Sebastiaan.

sebster:
…nor do you have to bind Servoy to a privileged port (a port < 1024…

Could you elaborate on that last part. I do not fully understand.

In UN*X systems, only the root user (adminstrator/super user) is allowed to start programs that listen on ports < 1024. Some programs, such as the apache web server drop their root privileges after having started (for example apache becomes user nobody). Servoy takes a different approach and simply (by default) does not bind to ports < 1024. Servoy does NOT drop privileges if you start it as root, so then it will be running as root all the time. For security reasons, the best thing is to let Servoy start as a dedicated servoy user and bind to ports 1099 and 8080, and then let your firewall/nat router redirect any privileged ports (for example 80 → 8080).

Hope this helps!