1

I can not connect any mail server using telnet through 25 port. I can connect with any web-server using 80 port.So i searched for my open port

sudo nmap -sS -p 20-2550 localhost

It shows:

Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000060s latency).
Not shown: 2524 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
23/tcp  open  telnet
80/tcp  open  http
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds
631/tcp open  ipp
902/tcp open  iss-realsecure

No 25 port open. When i try to connect with mail-server it just timeout. How could i enable telnet 25 port. Thanks in advance

shantanu
  • 8,599
  • what are you trying to do??? telnet port seems ok, do you want to change it? – Bruno Pereira Oct 30 '11 at 20:11
  • Did you install a mail server? There is no mail server installed by default, so nothing is listening on port 25 of localhost. – elmicha Oct 30 '11 at 21:58
  • i am trying to connect gmail mail-server or hotmail mail-server. Finding mail-server address using nslookup -q=mx hotmail.com – shantanu Oct 31 '11 at 03:40

1 Answers1

2

Port 25 is used for SMTP, for sending mails which is different from receiving mails using POP3 or IMAP. To check if something is listening on port 25, use sudo netstat -tunlp (TCP, UDP, numeric addresses, listening services, show programs (for which you need sudo)). If the output is large, try filtering it by appending | grep :25 so it becomes sudo netstat -tunlp | grep :25.

If you're trying to telnet to external servers or network IP's, be sure that the router or your provider does not block port 25. Here, the Dutch ISP KPN blocks port 25 which will make your requests go into /dev/null (hence the timeout).

Lekensteyn
  • 174,277