Skip to content
Discussion options

You must be logged in to vote

I'd expose only the services that genuinely need public access.

For a typical production deployment, I'd use this design:

  • Port 443: Public HTTPS traffic reaches the web server or reverse proxy.
  • Port 22: SSH is restricted to a trusted IP address range or VPN.
  • Port 8080: The Spring Boot application remains accessible only from the reverse proxy or trusted internal network.

For example, I could configure UFW to allow HTTPS and restricted SSH access:

sudo ufw allow 443/tcp
sudo ufw allow from <TRUSTED_IP> to any port 22 proto tcp
sudo ufw enable
sudo ufw status verbose

I'd ensure that the application binds to an appropriate private interface or localhost when the reverse proxy runs on the s…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vedantghode32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants