LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2006, 02:48 AM   #1
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Rep: Reputation: 0
sendmail smtp can't be connected outside router


Dear all,

I met a problem about smtp server. I hope some can help me solve the problem.

I have a sendmail server in linux using NAT inside router. The server can send and receive well inside the router. Outside the router, I can only receive from the server, but can't send any email through the server.

I set port forwording in the router and opened the port in linux by service and iptables. I can telnet the server inside the router using private address (i.e., 192.168.0.2) and some words can be displayed "220 domain.com ESMTP Sendmail 8.13.1/8.13.1; Thu, 6 Apr 2006 14:25:54 +0800". When I use public ip address (i.e., 218.188.x.x), the server can be connected. However, in the case, no word is shown.

I would like to ask what else I miss for the setting.

Regards,
Phoebus
 
Old 04-06-2006, 10:29 AM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Try this: http://probe.hackerwatch.org/probe/probe.asp or nmap public_adress and post your results.
Open port should be shown.
 
Old 04-06-2006, 11:36 AM   #3
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you for your reply.

The result for port scan by using nmap is:

[root@geniusfame mail]# nmap -sS -O 218.188.252.206

Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2006-04-06 22:57 HKT
Insufficient responses for TCP sequencing (0), OS detection may be less accurate
Interesting ports on 218.188.252.206:
(The 1653 ports scanned but not shown below are in state: filtered)
PORT STATE SERVICE
20/tcp closed ftp-data
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
143/tcp open imap
Device type: WAP|firewall|general purpose|media device|broadband router
Running: 2Wire embedded, Checkpoint Windows NT/2K/XP, Linux 2.4.X, OpenBSD 3.X, Pace embedded, Belkin embedded, Sun Solaris 2.X|7|8|9
Too many fingerprints match this host to give specific OS details

Nmap run completed -- 1 IP address (1 host up) scanned in 55.861 seconds

Regards,
Phoebus
 
Old 04-06-2006, 12:28 PM   #4
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Can you post the output of
Code:
netstat -an | grep :25 | grep tcp
 
Old 04-06-2006, 12:32 PM   #5
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Is you host now down? I tried pinging it, but got no response. I think your router is blocking connection from outside. I have also sendmail running on my machine and everything works perfectly (have no router).
 
Old 04-06-2006, 12:40 PM   #6
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
I can telnet directly into your sendmail with no issues...
Does /var/log/maillog or mailq tell you anything?
 
Old 04-06-2006, 12:42 PM   #7
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Original Poster
Rep: Reputation: 0
The result for the command is:

[root@geniusfame mail]# netstat -an | grep :25 | grep tcp
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN


I disabled the ping on the route. I enable it now. You can ping the address now.

Thank you for your time.

Regards,
Phoebus
 
Old 04-06-2006, 12:47 PM   #8
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Original Poster
Rep: Reputation: 0
I read /var/log/maillog already. I can see that you can telnet my mail server directly (the ip is 193.219.x.x) . But I still can't connect to the server directly (my one is 218.102.104.87). do I set the access file wrong?
 
Old 04-06-2006, 12:50 PM   #9
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Yeap. Finally I got a response from your server:
Code:
Starting Nmap 4.00 ( http://www.insecure.org/nmap/ ) at 2006-04-06 19:47 EEST
Interesting ports on 218.188.252.206:
PORT   STATE SERVICE
25/tcp open  smtp
and
Code:
telnet 218.188.252.206 25
Trying 218.188.252.206...
Connected to 218.188.252.206.
Escape character is '^]'.
220 geniusfame.com ESMTP Sendmail 8.13.1/8.13.1; Fri, 7 Apr 2006 00:49:34 +0800
That's strange that we can access your server normally, but you can't. What's in your /etc/hosts.deny file?

Last edited by Alien_Hominid; 04-06-2006 at 12:53 PM.
 
Old 04-06-2006, 12:54 PM   #10
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Original Poster
Rep: Reputation: 0
I would like to know why I can't connect to the server. Would you tell me? Whenever I connect to the server, there is no response.
 
Old 04-06-2006, 12:57 PM   #11
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I don't know. One thing I could think of is that you disabled access for your own ip (sorry,I know it's rather stupid idea). One temporary sollution: connect through ssh and send mail from there or create a web script with php to send your mail.

Last edited by Alien_Hominid; 04-06-2006 at 01:00 PM.
 
Old 04-06-2006, 01:07 PM   #12
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Original Poster
Rep: Reputation: 0
thank you for your suggestion.

My temporary solution is to use vpn or webmail. I still want to solve the problem.

I suspect that my access file has something wrong.
 
Old 04-06-2006, 01:09 PM   #13
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Reading this thread, I am not sure if I understand your question. Is the problem that you can't connect to sendmail remotely, or that you just can't send email through sendmail remotely?

I ask, because not being able to relay remotely is the default configuration for Sendmail (and that is a goo thing ).

If you wish to use Sendmail remotely to relay, you will probably want to use SMTP AUTH. This will require you to supply a username and password. Alternatively, you can configure Sendmail to relay from specific hosts, but this is only a viable solution if you are always going to be using the same hosts.

If SMTP AUTH is what you need, search for SeigeX's post. It's really good.

As mdarby pointed out, checking the maillog should let you know what the issue is. I would ssh into the box and use "tail -f /var/log/maillog" to monitor the maillog, then attempt to send the mail. Whatever pops up is going to tell you what the issue is.
 
Old 04-06-2006, 01:15 PM   #14
phoebus
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you for your reply.

My main problem is that the server doesn't have any reponse to me when I connect to the server. If the server is connected successfully, the words "Escape character is '^]'.
220 geniusfame.com ESMTP Sendmail 8.13.1/8.13.1; Fri, 7 Apr 2006 00:49:34 +0800
are displayed. I don't know why I'm using my current pc can't get the word when I type "telnet 218.188.252.206 25".
 
  


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
connected to router but not to internet jb2006 Linux - Wireless Networking 4 03-30-2006 10:23 AM
Connected to router but not internet jberkery Linux - Networking 2 02-25-2006 03:04 PM
how do I use printer that is connected to router redpenguin Linux - Newbie 3 01-08-2006 10:34 PM
Connected, but can't see router, internet dudboi Linux - Networking 4 08-17-2004 04:02 AM
Limit connected items connected to my router andersh3 Linux - Newbie 1 03-16-2004 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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