LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 06-23-2005, 08:06 PM   #1
nevarlen
Member
 
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Rep: Reputation: 15
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...
 
Old 06-23-2005, 08:40 PM   #2
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 30
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.
 
Old 06-23-2005, 08:52 PM   #3
nevarlen
Member
 
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Original Poster
Rep: Reputation: 15
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..
 
Old 06-24-2005, 02:31 AM   #4
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 30
It actually sounds like Postfix is not even running.
 
Old 06-24-2005, 09:31 AM   #5
nevarlen
Member
 
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Original Poster
Rep: Reputation: 15
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.
 
Old 06-24-2005, 09:56 AM   #6
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
some clues

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.

Examples:

Default:
inet_interfaces = all

Host running virtual mailers:
inet_interfaces = virtual.host.tld (virtual domain)
inet_interfaces = $myhostname localhost.$mydomain (non-virtual mailer)

Note: you need to stop and start Postfix when this parameter changes.
 
Old 06-24-2005, 12:15 PM   #7
nevarlen
Member
 
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Original Poster
Rep: Reputation: 15
Dgar,
As fas as domain forwarding goes, no they do not point to each other.
dig fully.qualified.domain.name returns

;; QUESTION SECTION:
;www.mydomain.com. IN A
;; ANSWER SECTION:
www.mydoamin.com. 300 IN A 12.34.56.78

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..
 
Old 06-24-2005, 12:48 PM   #8
nevarlen
Member
 
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Original Poster
Rep: Reputation: 15
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.
 
Old 06-24-2005, 01:36 PM   #9
nevarlen
Member
 
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Original Poster
Rep: Reputation: 15
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
.................................................................................................... .........................................

Now, I can send/recieve email..
 
Old 06-24-2005, 03:40 PM   #10
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 30
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.
 
  


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
A quick question about ports & internal/external networks for webservers... jacksonscottsly Linux - Networking 2 07-10-2005 09:35 PM
quick question about ports jp-lack Slackware 6 07-09-2005 09:23 PM
Ports listening? dareino Linux - Networking 2 03-31-2004 08:40 AM
Listening SuSE 9 ports uniQ Linux - Security 9 01-24-2004 12:48 AM
XDM listening to ports tarballedtux Linux - Security 7 04-28-2002 05:25 AM


All times are GMT -5. The time now is 02:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration