LinuxQuestions.org
Review your favorite Linux distribution.
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 10-07-2004, 09:58 AM   #1
johnsfrj
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Rep: Reputation: 0
Refusing smtp and telnet connections


I'm running a new install of RedHat 9. I am unable to make a remote connection to port 25 nor am I able to telnet into the machine. However, I am able to ping the internal lan address and send mail from the local host. I have disabled the local firewall. What gives????
 
Old 10-07-2004, 10:27 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
prefer SSH instead of telnet for security. by the default sendmail smtp daemon listens to only loopback. so u cannot connect to your linux via port 25. u must tell sendmail to listen to all interfaces. if u really want to run telnet. fisr make sure if it works.
run following commands:
#ntsysv
check telnet is on.
#/etc/init.d/xinetd restart


good luck
 
Old 10-07-2004, 10:53 AM   #3
johnsfrj
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Telnet in not among the choices. Also, I know that it is refusing smtp connections because I cannot use it to send email from another pc nor can telnet to that address with port 25.

Thanks for any help.
 
Old 10-07-2004, 10:56 AM   #4
Toxe
LQ Newbie
 
Registered: Oct 2004
Location: Germany
Posts: 4

Rep: Reputation: 0
Maybe something in /etc/hosts.deny that blocks your telnet connections?
 
Old 10-07-2004, 11:08 AM   #5
johnsfrj
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
There is nothing in the hosts.deny file. I thought maybe I needed to edit the sendmail.mc file by adding the LAN ip address to the DEAMON_OPTIONS entry. Mine currently looks like this:

DEAMON_OPTIONS(`Port=smtp,Name=MTA')dnl

I tried

DAEMON_OPTIONS(`Port=smtp,Addr=192.168.1.5, Name=MTA')dnl

with 192.168.1.5 being the address assigned to the linux machine.

Still, not able to send mail from remote client as well as not accepting anything on port 25.
 
Old 10-08-2004, 01:27 AM   #6
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
r u sure about iptables?
check it again pls
#iptables -nvL

good luck
 
Old 10-08-2004, 08:39 AM   #7
johnsfrj
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
This is what I get.

# iptables -nvL
Chain INPUT (policy ACCEPT 1519K packets, 151M bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 2490K packets, 213M bytes)
pkts bytes target prot opt in out source destination
 
Old 10-08-2004, 09:03 AM   #8
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
hmm..
can u see that sendmail listens to port 25?
#netstat -an|grep tcp|grep 25

also check if sendmail daemon runs
#ps aux

also check /var/log/messages if there is errors about sendmail

good luck.
 
Old 10-08-2004, 09:36 AM   #9
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
1) vi /etc/mail/sendmail.mc

2) Look for the following line:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

3) change the above line to:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
---or---
you can leave the 127.0.0.1 line and add a second one that references the eth0 address. i.e.
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=192.168.9.3, Name=MTA')dnl

The above is equivelent to commenting the 127.0.0.1 line. i.e. If there is no DAEMON_OPTIONS, then all interfaces are enabled.

4) Save /etc/mail/sendmail.mc after making the above change in step 3

5) Restart sendmail. Since you're using redhat, a new sendmail.cf will be created from sendmail.mc

You should be good to go.

Last edited by scowles; 10-08-2004 at 09:41 AM.
 
Old 10-08-2004, 09:52 AM   #10
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 15; Debian
Posts: 400

Rep: Reputation: 40
If you cannot telnet into a machine it probably means that the telnet daemon is not running on that machine. In many distributions, I think Redhat is one, they split telnet into a two install process. There is the telnet server, which starts the daemon, and the telnet client, which allows you to telnet to another box. Both portions must be installed and enabled, for telnet to work. You will probably also have to configure the file controlling the activity of the daemon. I think it is located in /etc/xinetd.d. There will be a series of files each controlling the activity of one daemon. You would have to edit the one affecting telnetd, the telnet daemon
 
Old 10-08-2004, 09:55 AM   #11
johnsfrj
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
This is what I get now.

[root@linuxws1 mail]# netstat -an|grep tcp|grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
[root@linuxws1 mail]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1520 492 ? S Oct06 0:04 init
root 2 0.0 0.0 0 0 ? SW Oct06 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SW Oct06 0:00 [kapmd]
root 4 0.0 0.0 0 0 ? SWN Oct06 0:00 [ksoftirqd/0]
root 7 0.0 0.0 0 0 ? SW Oct06 0:00 [bdflush]
root 5 0.0 0.0 0 0 ? SW Oct06 0:00 [kswapd]
root 6 0.0 0.0 0 0 ? SW Oct06 0:00 [kscand]
root 8 0.0 0.0 0 0 ? SW Oct06 0:00 [kupdated]
root 9 0.0 0.0 0 0 ? SW Oct06 0:00 [mdrecoveryd]
root 13 0.0 0.0 0 0 ? SW Oct06 0:00 [kjournald]
root 69 0.0 0.0 0 0 ? SW Oct06 0:00 [khubd]
root 1033 0.0 0.0 0 0 ? SW Oct06 0:00 [kjournald]
root 1351 0.0 0.2 1568 572 ? S Oct06 0:00 syslogd -m 0
root 1355 0.0 0.1 1504 428 ? S Oct06 0:00 klogd -x
rpc 1381 0.0 0.2 1652 544 ? S Oct06 0:00 portmap
rpcuser 1400 0.0 0.2 1664 596 ? S Oct06 0:00 rpc.statd
root 1469 0.0 0.1 1508 472 ? S Oct06 0:00 /usr/sbin/apmd -p 10 -w 5 -W -P /etc/sysconfig/apm-scripts/apmroot 1507 0.0 0.8 8880 2108 ? S Oct06 0:00 /usr/sbin/snmpd -s -l /dev/null -P /var/run/snmpd -a
root 1518 0.0 0.6 7596 1680 ? S Oct06 0:33 cupsd
root 1551 0.0 0.4 6104 1240 ? S Oct06 1:05 ipp://192.168.1.15/printers/queue1 1 root testprint.ps 1 page-root 1560 0.0 0.4 3564 1072 ? S Oct06 0:00 /usr/sbin/sshd
root 1574 0.0 0.2 2132 680 ? S Oct06 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 1623 0.0 0.1 1548 428 ? S Oct06 0:00 gpm -t imps2 -m /dev/mouse
root 1632 0.0 0.2 1576 572 ? S Oct06 0:00 crond
xfs 1664 0.0 1.2 4888 3180 ? S Oct06 0:00 xfs -droppriv -daemon
daemon 1673 0.0 0.2 1560 548 ? S Oct06 0:00 /usr/sbin/atd
root 1687 0.0 0.1 1512 400 tty1 S Oct06 0:00 /sbin/mingetty tty1
root 1688 0.0 0.1 1492 396 tty2 S Oct06 0:00 /sbin/mingetty tty2
root 1689 0.0 0.1 1508 400 tty3 S Oct06 0:00 /sbin/mingetty tty3
root 1690 0.0 0.1 1508 396 tty4 S Oct06 0:00 /sbin/mingetty tty4
root 1691 0.0 0.1 1508 400 tty5 S Oct06 0:00 /sbin/mingetty tty5
root 1692 0.0 0.1 1500 396 tty6 S Oct06 0:00 /sbin/mingetty tty6
root 1693 0.0 1.2 14320 3152 ? S Oct06 0:00 /usr/bin/gdm-binary -nodaemon
root 1746 0.0 1.4 14988 3592 ? S Oct06 0:00 /usr/bin/gdm-binary -nodaemon
root 1747 0.0 7.3 89056 18732 ? S Oct06 1:57 /usr/X11R6/bin/X :0 -auth /var/gdm/:0.Xauth vt7
root 1757 0.0 2.2 18548 5724 ? S Oct06 0:00 /usr/bin/gnome-session
root 1823 0.0 0.3 3208 828 ? S Oct06 0:00 /usr/bin/ssh-agent /etc/X11/xinit/Xclients
root 1833 0.0 3.1 12504 7916 ? S Oct06 0:01 /usr/libexec/gconfd-2 5
root 1836 0.0 0.6 6308 1664 ? S Oct06 0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-outproot 1838 0.0 1.5 17320 4004 ? S Oct06 0:00 gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_Settingsroot 1843 0.0 0.3 2708 832 ? S Oct06 0:00 fam
root 1850 0.0 1.9 12960 5072 ? S Oct06 0:04 /usr/bin/metacity --sm-client-id=default1
root 1854 0.0 3.6 21808 9204 ? S Oct06 0:09 gnome-panel --sm-client-id default2
root 1856 0.0 4.2 68668 10840 ? S Oct06 0:06 nautilus --no-default-window --sm-client-id default3
root 1858 0.0 1.4 16008 3620 ? S Oct06 0:00 magicdev --sm-client-id default4
root 1861 0.0 1.7 16820 4504 ? S Oct06 0:00 eggcups --sm-client-id default6
root 1863 0.0 1.2 11716 3248 ? S Oct06 0:00 pam-panel-icon --sm-client-id default0
root 1865 0.0 3.2 24404 8192 ? SN Oct06 0:03 /usr/bin/python /usr/bin/rhn-applet-gui --sm-client-id defaultroot 1866 0.0 0.2 1556 520 ? S Oct06 0:00 /sbin/pam_timestamp_check -d root
root 1872 0.0 1.7 16564 4388 ? S Oct06 0:00 /usr/libexec/notification-area-applet --oaf-activate-iid=OAFIIroot 2299 0.0 0.1 1860 468 ? S Oct06 0:00 esd -terminate -nobeeps -as 2 -spawnfd 22
root 3243 0.0 4.0 23556 10280 ? S Oct07 0:04 gnome-terminal
root 3244 0.0 0.2 1996 516 ? S Oct07 0:00 gnome-pty-helper
root 3245 0.0 0.5 4260 1300 pts/0 S Oct07 0:00 bash
root 3278 0.0 0.9 11300 2472 ? S Oct07 0:00 /usr/bin/redhat-config-services
root 3279 0.0 0.3 4680 992 ? S Oct07 0:00 /usr/sbin/userhelper -w redhat-config-services
root 3280 0.0 0.3 4204 1012 ? S Oct07 0:00 /bin/sh /usr/share/redhat-config-services/redhat-config-servicroot 3281 0.0 3.4 21788 8696 ? S Oct07 0:01 /usr/bin/python /usr/share/redhat-config-services/serviceconf.root 3649 0.7 11.0 103180 28084 ? S 08:33 0:31 /usr/lib/mozilla-1.4/mozilla-bin -UILocale en-US
root 3750 0.0 1.0 6308 2664 ? S 09:46 0:00 sendmail: accepting connections
smmsp 3759 0.0 0.9 6140 2340 ? S 09:46 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 3766 0.0 0.2 2724 756 pts/0 R 09:48 0:00 ps aux



