[Crossposting from SO]
I am trying to make a port scanner in Python and trying to list which all ports are accessible by anyone remotely.
Using the socket.connect_ex
package, I was able to check which all ports are open for my local machine to use, but couldn't find a way on how to check what all ports anyone on the internet can access on my machine.