For instance, SQL Server listens, by default on port 1433. (NOTE: Best practice for server hardening is to change the default instance name and port)
To test this, I'd been using a clunky old port scanner that I wasn't happy with.
I therefore googled and found this excellent blog post by jblanchard.
The portion that I actually use is this:
PowerShell port scanner:
1..1024 | % {echo ((new-object Net.Sockets.TcpClient).Connect("10.0.0.100",$_)) "Port $_ is open!"} 2>$null
I usually change the first bit to 1433 (or whatever specific port I want to check )
1433 | % {echo ((new-object Net.Sockets.TcpClient).Connect("Myserver.MyDomain.com",$_)) "Port $_ is open!"} 2>$null
No comments:
Post a Comment