Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68
Rep:
Quick Question about listening ports
I want port 25 to listen on 192.168.1.100 (or maybe on * ), how can I do this?
My current output is:
netstat -nap | grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 17872/master
Thanks sincerely...
When you say you want a port to "listen" on a certain interface, rest assured that it is listening (though not in the way that it traditionally means) although it can be blocked via firewall.
What needs to happen is to have an application that is doing the "listening" on this port. You had specifically mentioned port 25. Normally what runs on this port is some type of mail sending application (SMTP, Sendmail, etc).
What it sounds like you're asking to me, how do I get my mail sending application to run on a specific interface? More than likely you'll need to find out what mail application you have running and edit its configuration file so that it will be listening on the interface of your choice.
Please let us know what type of mail application you have running and then we can help you further.
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68
Original Poster
Rep:
Hi Harlin,
I have Postfix (2.1.5) on (Mandrakelinux). I could not figure out why it would not receive email from outside of my network even though I keep setting inet_interfaces = all in main.cf file.
Here is the scenario:
This works:::
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 www.domain.com ESMTP Postfix (2.1.5) (Mandrakelinux)
This does not work:::
telnet www.domain.com 25
Trying xx.xx.xx.xx...
telnet: connect to address xx.xx.xx.xx: Connection refused
telnet: Unable to connect to remote host: Connection refused
I am assuming that above doesn't work because port 25 only listens connections from localhost.
I know for sure that I have all the firewalls turned off on the system, unlikely this is a firewall issue. However this is the first time I am using Mandrake 10.2, I am wondering if there is anything like SE Linux on Fedora that is blocking port 25 to listen on all devices. I digged around and find system security settings and set it to "Poor" where the system is wide open to the net, but still no luck.. I even tried setting it to "Paranoid", then I could not even ssh into the machine.
How can I solve this issue?
Any suggestions would be appreciated..
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68
Original Poster
Rep:
I am pretty sure postfix is running. If it was not, when I telnet into port 25 locally I would not be greeted by postfix..Also, running processes confirm that postfix is running. ps -ax | grep postfix 17872 ? Ss 0:02 /usr/lib/postfix/master
I even went one step further and type "postfix start", which produced:
postfix/postfix-script: fatal: the Postfix mail system is already running
.................................................................................................... ............
In short, I dont know what to do..Though it seems simple, yet I can not figure out what is causing this.
PLEASE HELP ME FIGURE THIS OUT, it is driving me nuts..
thanks.
My first hunch is that you ISP is blocking incoming requests to port 25. Who is your ISP?
Also, is your domain using a forwarder? Does the following point to each other?
dig fully.qualified.domain.name
dig -x ip.address.returned.from.above
Lastly, google pointed me here:
My own network addresses
The inet_interfaces parameter specifies all network interface addresses that the Postfix system should listen on; mail addressed to user@[network address] will be delivered locally, as if it is addressed to a domain listed in $mydestination.
The default is to listen on all active interfaces. If you run mailers on virtual interfaces, you will have to specify what interfaces to listen on.
You even have to specify explicit machine interfaces for the non-virtual mailer that receives mail for the machine itself: the non-virtual mailer should never listen on the virtual interfaces or you would have a mailer loop.
dig -x ip.address.returned.from.above returns FQDN from EARTHLINK.
;; QUESTION SECTION:
;87.65.43.21.in-addr.arpa. IN PTR
;; ANSWER SECTION:
87.65.43.21.in-addr.arpa. 86400 IN PTR user-000696.cable.mindspring.com.
;; AUTHORITY SECTION:
87.65.43.21.in-addr.arpa. 40362 IN NS itchy.earthlink.net.
87.65.43.21.in-addr.arpa. 40362 IN NS scratchy.earthlink.net.
I guess this doesn't look good so far. However, I believe my isp does not block incoming requests to port 25 because I set up my laptop (running windoze's IIS) as mail server temporarily and I was able send/recieve email with no problem.
Also, I just tested out the inet_interfaces settings, still no luck..
Thanks again for helping me out..
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68
Original Poster
Rep:
Nevermind... I just googled "earthlink block port 25" and got zillions of links all of which pointed me to the same direction. EARTHLINK BLOCKS PORT 25
I have not read much yet, but I will try to find what other alternatives I have...
Thanks to you all for bearing with me.
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68
Original Poster
Rep:
IT WORKS...thanks everyone
Okay, this is the last one..promise..
I guess inet_interfaces settings that Dgar suggested earlier worked. Maybe It did not propogate fast enough. Now when I type
netstat -nap | grep :25 >>>>>>>>> I get
tcp 0 0 192.168.1.253:25 0.0.0.0:* LISTEN 2903/master
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2903/master
.................................................................................................... .........................................
A word of note, in the States, it is rare if an ISP actually blocks common ports (21, 22, 25, 80 ...) even though there seems to be a lot of hysteria about that sort of thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.