Also, I made the changes to the sendmail.mc file and saved by using the command:
# makemap hash /etc/mail/access < /etc/mail/access
# service sendmail restart

Still a no go. Also tried:
# make -C /etc/mail
# service sendmail restart

I must be missing something easy but dang!! Anyway thanks for all of the help!
 
Old 10-08-2004, 10:21 AM   #12
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
Quote:
Originally posted by johnsfrj
This is what I get now.

[root@linuxws1 mail]# netstat -an|grep tcp|grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
sendmail or something listens to 127.0.0.1:25 not other interfaces!

so please follow scowles suggestions

good luck.
 
Old 10-08-2004, 10:34 AM   #13
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Quote:
Also, I made the changes to the sendmail.mc file and saved by using the command:
# makemap hash /etc/mail/access < /etc/mail/access
# service sendmail restart
Huh? You mentioned making changes to sendmail.mc, but rebuilt the access database.
Quote:
Still a no go. Also tried:
# make -C /etc/mail
# service sendmail restart
The redhat sendmail init script runs make -C /etc/mail during a start or restart. So, a new sendmail.cf file will be created along with any database file that changed. i.e. /etc/mail/access
 
Old 10-08-2004, 11:02 AM   #14
johnsfrj
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Understood. So after I make the changes to sendmail.mc, what command is required to update prior to
#service sendmail restart

Please understant that I am kinda new to linux and am having to learn fast or drown!
 
Old 10-08-2004, 11:14 AM   #15
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Quote:
Understood. So after I make the changes to sendmail.mc, what command is required to update prior to
#service sendmail restart
None!

# service sendmail restart - will rebuild sendmail.cf and any sendmail database file that was changed.

If you're intersted in howto manually rebuild sendmail.cf from sendmail.mc, like what a "service sendmail start/restart" does...

# cd /etc/mail
# m4 sendmail.mc >sendmail.cf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Web Server Refusing Connections zoso Linux - Networking 2 12-27-2004 11:41 AM
keep refusing connections tpark Linux - Networking 1 03-04-2004 02:24 AM
Refusing Connections goldfish Linux - Newbie 16 10-09-2003 06:13 PM
Telnet yet again. (refusing connections) hornokplease Linux - Networking 2 07-21-2003 03:30 AM
Sendmail refusing connections RH7.2 Fafafoey Linux - Newbie 3 11-13-2001 11:37 AM

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

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