No connectivity nc -u -z -w 3 8.8.8.8 54 && echo OK || echo failed failed With connectivity nc -u -z -w 3 8.8.8.8 53 && echo OK || echo failed OK
Centos 7: yum install nmap-ncat