No route to host

21 Feb

Often, when we get error “No route to host” to connect remote server via linux command line e.g. wget, curl etc. or web services (webserviceserver).

The first solution we want to try to troubleshot firewalls and proxies?

But before that try hostname entry in linux box…

# vi /etc/hosts
add & save webserviceserver

If still experienced the issue when deploying code from development machine to a live server.

Ping other servers like
# ping
# wget

If ping & wget working for google means the webserviceserver have some block or restrictions to calling servers.

Make sure with several linux network utilities

# nc 8080 [] 8080 (www) : No route to host

# telnet 8080 (working?)

# traceroute (working?)

# ping (working?)

Make sure firewall is not blocking your access:
# /sbin/iptables -L -n
# /etc/init.d/iptables save
# /etc/init.d/iptables stop

# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X

Make sure we are using a router and not a proxy server. Proxy servers are good for Internet browsing but not for ftp, sending ICMP request and so on.

Try on alternate port..
# nc 8078

If this is working then we have to use alternate port for the server “”

Make alternate port for network connection 🙂


Tags: , , , , , ,

2 responses to “No route to host


    October 21, 2010 at 9:35 am

    Hi, this article is so good. Could i use these informations for my blog?. Greetings from the Speedy DNS.

  2. J (Encrypted Flash Drive Guy)

    February 24, 2011 at 9:58 am

    First of all the flying twitter bird you make on your blog is really awesome. I have checked all mail servers and their comparisons but I think PowerMTA is the most effective server in terms of security and customers’ communications. It provides much more features than others.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: