Skip to main content

Web Server Firewall

Choose your web server from the tabs mentioned below:

Nginx Firewall Configuration

Before testing Nginx, the firewall software needs to be configured to allow access to the service. Nginx registers itself as a service with ufw upon installation, making it straightforward to allow Nginx access.

List the application configurations that ufw knows how to work with by typing:

sudo ufw app list

It is recommended to enable the most restrictive profile which will still allow the traffic you’ve configured. Since you haven’t configured SSL for the server, you’ll only need to allow traffic on port 80:

sudo ufw allow 'Nginx HTTP'

Verify the change by checking the status:

sudo ufw status