Skip to content

Windows: Firewall netsh

cpx April 6, 2010 1 min read MSWindows (MSFT)

netsh firewall

show allowedprogram Displays the allowed programs. show config Displays the detailed local configuration information. show currentprofile Displays the current profile. show icmpsetting Displays the ICMP settings. show logging Displays the logging settings. show opmode Displays the operational mode. show portopening Displays the excepted ports. show service Displays the services. show state Displays the current state information. show notifications Displays the current settings for notifications.

netsh interface ip dump >netsh-config.txt

set dns name=”Local Area Connection” source=static addr=129.100.2.12

add dns name=”Local Area Connection” addr=129.100.2.51

netsh -f c:\netsh-config.txt

 

How to: Setup DNS with netsh on windows from cmd

netsh interface show interface

Once you know the interface name setup the dns

netsh interface ipv4 add dnsserver "Local Area Connection" address=8.8.8.8 index=1

 

 

Be the first to comment

protected · no tracking

0 comments