I want to close all ports but 22 on interface enp0s3
. I have netcat listening on port 1234 for testing purposes. Here's where I'm stuck:
$ sudo firewall-cmd --state
running
$ sudo firewall-cmd --zone=drop --list-all
drop (default, active)
interfaces: enp0s3
sources:
services: ssh
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
$ nmap 10.0.2.15
Starting Nmap 6.40 ( http://nmap.org ) at 2016-02-24 06:36 UTC
Nmap scan report for 10.0.2.15
Host is up (0.00099s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
1234/tcp open hotline
As you can see, nmap shows port 1234 as open, but I have added the interface to the drop zone in firewalld. What have I missed?