LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-27-2003, 04:04 AM   #1
michaelchunn
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Trying to send outbound mail


I'm running Redhat Linux 8.0 and using sendmail.

I have the firewall turned on and I'm not filtering any outbound traffic but while the firewall is active sendmail cannot connect to other mail servers to deliver outbound mail.

I can turn off the firewall from the terminal using:

service iptables stop

and the mail will send just fine. Turn the firewall back on:

service iptables start

and it's stalled!

I have spent two days now trying to solve this delima. I would appreciate some wisdom on this subject.
 
Old 08-27-2003, 11:10 AM   #2
michaelchunn
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
One other thing I have noticed is that I cannot do the following with the firewall on.

telnet mail.server.com 25

This is being blocked by the firewall also which I suspect is the same reason an application cannot connect to an outside smtp server.

NOTE: mail.server.com is a made up name. I used a real external server name.
 
Old 08-27-2003, 01:42 PM   #3
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
paste your firewall rules with the command:
`iptables -L -n`
 
Old 08-27-2003, 05:58 PM   #4
michaelchunn
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
[root@snowmane root]# iptables -L -n

Chain INPUT (policy ACCEPT)
target prot opt source destination
IRULES all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain IRULES (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:110
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:143
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:10101
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:20000
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 8
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 0
ACCEPT udp -- 63.238.52.1 0.0.0.0/0 udp
ACCEPT udp -- 63.238.52.2 0.0.0.0/0 udp
DROP all -- 0.0.0.0/0 0.0.0.0/0

[root@snowmane root]#
 
Old 08-27-2003, 11:22 PM   #5
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
add a rule to allow connections to port 25:

iptables -A INPUT -p tcp --dport 25 -j ACCEPT

that will atlest take care of the telnet issue, and who knows, it might clear up the other one too. But do that 1st and tell us what u get.
 
Old 08-27-2003, 11:22 PM   #6
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
wait..u have that rule already...sorry.
 
Old 08-27-2003, 11:33 PM   #7
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
i've given this much thought and can only recommend testing what goes on with a tool like tcpdump or ethereal.

Start ethereal, try to send an email and see what happens with the packets. Do it with the firewall on and off. If you don't have much experience with ethereal, play wit it for a while and you'll kinda pick up on what it does. Try to use that to debug what is going on.

Another question, are u able to recieve mail with the firewall up? And try adding the following rule:

iptables -A OUTPUT -j ACCEPT

i know it's the default policy for OUTPUT to ACCEPT already, but add it anyway just for kicks.
 
Old 08-28-2003, 08:02 AM   #8
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
alright, let's customize your rules. What all do you want to do with your firewall? Is it a gateway? does it forward packets? What services do you want to allow? Add anything else you want your firewall to do and we'll come up with some rules for you.

If your rules aren't working, wipe 'em clean and let's make our own.
 
  


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
can send and recieve local mail, but not mail from internet Caine101022 Linux - Software 2 09-09-2005 01:35 PM
how to configure mail client to send mail out on different pppd threads vkrishn1 Linux - Newbie 0 12-29-2004 10:54 AM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
Open web mail OR Send mail groups linuxeagle Linux - Networking 0 05-12-2004 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:24 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