Using telnet
:
- Open the terminal on your Linux system.
- Type
telnet <IP address> <port number>
and press Enter. Replace<IP address>
with the IP address of the server you want to test, and<port number>
with the port number you want to test. - If the port is open, you will see a message like "Connected to <IP address>."
- If the port is not open, you will see an error message like "Unable to connect to remote host: Connection refused."
Using nc
:
- Open the terminal on your Linux system.
- Type
nc -zv <IP address> <port number>
and press Enter. Replace<IP address>
with the IP address of the server you want to test, and<port number>
with the port number you want to test. - If the port is open, you will see a message like "Connection to <IP address> <port number> port [tcp/<service_name>] succeeded!"
- If the port is not open, you will see an error message like "nc: connect to <IP address> port <port number> (tcp) failed: Connection refused."
- Protocol
- IP address
- Subnet
- Gateway
- DNS
- DHCP
- Router
- NAT
- Firewall
- Port
- TCP
- UDP
- Routing
- Network
- Internet