Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-06-2006, 02:48 AM
|
#1
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Rep:
|
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
|
|
|
04-06-2006, 10:29 AM
|
#2
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
Try this: http://probe.hackerwatch.org/probe/probe.asp or nmap public_adress and post your results.
Open port should be shown.
|
|
|
04-06-2006, 11:36 AM
|
#3
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Original Poster
Rep:
|
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
|
|
|
04-06-2006, 12:28 PM
|
#4
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
Can you post the output of
Code:
netstat -an | grep :25 | grep tcp
|
|
|
04-06-2006, 12:32 PM
|
#5
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
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).
|
|
|
04-06-2006, 12:40 PM
|
#6
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
I can telnet directly into your sendmail with no issues...
Does /var/log/maillog or mailq tell you anything?
|
|
|
04-06-2006, 12:42 PM
|
#7
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Original Poster
Rep:
|
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
|
|
|
04-06-2006, 12:47 PM
|
#8
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Original Poster
Rep:
|
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?
|
|
|
04-06-2006, 12:50 PM
|
#9
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
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.
|
|
|
04-06-2006, 12:54 PM
|
#10
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Original Poster
Rep:
|
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.
|
|
|
04-06-2006, 12:57 PM
|
#11
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
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.
|
|
|
04-06-2006, 01:07 PM
|
#12
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Original Poster
Rep:
|
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.
|
|
|
04-06-2006, 01:09 PM
|
#13
|
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:
|
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.
|
|
|
04-06-2006, 01:15 PM
|
#14
|
LQ Newbie
Registered: Apr 2006
Posts: 12
Original Poster
Rep:
|
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".
|
|
|
All times are GMT -5. The time now is 04:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|