When I scan my server using nmap $ sudo nmap -sS IP.ADDR.OF.SRVR
, I see a line with 25/tcp open smtp
. This is despite the fact that I'm not running postfix, exim or any other kind of mail server on the machine.
I have also tried to block port 25, using IP table rules.
$ sudo iptables -A INPUT -p tcp --destination-port 25 -j DROP
But despite running this and verifying that the iptable rule exists with $ sudo iptables -L -n -v
running nmap still shows the port as being open.
I have also run $ netstat -tulnp
on the server to see what ports are open, and port 25 does not show up in the list there.
Very confused on how to proceed, any help or pointers would be much appreciated.
Output of sudo iptables -nvL
- https://pastebin.com/5W9V2rrz
Output of sudo iptables -t nat -nvL
- https://pastebin.com/v9ST06uz
nmap
? IsIP.ADDR.OF.SRVR
a public IP configured on your server or any kind of load-balancer, firewall with port mapping, etc. and your server is behind it?telnet IP.ADDR.OF.SRVR 25
i see the followingTrying IP.ADDR.OF.SRVR \n Connected to mydomain.com \n Escape character is '^]'
. Are you talking about my ISP that i'm connecting to the internet from home, or the hosting service that is hosting the machine? As far as I know my ISP does allow direct access to SMTP, because i'm able to telnet to my server on port 25.