Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 192.168.2.9, I get connection refused message. Running nmap localhost shows open port 25, however nmap 192.168.2.9 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?

Thanks.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Verify with netstat -ln that the service is actually listening on 192.168.2.9 or 0.0.0.0 (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
add comment

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 (0.0.0.0) or (192.168.2.9) not just local.

Regards K

share|improve this answer
add comment

Your Answer

 
discard

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.