I've setup some rules in ufw
on a remote server and I've turned the firewall on. Now I want to ensure my rules actually block traffic. However, when running nmap -PN -p <my_port> <ip>
from my local workstation it appears the port I'm blocking is still open. At least nmap
is reporting 'open' (which doesn't seem right). On the server if I run ufw status verbose
it reports:
...
Status: Active
Default: deny (incoming), allow (outgoing)
To Action From
-- ------ ----
22 ALLOW IN Anywhere
<my_port> DENY IN Anywhere
Shouldn't this nmap
be reporting as closed? How do I correctly test these rules?