LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2008, 12:09 PM   #1
kevinyeandel
Member
 
Registered: Jun 2008
Posts: 49

Rep: Reputation: 16
iptables problems with smtp pop3


Hi

I can telnet and connect to dovecot on 110
but when I telnet and connect to smtp on 25 I get connection refused by host. The mail server, web server etc is all the same machine.

Can someone please tell me whats wrong with my iptables - assuming this is what is the problem. Though even when I
telnet localhost 25
I get the same problem, cannot connect to host: Connection refused. I've run out of ideas and going mad here!

Many thanks

Kevin

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
~
 
Old 10-12-2008, 02:41 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Is the firewall you posted running on the server? If so, I don't see any wrong with it. Is it possible a firewall on your client machine is causing this? Or the SMTP server doesn't like telnet?

If none of this leads you to the problem, there are some things you can do to troubleshoot.

One useful thing is to look at packet counts for rules using (as root):

Code:
iptables -nvL
The first column will show how many packets have matched that rule. You can take this one step further by adding a rule to log rejected packets immediately prior to the REJECT rule.

You can also run a packet sniffer such as tcpdump or wireshark to see what packets are actually getting sent. If you run a packet sniffer remotely over ssh, make sure you specifiy "not tcp port 22".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP/POP3 problems with squid/iptables dragonleech Linux - Security 8 09-23-2010 04:57 AM
want to get SMTP and POP3 working through iptables. vedang Linux - Server 6 02-01-2008 08:16 AM
SMTP AND POP3 through iptables vedang Linux - Server 5 01-30-2008 11:47 PM
SMTP/POP3 iptables problem dragonleech Linux - Security 4 12-12-2005 11:33 AM
POP3/SMTP-IPTABLES Problems chris Linux - Networking 1 02-28-2003 04:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration