port scan code example

Example 1: port range

Port numbers can run from 0 to 65353. Port numbers from 0 to 1023 are reserved 
for common TCP/IP applications and are called well-known ports. The use of 
well-known ports allows client applications to easily locate the corresponding 
server application processes on other hosts.

Example 2: port forward

1. Find Your public address, google whats my IP. remember this address
2. Connect to your router, Insert your routers ip in a browser (192.168.0/1.1)
And login in.
3. openning a port, go to the tap "portforward" (depends on the router).
type desired internal port (example: 5555) 
and the external port, is the one you want to communicate with from everywhere
The external depends on the application, siemens plc is 102, wago plc is 2455
cameras are normally 443/80.
and then the ip adress on the LAN of the device u want to connect to.
And desired package transport TCP or UDP
4. connect to your device. go to the remote location, type in your public IP + port
example (199.199.1.20:5555) to connect to your desired external port on your LAN

Tags:

Misc Example