I have enabled Uncomplicated Firewall on Ubuntu Focal:
# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
And yet, it doesn't seem to be blocking anything:
# ip -o -4 address
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
2: enp0s3 inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3\ valid_lft 77618sec preferred_lft 77618sec
# nmap 127.0.0.1 10.0.2.15
Starting Nmap 7.80 ( https://nmap.org ) at 2020-12-17 15:11 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000030s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
22/tcp open ssh
Nmap scan report for dummyhost (10.0.2.15)
Host is up (0.0000030s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 2 IP addresses (2 hosts up) scanned in 0.05 seconds
What am I doing wrong?
Update
Apparently nmap
doesn't traverse the firewall when scanning and running on the same host. Is there a way to nmap
scan public addresses on the local system as if I were scanning from a remote system?