PowerShell code snippet to check or test whether a port is
open or closed on the IP Address specified.
==============================
$port_num= "2443"
$port_num= "2443"
$IP_Add="192.168.2.1"
$result = New-Object Net.Sockets.TcpClient $IP_Add,
$port_num
if($result.Connected)
{
write-host
"Port 443 is open."
$result.close()
}
else
{
write-host
"Attempt to connect failed, check firewall or other settings."
}
==============================
If port 2443 is open in IP Address 192.168.2.1 then PowerShell
script will show "Port 443 is open."
If port 2443 is close the script will show "Attempt to
connect failed, check firewall or other settings."
If the port is closed it could be that the firewall is not
set to accept incoming connections for the particular port.
Do not set firewall settings to open any port if it is not
necessary to do it.
If the service or application that is using the port is not
operational anymore then close the port that was used by the application or
service. Close any unused port to limit the footprint of security issue.
If the server is facing the internet, opening a port would
mean that it will accept incoming connections from any server or computer from
the internet.
Cheers.. Hope it helps..
==================
Free Android Apps:
Click on links below to find out more:
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
https://play.google.com/store/apps/details?id=com.myrosaryapp
http://quickbytesstuff.blogspot.sg/2014/09/how-to-recite-rosary.html
Divine Mercy Chaplet Guide (A Powerful prayer):
https://play.google.com/store/apps/details?id=com.dmercyapp
Educational Android App for Kids:
https://play.google.com/store/apps/details?id=com.xmultiplication
https://play.google.com/store/apps/details?id=com.letsmultiply
==================
Free Android Apps:
Click on links below to find out more:
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
https://play.google.com/store/apps/details?id=com.myrosaryapp
http://quickbytesstuff.blogspot.sg/2014/09/how-to-recite-rosary.html
Divine Mercy Chaplet Guide (A Powerful prayer):
https://play.google.com/store/apps/details?id=com.dmercyapp
Educational Android App for Kids:
https://play.google.com/store/apps/details?id=com.xmultiplication
https://play.google.com/store/apps/details?id=com.letsmultiply
Comments
Post a Comment