Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 (
Host is up (0.0000060s latency).
Not shown: 2524 closed ports
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

share|improve this question
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 – shantanu Oct 31 '11 at 3:40
up vote 2 down vote accepted

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).

share|improve this answer
nothing is listening on 25 port. I am using Banglalion Wimax. – shantanu Oct 31 '11 at 3:44
A quick Google make me believe that your provider sucks and that blocking port 25 is one of their restrictions. – Lekensteyn Oct 31 '11 at 8:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.