1755646 Members
3114 Online
108837 Solutions
New Discussion юеВ

Telnet 25 port

 
SOLVED
Go to solution
Carme Torca
Super Advisor

Telnet 25 port

Hi,

I want to know if it's possible to deny telnet to the port 25 at one server that works as a sendmail relay.

Thank-you very much!
Carmen.
Users are not too bad ;-)
18 REPLIES 18
Stefan Farrelly
Honored Contributor

Re: Telnet 25 port


Easily done, either in /etc/inetd.conf on the server you want to disable it comment out the line telnet and then do an inetd -c
OR
setup the /var/adm/inetd.sec file to block telnet only for certain IP adresses. See man on inetd.sec

Im from Palmerston North, New Zealand, but somehow ended up in London...
Carme Torca
Super Advisor

Re: Telnet 25 port

Yes... oh sorry... I have not explain me corretly. I want to deny the access to the 25 port to anyone, and I want to make it in one server that its working that sendmail relay.
Users are not too bad ;-)
Stefan Farrelly
Honored Contributor

Re: Telnet 25 port


To stop sendmail relaying mail thru port 25 you can simply stop sendmail on the server in question; /sbin/init.d/sendmail stop

Or you can add an entry to /var/adm/inetd.sec to block port 25 traffic for any or all IP addresses.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Animesh Chakraborty
Honored Contributor

Re: Telnet 25 port

Hi,
Not sure what you want..
Can you block port 25 in firewall ?


Thanks
Animesh
Did you take a backup?
Carme Torca
Super Advisor

Re: Telnet 25 port

Hi,

No, its not a Firewall, its the mail server.
I can make a telnet to the 25 port and send a mail directly, without connect to the application....and I want to resolve it.

I don't want to deny telnets that use the 23 port, only to the 25 port, that its use the smtp. But I want (at the same time) that all the mail works corretly.

Thank-you
Users are not too bad ;-)
Santosh Nair_1
Honored Contributor

Re: Telnet 25 port

I don't believe there's a way to disable telneting to port 25 without disabling the ability to receive mail. But if you're looking to secure your mail server, look into using postfix or qmail instead of sendmail.

http://cr.yp.to/qmail.html
http://www.postfix.org

-Santosh
Life is what's happening while you're busy making other plans
Marcin Wicinski
Trusted Contributor

Re: Telnet 25 port

Hi,

You cannot disable telneting to selected port (25) with standard HPUX procedures. Only by a firewall.

Later,
Marcin Wicinski
Joseph C. Denman
Honored Contributor

Re: Telnet 25 port

Comment out port 25 of the /etc/services file. Then restart inetd

/usr/sbin/inetd -c

Hope this helps.

...jcd...
If I had only read the instructions first??
Marcin Wicinski
Trusted Contributor

Re: Telnet 25 port

If you comment port 25 in /etc/servives, smtp protocol wont be available any more.
Marcin Wicinski