Firewall setup when using nginx-local-ip

Good point @Nick , trying to access the app locally from a browser in the same computer it also doesn’t work because what you said.

So finally digging a bit more about ufw, I think the most restricted rules set to only allow local and LAN connections is:

$ sudo ufw allow proto tcp from 192.168.0.0/24 to any port 80,443,5988
$ sudo ufw allow proto tcp from any to 192.168.0.0/24 port 80,443,5988

Also just executing the following works:

$ sudo ufw allow proto tcp from any to any port 80,443,5988

But connection from outside the LAN can be performed if the LAN is not protected.

@jkuester if you confirm this works for you as well, we can add later a section in the nginx-local-ip readme about it.

1 Like