天天看點

計算機網絡Netsh,netsh指令詳解(netsh指令詳解).doc

netsh指令詳解(netsh指令詳解)

netsh指令詳解(netsh指令詳解)

1、netsh add helper ipmontr.dll 在 netsh 中安裝指定的幫助者 dll

delete helper - 删除一個幫助者 dll.

2、netsh advfirewall 與 netsh advfirewall netsh firewall firewall 指令行上下文位于在 windows server 2008 and windows vista 中 和. 此上下文提供的功能來控制 防火牆 上下文早期 netsh firewall windows 作業系統中提供的行為.未來版本的 windows 作業系統中, 可能會被棄用 netsh firewall 指令行上下文 我們建議您使用 netsh 上下文控制防火牆行為 advfirewall firewall.

the 常用的 netsh advfirewall firewall rule.

指令 consec (連接配接安全規則)

這個連接配接規則可以讓你建立兩個系統之間的ipsec vpn.換句話說, consec規則能夠讓你加強通過防火牆的通信的安全性, 而不僅僅是限制或過濾它.

這個指令會将你帶入到連接配接安全配置模式, 如下所示.

netsh consec advfirewall.

netsh advfirewall consec.

現在如果你鍵入 "? "指令的話, 你将會在netsh advfirewall consec中看到六個不同的指令 (見圖2).

從這兒你可以看到你可以通過以下指令來修改安全規則.

此上下文中的指令.

·add指令可以讓你添加新連接配接安全規則.

·delete指令讓你删除所有比對的連接配接安全規則.

·dump指令顯示一個配置腳本.

·help可以顯示指令清單.

·set指令讓你為現有規則的屬性設定新值.

show指令

要想檢視防火牆現在的狀況, 你将必須使用這個show指令, 再其下提供三個不同的指令可用.

·show alias為你列出所有定義的别名.

·show helper列出所有頂層幫助者.

·show mode指令可以鋼珠你顯示防火牆是線上還是離線.

export指令

這個指令可以讓你導出防火牆目前的所有配置到一個檔案中.這個指令非常有用, 因為你可以備份所有的配置到檔案中, 如果你對已經作出的配置不滿意的話, 可以随時使用這個檔案來恢複到修改前的狀态.

以下是一個應用示例.

netsh advfirewall export "c: \ advfirewall.wfw"

firewall指令

使用這個指令你可以增加新的入站和出站規則到你的防火牆中.它還可以讓你修改防火牆中的規則.

在firewall上下文指令中, 你會看到四個重要的指令, 分别是.

·add指令讓你增加入站和出站規則.

·delete指令讓你删除一條規則.

·set指令為現有規則的屬性設定新值.

Show command will display a specified firewall rules.

The following is to add and delete a firewall rule example:

Add a messenger.exe for inbound rules

Netsh advfirewall firewall add rule name= "allow messenger dir=in" program= "c:\programfiles\messenger\msmsgs.exe" action=allow

Delete for all into the local port 21 rules:

Netsh advfirewall firewall delete name rule name=all protocol=tcp localport=21

The Import command

The Import command allows you to import a file from the firewall configuration. This command allows you to configure a firewall to before you use the export command to export again back. The following example:

Netsh advfirewall import c:\advfirewall.wfw ""

Reset

This command allows you to set up a firewall strategy to default policy state. Whe