Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am rather new to Linux and trying to set up a MailScanner box. I went as far as to set it up with postfix and succeeded sending a test message via it from the local console.

However, when I try to connect to port 25 on the box IP which is, I get connection refused message. Running nmap localhost shows open port 25, however nmap shows no open port 25. IPtables and selinux are disabled.

How can I determine what is blocking the port and how do I unblock it?


share|improve this question
up vote 2 down vote accepted

Verify with netstat -ln that the service is actually listening on or (all interfaces) and not just local host.

Verify iptables isn't running (iptables -L -n -v no results)

Check /etc/hosts.deny for any access rules that may be in play.

Check the logs just to make sure there isn't a mail configuration specific reason.

Verify you can ping that host from another on the same subnet, and that you can telnet to port 25 on that box.

That should cover it.

share|improve this answer
Yep, it was a postfix config mistake. Thanks! – kdl Nov 3 '09 at 19:07
I don't think postfix has support for tcp_wrappers – wzzrd Nov 12 '09 at 20:53

If you're sure that there are no iptables firewall rules loaded (iptables -vnL)

Run netstat -tanop to verify that postfix is listening on all network interfaces ( or ( not just local.

Regards K

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.