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 07-01-2003, 02:27 PM   #1
TomServo3k
LQ Newbie
 
Registered: Jun 2003
Location: Denver, CO
Distribution: Redhat Linux 9
Posts: 3

Rep: Reputation: 0
Question Redhat 9, sendmail, iptables


I installed RedHat 9 and setup sendmail (along with ssh, http, etc). The iptables settings, below, are installed. The web server, telnet and ftp work. Sendmail doesn't. I can connect locally as localhost (telnet localhost 25) but not by name (telnet mydomain.com 25) even from the local machine, much less from any other machine on the lan, or externally. I'm not a newbie, but apparently not an expert either. I've set up sendmail on RedHat 6 and 7 before but I seem to be missing something on 9.

The message I get is

Trying 192.168.2.35...
telnet: connect to address 192.168.2.35: Connection refused



Any help would be very much appreciated. This is all that's keeping my site from going live.

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
-A INPUT -j RH-Lokkit-0-50-INPUT
-A FORWARD -j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 21 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 22 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 23 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 25 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 80 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6000:6009 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 7100 --syn -j REJECT
COMMIT
 
Old 07-01-2003, 02:30 PM   #2
emence
Member
 
Registered: Jun 2003
Location: Springfield, MO
Distribution: RedHat/Slackware
Posts: 81

Rep: Reputation: 15
you need to edit the /etc/mail/local-host-names file and make an entry like:

my.domain.com

also be sure that you have my.domain.com listed in your /etc/hosts

service restart sendmail and you are done.
 
Old 07-01-2003, 02:39 PM   #3
TomServo3k
LQ Newbie
 
Registered: Jun 2003
Location: Denver, CO
Distribution: Redhat Linux 9
Posts: 3

Original Poster
Rep: Reputation: 0
I already have done that. Also in hosts file. Also in mail/access. The problem persists. Keep in mind, I can (telnet 127.0.0.1 25) and it works, but (telnet 192.168.2.35 25) fails. It seems more like a firewall / iptables issue to me, but I'm not sure.
 
Old 07-01-2003, 02:40 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Also check your sendmail.mc file and "dnl" the line:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

This makes sendmail listen not just on the loopback. You will need to hash the mc file again afterwards.
 
Old 07-01-2003, 03:06 PM   #5
emence
Member
 
Registered: Jun 2003
Location: Springfield, MO
Distribution: RedHat/Slackware
Posts: 81

Rep: Reputation: 15
Quote:
Originally posted by david_ross
Also check your sendmail.mc file and "dnl" the line:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

This makes sendmail listen not just on the loopback. You will need to hash the mc file again afterwards.
That was kind of the point I was trying to get to. your firewall is fine. you dont have sendmail setup correctly
 
Old 07-01-2003, 03:09 PM   #6
TomServo3k
LQ Newbie
 
Registered: Jun 2003
Location: Denver, CO
Distribution: Redhat Linux 9
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you, David - that did the trick!
 
  


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
sendmail+iptables eranb2 Linux - Networking 3 01-16-2005 04:14 AM
questions on sendmail and iptables aetengoku Linux - Software 4 01-27-2004 09:14 PM
sendmail, iptables and security Tigger Linux - Security 3 11-25-2003 09:14 PM
sendmail, iptables and security Tigger Linux - Newbie 2 05-27-2003 01:37 PM
sendmail, iptables and security Tigger Linux - General 2 05-27-2003 08:45 AM

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

All times are GMT -5. The time now is 05:53 PM.

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