I often use it to detect the remote Windows Server IP address, because it is not a fixed IP address, the server's IP address will often change, but there is a rule, only within a network segment changes, so that the determination of IP address to bring convenience.
1. If Nmap is not installed, install
Yum Install-y Nmap
2. Scan the Remote Desktop Connection port for the specified network segment
nmap-st-p3389 218.206.112.0/24
3. If you feel the output is too much, you can use the grep command to filter
nmap-st-p3389 218.206.112.0/24 | GREP-B2 Open
Here is the operation of the message record, for future reference.
Copy Code code as follows:
[Root@node18 opt]# Nmap
-bash:nmap:command not found
[Root@node18 opt]# Yum install-y nmap
...
[Root@node18 opt]# nmap-st-p3389 218.206.112.0/24
Starting Nmap 4.11 (http://www.insecure.org/nmap/) at 2012-10-26 15:36 CST
Interesting ports on 218.206.112.1:
PORT State SERVICE
3389/TCP closed Ms-term-serv
Interesting ports on 218.206.112.11:
PORT State SERVICE
3389/tcp Filtered Ms-term-serv
...
[Root@node18 opt]# nmap-st-p3389 218.206.112.0/24 | GREP-B2 Open
Interesting ports on 218.206.112.100:
PORT State SERVICE
3389/TCP Open Ms-term-serv
--
Interesting ports on 218.206.112.132:
PORT State SERVICE
3389/TCP Open Ms-term-serv
[Root@node18 opt]#