LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   smtp from netstat command (https://www.linuxquestions.org/questions/linux-networking-3/smtp-from-netstat-command-573742/)

pipesbi 07-31-2007 02:27 PM

smtp from netstat command
 
Hello all!
I"m not a Linux/Network expert obviously, that's why I'm asking this question.

I'm trying to shutdown port 25 (smtp) on my Suse 10 system. I'm okay with it listening locally, but, don't want smtp listening for external requests. When running netstat I get *:* after smtp is this listening for requests locally only?

What I get;
tcp 0 *:smtp *:* listen


Thanks,

acid_kewpie 07-31-2007 03:54 PM

this isn't anything to do with networking per se.. just stop the smtp server opening that port in the first place... you've not said a single thing about what service you're running so we can't really comment any further.

The_Dude 07-31-2007 05:14 PM

Quote:

Originally Posted by pipesbi
Hello all!
I"m not a Linux/Network expert obviously, that's why I'm asking this question.

I'm trying to shutdown port 25 (smtp) on my Suse 10 system. I'm okay with it listening locally, but, don't want smtp listening for external requests. When running netstat I get *:* after smtp is this listening for requests locally only?

What I get;
tcp 0 *:smtp *:* listen


Thanks,

It is a good thing what your are trying to do. You don't mention what smtp software you are running. Most SysVR4 wannabe's usually have sendmail, so, in your sendmail.mc file find the line that says:

DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl

and change it to,

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

and save sendmail.mc

If you have all the utilities that came with sendmail installed, then you can do the following, in the directory that you have the sendmail.mc file, type:

#./Build sendmail.cf

This creates a new sendmail.cf file. Copy the file to /etc/mail/ and restart sendmail. When you do a

netstat -al

you should see

tcp 0 localhost:smtp *:* listen

If you don't want it running at all then:

chkconfig --levels 2345 sendmail off

and then

service sendmail stop

This way, if you reboot, the sendmail daemon will be turned off.

much love,

The Dude


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