how to limitate the open ports code example
Example 1: how to check for open ports in windows
netstat -an
Example 2: software for checking open ports of IP
There are lots of software you may find for this but the software which are mostly used to scan the ip and ports
i.e.
1) Nmap
2) Advance Ip Scanner