I plan on flying soon, and I want to see if I can get free wifi on the flight. I want to scan the network for any open ports and see if I can connect to my VPS and set up a SOCKS5 proxy for my browser. Is there any way to scan the network I'm connected to see which ports are open? And once I do, how do I connect to my server through SSH on that port?
1 Answer
What I was looking for was nmap
. It lets me scan a network by just running nmap -A <IP of router or website>
where you then wait up to like 30 seconds and you get an output like
$ nmap -A askubuntu.com
Starting Nmap 7.01 ( https://nmap.org ) at 2017-12-27 21:22 EST
Nmap scan report for askubuntu.com (151.101.1.69)
Host is up (0.017s latency).
Other addresses for askubuntu.com (not scanned): 151.101.65.69
151.101.129.69 151.101.193.69
Not shown: 998 filtered ports
PORT STATE SERVICE VERSION
80/tcp open http-proxy Varnish
|_http-server-header: Varnish
|_http-title: Did not follow redirect to https://askubuntu.com/
443/tcp open ssl/http-proxy Varnish
| http-robots.txt: 77 disallowed entries (15 shown)
| /posts/ /posts? /amzn/click/ /questions/ask/
| /questions/ask? /search/ /search? /feeds/ /feeds? /users/login/
| /users/login? /users/logout/ /users/logout? /users/filter/
|_/users/filter?
|_http-server-header: Varnish
|_http-title: Ask Ubuntu
| ssl-cert: Subject:
commonName=*.stackexchange.com/organizationName=Stack Exchange,
Inc./stateOrProvinceName=NY/countryName=US
| Not valid before: 2016-05-21T00:00:00
|_Not valid after: 2019-08-14T12:00:00
|_ssl-date: TLS randomness does not represent time
Service detection performed. Please report any incorrect results at
https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 20.62 seconds
This is what I needed, so thanks me!
ssh user@hostname
not enough for some reason to test connectivity? For non-standard port numbers use the-p
option.