LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2003, 06:46 PM   #1
sidkdbl07
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
Question closing port 25 using sendmail


I am installing a webserver with Gentoo (LAMP). I'm now finished installing everything and all is working great.

Upon pointing nmap at this box I noticed that sendmail was listening on port 25. I only require sendmail to send stuff out so is there a way to get sendmail to not listen on port 25?

Any ideas welcome.
 
Old 08-01-2003, 12:44 AM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
well if its not listening on port 25, then hows it going to send the mail, or is your actual question pertaining to changing it to a different port?
 
Old 08-01-2003, 02:00 AM   #3
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
as long as it is not listening on your external nic (the one connected to the Internet), no problems.

You can prevent that
1. by using iptables
2. /etc/mail/access (do not add the external IP address)
 
Old 08-01-2003, 11:32 AM   #4
sidkdbl07
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Original Poster
Rep: Reputation: 0
closing port 25

Adding the following line to sendmail.mc closed port 25 to an nmap scan

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

Any problems with this?
 
Old 08-02-2003, 04:01 AM   #5
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
u can use foll method to override the default smtp port setting.
In ur /etc/mail/sendmail.mc file add
DaemonOptions('port=999', Name='MTA')
and run m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

For detailed explaination read
/usr/share/sendmail{version}/README
 
Old 08-02-2003, 05:46 AM   #6
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Re: closing port 25

Quote:
Originally posted by sidkdbl07
Adding the following line to sendmail.mc closed port 25 to an nmap scan

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

Any problems with this?
This will allow sendmail to accept mails from the localhost only, ignoring mails from your network. Users on your network cannot use this mail server to send mails ... if that is what you are looking at.
 
  


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
Closing port 4000. gbowden Linux - Security 3 10-10-2005 12:04 PM
Advanced port closing azi Linux - Security 1 06-02-2004 04:53 PM
closing rpc3 port flubber Slackware 1 05-10-2004 02:55 PM
closing port 68/udp? antik Linux - Security 1 09-26-2003 01:26 PM
Closing port 111 psyklops Linux - General 3 05-01-2002 01:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration