Posts Tagged ‘traceroute’

Linux Network Configuration

# system-config-network
# redhat-config-network
# vi /etc/resolve.conf
# vi /etc/hosts
# /sbin/ifconfig eth0 192.168.10.120 netmask 255.255.255.0 broadcast 192.168.10.255

# /etc/init.d/network restart

ifup – bring a network interface up

ifdown – take a network interface down

system-config-network-screen

system-config-network_Devices-Edit-General

system-config-network_SetHostnameDNS

system-control-network

No route to host

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
192.168.0.100 webserviceserver

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

Ping other servers like
# ping google.com
# wget http://www.google.com

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 webserviceserver.com 8080
webserviceserver.com [192.168.0.100] 8080 (www) : No route to host

# telnet 192.168.0.100 8080 (working?)

# traceroute http://www.webserviceserver.com (working?)

# ping http://www.webserviceserver.com (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 webserviceserver.com 8078

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

Make alternate port for network connection 🙂