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 have recently installed few packages for telnet, mysql and postgreSQL. I can access all these service locally on the ubuntu server but somehow I am not able to access these services from other machines. Below are the active internet connections using:

sudo netstat -tulpn 

tcp   0    0*    LISTEN      18776/inetd
tcp   0    0*    LISTEN      19451/mysqld
tcp   0    0*    LISTEN      8453/postgres

I am not able to figure out what I am missing. I am almost sure that I have configured these packages correctly to allow outside world connections.

When I am trying telnet from windows, I got "Could not open connection to the host, on port 23: Connect failed"

I doubt, my router might have blocked these connections but I don't know how to troubleshoot or unblock these connections. Please suggest, Many thanks!

share|improve this question
are you trying to access it from the local network or the internet ?? – Ahmed Daif Mar 4 '14 at 11:19
I am trying to access it from internet – kuri Mar 4 '14 at 14:23
Does your machine have a public IP or a local network IP ?? i.e, 192.168.x.x , 10.x.x.x , ... – Ahmed Daif Mar 5 '14 at 12:52
My machine has local network IP address i,e – kuri Mar 6 '14 at 15:29
up vote 0 down vote accepted

Your machine has a local IP address, if you want to access it from the internet you have to do a Static Port Mapping or Static Nating.

the best way to do that is from your router if it support static/custom port mapping by do the following

forward port 23 to 23

and then you can access your server from your public IP address.

these are sample images for the router configurations.

enter image description here enter image description here

also you can know your public IP from google or from your router.

share|improve this answer

Can try

nmap ip_address_of server

from cilent

also check firewall on server

sudo ufw status

share|improve this answer
22 DENY Anywhere 2222 ALLOW Anywhere 80 ALLOW Anywhere 25 ALLOW Anywhere 143 ALLOW Anywhere 110 ALLOW Anywhere 993 ALLOW Anywhere 995 ALLOW Anywhere 8080 ALLOW Anywhere 3306 ALLOW Anywhere 23 ALLOW Anywhere – kuri Mar 6 '14 at 15:43
above is the result of sudo ufw status. Sorry for bad formatting but I don't understand how this damn thing works. I tried using two spaces at the end of each line also using linebreaks <br/> – kuri Mar 6 '14 at 15:45
ok, port 23 is for telnet. Is open. If I understand you try to connect to server and server and pc on same lan? If not, and traffic flow is pc -> router -> internet -> router -> server, you must add port forwarding rule to router on server side. – 2707974 Mar 6 '14 at 20:02
@2707974 has a point. If you are using a xDSL modem/router, then look in the setup for something like "virtual servers" or "port forwarding" and create a rule for each one of your servers. Also for postgres make sure that the sever is configured to listen for external TCP/IP connections. The default is to listen only to localhost for security reasons. Read here for more information. – hmayag Mar 8 '14 at 0:22
Thanks 2707974 and hmayag. Suggestion to add port forwarding rule in router, works :) – kuri Mar 9 '14 at 11:57

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.