network

nslookup – shows the IP address of a domain
whois <domain> – get whois information for domain
dig <domain> – get DNS information for domain
dig -x host – reverse lookup host
traceroute – traces the route between the local and distant machine
telnet – performs a telnet

 

netstat – shows all current network connections.
netstat -a – List all ports
netstat -an – shows all connections to the server, the source and destination ips and ports.
netstat -at – List all tcp ports
netstat -au – List all udp ports
netstat -l – List only listening ports
netstat -lt – List only listening TCP Ports
netstat -lu – List only listening UDP Ports
netstat -lx – List only the listening UNIX Ports
netstat -s – Show statistics for all ports
netstat -st – Show statistics for TCP ports
netstat -su – Show statistics for UDP ports
netstat -rn – shows routing table for all ips bound to the server.
netstat -tupln – shows all the ports that are open
netstat -ap | grep ssh – Find out on which port a program is running
netstat -an | grep ‘:80’ – Find out which process is using a particular port

Edit the Hostname

Sysconfig/Network

cat /etc/sysconfig/network
vi network
Press i on the keyboard and change the HOSTNAME to your preferred servername
HOSTNAME=myserver.domain.com
Press ESC on the keyboard
Save the configuration by :wq!

Host File

cat /etc/hosts

127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
109.169.36.211 chainwp1.easydservers.com chainwp1

vi /etc/hosts
Press ESC on the keybord
Save the configuration by :wq!

Run Hostname

hostname hostname.domain.com
hostname

Restart Networking

/etc/init.d/network restart