win防火墙禁止访问php文件,windows通过netsh设置防火墙
netsh advfirewall firewall>add rule
提供的許多參數無效。請查看幫助獲取正確語法。
用法: add rule name=
dir=in|out
action=allow|block|bypass
[program=]
[service=|any]
[description=]
[enable=yes|no (default=yes)]
[profile=public|private|domain|any[,…]]
[localip=any|||||]
[remoteip=any|localsubnet|dns|dhcp|wins|defaultgateway|
||||]
[localport=0-65535|[,…]|RPC|RPC-EPMap|IPHTTPS|any (default=any)]
[remoteport=0-65535|[,…]|any (default=any)]
[protocol=0-255|icmpv4|icmpv6|icmpv4:type,code|icmpv6:type,code|
tcp|udp|any (default=any)]
[interfacetype=wireless|lan|ras|any]
[rmtcomputergrp=]
[rmtusrgrp=]
[edge=yes|deferapp|deferuser|no (default=no)]
[security=authenticate|authenc|authdynenc|authnoencap|notrequired
(default=notrequired)]
備注:
– 將新的入站或出站規則添加到防火墻策略。
– 規則名稱應該是唯一的,且不能為 "all"。
– 如果已指定遠程計算機或用戶組,則 security 必須為
authenticate、authenc、authdynenc 或 authnoencap。
– 為 authdynenc 設置安全性可允許系統動態協商為匹配
給定 Windows 防火墻規則的通信使用加密。
根據現有連接安全規則屬性協商加密。
選擇此選項后,只要入站 IPSec 連接已設置安全保護,
但未使用 IPSec 進行加密,計算機就能夠接收該入站連接的第一個 TCP 或
UDP 包。
一旦處理了第一個數據包,服務器將重新協商連接并對其進行升級,以便所
有后續通信都完全加密。
– 如果 action=bypass,則 dir=in 時必須指定遠程計算機組。
– 如果 service=any,則規則僅應用到服務。
– ICMP 類型或代碼可以為 "any"。
– Edge 只能為入站規則指定。
– AuthEnc 和 authnoencap 不能同時使用。
– Authdynenc 僅當 dir=in 時有效。
– 設置 authnoencap 后,security=authenticate 選項就變成可選參數。
示例:
為不具有封裝的 messenger.exe 添加入站規則:
netsh advfirewall firewall add rule name="allow messenger"
dir=in program="c:\programfiles\messenger\msmsgs.exe"
security=authnoencap action=allow
為端口 80 添加出站規則:
netsh advfirewall firewall add rule name="allow80"
protocol=TCP dir=out localport=80 action=block
為 TCP 端口 80 通信添加需要安全和加密的入站規則:
netsh advfirewall firewall add rule
name="Require Encryption for Inbound TCP/80"
protocol=TCP dir=in localport=80 security=authdynenc
action=allow
為 messenger.exe 添加需要安全的入站規則:
netsh advfirewall firewall add rule name="allow messenger"
dir=in program="c:\program files\messenger\msmsgs.exe"
security=authenticate action=allow
為 SDDL 字符串標識的組 acmedomain\scanners 添加
經過身份驗證的防火墻跳過規則:
netsh advfirewall firewall add rule name="allow scanners"
dir=in rmtcomputergrp= action=bypass
security=authenticate
為 udp- 的本地端口 5000-5010 添加出站允許規則
Add rule name="Allow port range" dir=out protocol=udp localport=5000-5010 action=allow
netsh advfirewall firewall>
更多參考資料: http://technet.microsoft.com/zh-cn/library/cc776229%28WS.10%29.aspx
總結
以上是生活随笔為你收集整理的win防火墙禁止访问php文件,windows通过netsh设置防火墙的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: php循环输出url,PHP 输出URL
 - 下一篇: mysql安装后创建,Mysql安装创建