Is it possible to check that if the ports are open for the remote system on ubuntu server?
I should able to check if a port(eg:ssh) on my machine is open for the remote machine.
|
Is it possible to check that if the ports are open for the remote system on ubuntu server? I should able to check if a port(eg:ssh) on my machine is open for the remote machine. |
||||
|
|
|
use good old telnet:
this is a successful attempt. An unsuccessful one should look like this;
or with nmap
|
|||||||||
|
|
Use NMAP. Example:
You can use IP address in place of domain name. Here is the full documentation: http://nmap.org/book/man.html |
|||||||
|
|
For a script, I use something like the following:
The return value tells you whether the port is open! |
|||
|
|
|
This is simple as :
|
|||
|
|
|
From this StackOverflow answer:
|
||||
|
|
|
Telnet will only work for TCP services, so if you're trying to see if your DHCP server (UDP/68) is running on a remote machine it won't work. Likewise nmap defaults to only scanning TCP ports. For UDP ports use:
|
|||
|
|