ref.
https://www.fosslinux.com/35730/5-ways-to-check-if-a-port-is-open-on-a-remote-linux-pc.htm
$ nc -zvw10 192.168.0.1 22
$ nmap 192.168.0.2 -p 103
$ telnet [IP or Hostname] [PortNumber]
echo > /dev/tcp/[host]/[port] && echo "Port is open"
echo > /dev/udp/[host]/[port] && echo "Port is open"
netstat -tuplen
netstat -tuplen will output the whole list of the IP addresses. The entries that have “Listen” in the “State” column are the open ports.
Note for OpenVPN (port 1194) you need to run nmap like so `nmap -sU -p 1194 yourserver`
ReplyDelete