-->
  • Recent Articles

    How to Fix “No route to host” Error in Linux

    While doing troubleshooting for a communication issue with telnet , i encountered following error "telnet: connect to address : No route to host". In this article we will show how to troubleshoot and fix this error.

    Error:

    no route to host
    no route to host

    There are different reasons why this error appears. The first is normally that the remote server could be down, so you need to check whether it is up and running using the ping command.

    # ping 10.x.x.x

    From the ping command gives you a response, the server is up and running. In my case we have blocked ICMP requests in the Network. So you can check that in your security list or firewall.

    If you have a firewall service running on your remote server, it is possible that the firewall is blocking access to that port.

    Then use the firewall-cmd (RHEL/CentOS/Fedora) or UFW (Debian/Ubuntu) to open port 7100 in the firewall as follows.

    # firewall-cmd --permanent --add-port=7100/tcp
    # firewall-cmd --reload
    OR
    # ufw allow 7100/tcp
    # ufw reload 
    


    CentOS 6 / RHEL 6 / OEL 6

    If you are using iptables on CentOS 6 / RHEL 6 / OEL 6, you can open port 7100 using following command.

    # iptables -R INPUT 5 -p tcp -m state --state NEW -m tcp --dport 7100 -m comment --comment "Required for access to application" -j ACCEPT

    Then Save and reload the Service.

    # service iptables save
    # service iptables reload

    No comments