[Linux] Verifying Network Connection
less than 1 minute read
Verifying Network Connection
Telnet
apt-get update -y && apt-get install telnet
#telnet {ip} {port}
telnet naver.com 80
Netstat
-a
: Shows all current active TCP connections and the ports on which the computer is listening.
-r
: Displays the routing table for your computer. This is the same as using the route print command.
-n
: Display active network connections and their status without resolving hostnames or port names.
-t
: shows tcp protocol
-u
: shows udp protocol
-p
: Display all active connections for the specified protocol. The protocols can be TC, UDP, ICMP, and IP.
apt-get update -y && apt-get install net-tools
# see whether port is in use
netstat -an | grep {port}
# shows port and program listening to TCP
netstat -nlpt