[Cialug] Cannot retrieve mail through internal nework
Josh More
morej at alliancetechnologies.net
Sat Jul 1 10:35:24 CDT 2006
OK,
The "could not bind" message indicates that sshd could not bind to port
25.
This is likely because:
1) you are not root
or
2) something else is running on port 25
The output of netstat below indicates that something is running on port
25.
What surprises me is that you're not seeing something like:
# netstat -atunp | grep 25 | grep LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:*
LISTEN 27503/tcpserver
This would indicates that tcpserver is listening on port 25, to the
0.0.0.0 network.
This means that it will accepts connections from everywhere.
(Note, this line is from qmail, so if you're running postfix, the
process name will change)
Since you did *not* see a LISTEN line for postfix, I suspect that
postfix is not running
properly.
--
-Josh More, RHCE, CISSP, NCLP
morej at alliancetechnologies.net
515-245-7701
>>> vanish at dreamscapevisionery.com 06/30/06 12:56 PM >>>
Weird. I just realized the output from that netstat is completely
different from what I saw after rebooting the server. (ignore the
25432 stuff. That's something else entirely)
When I initially ran it, it showed:
tcp 0 0 127.0.0.1:25 12.206.145.136:25
ESTABLISHED-
twice.
I rant netstat for 110 and each time I run it, it grows with more
results. Each new result is my WAN IP, with a different port...
Chris VC
On Jun 30, 2006, at 12:49 PM, Chris Van Cleve wrote:
> Dave W,
>
> It was indeed missing the inet_interfaces directive. Unfortunately,
> adding that didn't correct the problem.
>
> Dave C,
>
> Thanks for the main.cf I compared yours with my old one and my new
> one, and updated the new one accordingly. No change.
> Using nmap, I see port 25 is open, but port 110 is not. (confused)
>
> Josh,
>
> Using your method I admit to being noting but confused. ;) Here is
> te output I get when running that command:
>
> debug1: sshd version OpenSSH_4.2p1 Debian-7ubuntu3
> Could not load host key: /etc/ssh/ssh_host_rsa_key
> Could not load host key: /etc/ssh/ssh_host_dsa_key
> debug1: setgroups() failed: Operation not permitted
> debug1: rexec_argv[0]='/usr/sbin/sshd'
> debug1: rexec_argv[1]='-p'
> debug1: rexec_argv[2]='25'
> debug1: rexec_argv[3]='-D'
> debug1: rexec_argv[4]='-d'
> debug1: Bind to port 25 on ::.
> debug1: Bind to port 25 on 0.0.0.0.
> Bind to port 25 on 0.0.0.0 failed: Permission denied.
> Cannot bind any address.
>
> So I ran the netstat command and got:
>
> (No info could be read for "-p": geteuid()=1000 but you should be
> root.)
> tcp 0 0 0.0.0.0:25432 0.0.0.0:*
> LISTEN -
> tcp 0 0 127.0.0.1:34694 127.0.0.1:45825
> ESTABLISHED-
> tcp 0 0 192.168.1.101:25432 12.206.145.136:2771
> TIME_WAIT -
> tcp 0 0 192.168.1.101:25432 12.206.145.136:2772
> TIME_WAIT -
> tcp 0 0 127.0.0.1:45825 127.0.0.1:34694
> ESTABLISHED-
>
> 12.206.145.136 is my WAN (Internet) IP
>
> Unfortunately I have no idea what that's telling me. I'm presently
> reading man for netstat. Heh.
>
> Chris VC
>
> On Jun 30, 2006, at 11:49 AM, Josh More wrote:
>
>> I would suspect a firewall issue.
>>
>> To test this, you can use sshd.
>>
>> 1) Shutdown postfix and whatever you are using for POP
>> 2) Run "`which sshd` -p 25 -D -d"
>> 2-e) If this fails to start, the problem is that something is
>> listening
>> on port 25. Use "netstat -atunp | grep 25" to troubleshoot.
>> 3) From the client machine, issue "ssh ip.ip.ip.ip -v -p 25"
>> 3-e) If this fails to connect, check for error messages on both the
>> server and client ssh screens. This will help you debug any
>> connection
>> problems.
>>
>> Note: when you close the client ssh call, it will also exit on the
>> server. To perform multiple tests, you need to manually restart the
>> server piece as well.
>>
>> Hope this helps,
>>
>>
>>
>> --
>> -Josh More, RHCE, CISSP, NCLP
>> morej at alliancetechnologies.net
>> 515-245-7701
>>>>> vanish at dreamscapevisionery.com 06/30/06 11:38 AM >>>
>> I decided to rebuild an old 1.2 GHz P4 box as a linux server to host
>> my family web site and email. Since I was in an adventurous mood, I
>> installed Ubuntu to try it out. (Love it, btw. Finally a usable
>> Debian. ;) ) I am having two problems with it though, one of which
>> I'm hoping the Linux Geniuses here can help me figure out.
>>
>> The box is running Postfix because I'm used to it, and I think it's
>> the best mail server. It's working flawlessly. My router is
>> configured to forward ports 25 and 110 to that box. Using Webmin, I
>> am able to send an receive email just fine. Everything sounds good,
>> right? Here's the catch:
>>
>> I have 4 other PCs on my home network, all of which are configured to
>> use my home domain for email. None of these machines, through various
>> clients, is able to connect to the Ubuntu box. I am getting denial
>> messages for port 110 and port 25 when trying to receive/send mail
>> respectively. I thought at first it was a resolution problem (and
>> spent a good chunk of time playing with host files), but all 4 PCs
>> correctly reach the box's webmin interface using the domain name.
>>
>> Any ideas?
>>
>> Chris VC
>>
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
More information about the Cialug
mailing list