Advertisement
codegazer

check DNS ports accessible with nmap

Oct 6th, 2024
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1.  
  2. # Subject: example of checking port accessibility for 53/tcp and 53/udp to confirm nameserver active
  3. # Date: Sun 6 Oct 18:48:39 BST 2024
  4.  
  5. Introduction:
  6.  
  7. Example of how to check for active DNS ports 53/tcp and 53/udp on nameserver using nmap
  8.  
  9.  
  10. Commands:
  11.  
  12. my_bind_nameserver_IP_address=192.168.1.53 ##LOCAL change this to your nameserver's IP address
  13.  
  14. nmap -Pn -p53 ${my_bind_nameserver_IP_address} # test if 53/tcp accessible
  15.  
  16. /bin/sudo nmap -Pn -p53 -sU ${my_bind_nameserver_IP_address} # test if 53/udp accessible
  17.  
  18.  
  19.  
  20. Example:
  21.  
  22.  
  23. [user@localhost ~]$ my_bind_nameserver_IP_address=192.168.1.53 ##LOCAL change this to your nameserver's IP address
  24.  
  25. [user@localhost ~]$ nmap -Pn -p53 ${my_bind_nameserver_IP_address} # test if 53/tcp accessible
  26. Starting Nmap 7.95 ( https://nmap.org ) at 2024-10-06 18:35 BST
  27. Nmap scan report for nameserver.home (192.168.1.53)
  28. Host is up (0.00030s latency).
  29.  
  30. PORT STATE SERVICE
  31. 53/tcp open domain
  32.  
  33. Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
  34.  
  35. [user@localhost ~]$ /bin/sudo nmap -Pn -p53 -sU ${my_bind_nameserver_IP_address} # test if 53/udp accessible
  36. Starting Nmap 7.95 ( https://nmap.org ) at 2024-10-06 18:35 BST
  37. Nmap scan report for nameserver.home (192.168.1.53)
  38. Host is up (0.00018s latency).
  39.  
  40. PORT STATE SERVICE
  41. 53/udp open domain
  42. MAC Address: 00:1A:6B:4D:C5:35 (Universal Global Scientific Industrial)
  43.  
  44. Nmap done: 1 IP address (1 host up) scanned in 0.41 seconds
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement