PSM HTML5 GW - Question and suggestion regarding the use of Port 443 to 8443 NAT Rule
92
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 16:00 PM
Question
The installation docs for the PSM HTML5 GW mention that you are supposed to run the Tomcat app on port 8443, and then add a local firewall NAT rule to forward port 443 to 8443.
What is the reason for this rule?
If you add "AmbientCapabilities=CAP_NET_BIND_SERVICE" to the systemd script (tomcat.service), systemd can bind to port 443 outright.
Environment
9.8;9.9;9.10;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11
Answer
Granting the CAP_NET_BIND_SERVICE capability to the tomcat service will allow tomcat to bind directly to port 443. However, it will allow tomcat to bind to all privileged ports.
Using the NAT rule to forward port 443 to 8443 doesn't grant any extra privileges to the tomcat service.
Based on the least privilege principle, using the NAT is more secure than granting the CAP_NET_BIND_SERVICE capability to tomcat.