Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'am using Centos 6.5 with latest updates.

My problem is that whenever i try to connect to some local service it just hangs for example:


--2014-03-11 12:43:42--
Connecting to
After a while timeout...


# ssh -p 6060 -v
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to [] port 6060.
debug1: connect to address port 6060: Connection timed out
ssh: connect to host port 6060: Connection timed out

and it hangs out to timeout.

Same with telnet, and same with connecting to irc server. External connections are running fine...

netstat -tpln

# netstat -tpln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0      *                   LISTEN      589/sendmail        
tcp        0      0    *                   LISTEN      520/sshd            
tcp        0      0        *                   LISTEN      619/nginx           
tcp        0      0        *                   LISTEN      478/sshd            
tcp        0      0 ::1:6060                    :::*                        LISTEN      520/sshd            
tcp        0      0 :::22                       :::*                        LISTEN      478/sshd            

netstat -rn

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     U         0 0          0 venet0         U         0 0          0 venet0


I arleady flush out iptables, without luck. Output form iptables:

# iptables -nvL
Chain INPUT (policy ACCEPT 634 packets, 49819 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 517 packets, 47027 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Loopback config

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    inet scope host venet0
    inet brd scope global venet0:0

Turning of SELinux didn't improve it with anything.

ip route show table local

# ip route show table local
local dev venet0  proto kernel  scope host  src 
broadcast dev venet0  proto kernel  scope link  src 
broadcast dev lo  proto kernel  scope link  src 
broadcast dev lo  proto kernel  scope link  src 
local dev lo  proto kernel  scope host  src 
local dev lo  proto kernel  scope host  src 


# traceroute
traceroute to (, 30 hops max, 60 byte packets
 1  localhost.localdomain (  0.029 ms  0.014 ms  0.012 ms


works ok

# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from icmp_seq=2 ttl=64 time=0.036 ms

The weirdest thing about it is that, i can connect to ssh, nginx server from external address (for ex. computer from which i ssh'ing) without problems.

This happens after ISP has rebooted my server. Thing that maybe useful is that, server was frequently updated without reboots.

share|improve this question
oh, By the way , loop back configuration is set? , test with ip a or ifconfig. –  PersianGulf Mar 11 '14 at 9:59
Yup is set, or I badly read output. –  badray Mar 11 '14 at 10:16
@badray, you have change ip configuration last time using ifconfig and the changes has not been saved, what gives a tracert ? –  Kiwy Mar 11 '14 at 10:44
@badray please edit your question instead of copying things in past bin, it's ok to have a miles long quesiton if the information is important. and yes you"re right traceroute not tracert. What ping gives you ? –  Kiwy Mar 11 '14 at 11:20
@Kiwy Ok, done as you requested. Copied whole outputs to question. Ping works great. Just added it to question. –  badray Mar 11 '14 at 11:25

2 Answers 2

I had the exact same issue that you describe. I was unable to connect to any listening ports on the host from local but could connect when remote.

The solution for me was to bring the lo interface back up which was down for some reason and not coming up on boot.

ifconfig lo up

After bringing the interface back up and confirming that I could see the lo interface with...

ifconfig -a

I was able to get on with my day... :)

I noticed that when running ip a that I didn't see assigned to the lo: interface. This is what clued me in on the fact that I needed that interface to be running as well...

share|improve this answer

According to the ifconfig output you've posted, you have the loopback address set on two interfaces.


ip addr del dev venet0

and see if your loopback access is restored.

share|improve this answer
Now it look likes: Connections does not work either. –  badray Mar 11 '14 at 10:27
Please add the contents of your routing table (netstat -rn). –  Flup Mar 11 '14 at 10:28
Here you are: –  badray Mar 11 '14 at 10:29
@Kiwy i added always pastebin links with outputs, becouse i'am better developer than sysadmin, and I'm not always sure that i properly read the output. EDIT: after reasearch netstat -rn shouldnt print localhost route. ip route show table local should, and it does, so this is not the case. –  badray Mar 11 '14 at 10:48

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.