5

I'm trying to receive SMTP messages on port 25 (this is where my MDA server lives). I've opened port 25 on my box

sudo ufw allow 25

with this output:

Rules updated
Rules updated (v6)

But when I nmap the domain:

nmap -p 25 <my-domain>

I get this output:

Host is up (0.098s latency).
rDNS record for <remote-ip>: hostname
PORT   STATE  SERVICE
25/tcp closed smtp

Why is port 25 closed after I explicitly opened it?

1 Answer 1

4

In nmap, a closed port means that the port is reachable, but there is no application listening to the port. Try to run

nc -l 25

(as root of course) and redo the scan.

If the firewall would be blocking the port, nmap would show it as filtered.

3
  • True. This is explained here: Port Scanning Basics. Dec 30, 2017 at 23:57
  • interesting. it seems like my hosting provider closes port 25 within the routing table.
    – dopatraman
    Dec 31, 2017 at 1:00
  • That is unlikely. Routing is (normally) layer 3, ports are layer 4. If you know a tcp-server is listening on your host on port 25, you could try a telnet 127.0.0.1 25 to see if that works. Dec 31, 2017 at 10:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .