Difference between revisions of "Checking ports with netcat"

From thelinuxwiki
Jump to: navigation, search
(Pushed from thelinuxwiki.com.)
 
(checking tcp ports)
Line 16: Line 16:
 
examplehostname [192.168.1.1] 80 (http) open
 
examplehostname [192.168.1.1] 80 (http) open
  
~% '''nc -vzu 192.168.1.1 80'''
+
~% '''nc -vz 192.168.1.1 80'''
  
 
examplehostname [192.168.1.1] 80 (http) : Connection refused
 
examplehostname [192.168.1.1] 80 (http) : Connection refused

Revision as of 07:50, 11 December 2013

checking udp ports

~% nc -vzu 192.168.1.1 53

examplehostname [192.168.1.1] 53 (domain) open

~% nc -vzu 192.168.1.1 54

examplehostname [192.168.1.1] 54 (?) : Connection refused

checking tcp ports

~% nc -vz 192.168.1.1 80

examplehostname [192.168.1.1] 80 (http) open

~% nc -vz 192.168.1.1 80

examplehostname [192.168.1.1] 80 (http) : Connection refused ~