| 1. |
How To Check Open Ports On A Remote Server Without Netcat Or Nmap Linux Command? |
|
Answer» In the work of sysadmin, we can sometimes want to check open ports on our remote SERVER. But if we are on a machine where can not install nmap or we don't have the possibility to install a tool which can help us to check open ports, what COULD we do? We can check it with bash using /dev/tcp or /dev/udp to open a TCP or UDP CONNECTION to the associated socket. The command behavior is: $ echo > /dev/tcp/$host/$port we can associate a message to display if the port is OPENED $ echo > /etc/tcp/8.8.8.8/53 && echo "OPEN PORT" OPEN PORT $ echo > /dev/tcp/8.8.8.8/80 && echo "GOOD" || echo "NOT OPEN" -bash: connect: Connection TIMED out -bash: /dev/tcp/8.8.8.8/80: Connection timed out NOT OPEN In the work of sysadmin, we can sometimes want to check open ports on our remote server. But if we are on a machine where can not install nmap or we don't have the possibility to install a tool which can help us to check open ports, what could we do? We can check it with bash using /dev/tcp or /dev/udp to open a TCP or UDP connection to the associated socket. The command behavior is: $ echo > /dev/tcp/$host/$port we can associate a message to display if the port is opened $ echo > /etc/tcp/8.8.8.8/53 && echo "OPEN PORT" OPEN PORT $ echo > /dev/tcp/8.8.8.8/80 && echo "GOOD" || echo "NOT OPEN" -bash: connect: Connection timed out -bash: /dev/tcp/8.8.8.8/80: Connection timed out NOT OPEN |
|