Check for open ports on computer
1. Linux
Create a file on console steps below
---------------------------
$ nano portscan.sh
--------------------------------
#!/bin/bash
nmap -sS -O ip.address.off.the.server
Save the file
$chmod 777 portscan.sh
------------------------------------------------------------------
Basically you can just run the command much simpler $ nmap -sS -O ip.address.off.the.server
It will output
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
1241/tcp open nessus
-----------------------------------------------------------------
--- the scanning is for open ports since all ports are closed in linux ---
in windows create a batch file c:\>copy con portscan.bat
paste inside: netstat -a | find "LISTENING"
save the file
-- NOTE THIS IS if you are inside the machine ---
Create a file on console steps below
---------------------------
$ nano portscan.sh
--------------------------------
#!/bin/bash
nmap -sS -O ip.address.off.the.server
Save the file
$chmod 777 portscan.sh
------------------------------------------------------------------
Basically you can just run the command much simpler $ nmap -sS -O ip.address.off.the.server
It will output
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
1241/tcp open nessus
-----------------------------------------------------------------
--- the scanning is for open ports since all ports are closed in linux ---
in windows create a batch file c:\>copy con portscan.bat
paste inside: netstat -a | find "LISTENING"
save the file
-- NOTE THIS IS if you are inside the machine ---
Comments