Another way to get detailed IP address information and control the Windows Firewall by a command line

You’ve probably used IPConfig to get your IP address and have even used IPConfig /all.   So what is another way to see your configuration?

netsh interface ip show config

This command gives your NIC card information

What if you wanted to open a port quickly on your client computers?  You can write a quick script and use -

netsh firewall set portopening tcp 445 smb enable    (Replace the 445 with the port number you need to open)

What rules have you set on your firewall?
netsh advfirewall firewall show rule name=all

The rules will ‘fly’ by so you can use the following command to ‘capture’ all of the rules to a text file
netsh advfirewall firewall show rule name=all >c:\text\firewallrules.txt

Or you can use these to turn it on or off -
netsh advfirewall set allprofiles state on
netsh advfirewall set allprofiles state off

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s