您好我试图阻止对我的Raspberry Pi的所有访问,除了从我的IP地址到Web界面和PowerShell RM。
Hi I'm trying to block all access to my Raspberry Pi except from my IP Address to the web interface and PowerShell RM.
有人知道为什么这些命令仍允许访问所有其他计算机,谢谢!
Does anybody know why these commands are still allowing access to all other computers thanks!
netsh advfirewall firewall add rule name="Web Access" dir=in protocol=TCP localport=8080 remoteip=192.168.1.132 action=Allow netsh advfirewall firewall add rule name="Powershell Access" dir=in protocol=TCP localport=5985 remoteip=192.168.1.132 action=Allow netsh advfirewall firewall add rule name="Powershell Access" dir=in protocol=TCP localport=5986 remoteip=192.168.1.132 action=Allow netsh advfirewall set allprofiles firewallpolicy 'blockinbound,allowoutbound' netsh advfirewall set allprofiles state on推荐答案
hi
因为你之前没有禁用过一些重要的规则吗?
because you have not disabled some important rules before ?
例如这个
Rule Name: IoT_WebManagement_Allow_In_HTTP ---------------------------------------------------------------------- Enabled: Yes Direction: In Profiles: Domain,Private,Public Grouping: WebManagement LocalIP: Any RemoteIP: Any Protocol: TCP LocalPort: 8080 RemotePort: Any Edge traversal: No Action: Allow
netsh advfirewall set allprofiles firewallpolicy 'blockinbound,allowoutbound'
blockinbound 仅阻止入站连接不匹配入站规则
blockinbound only block inbound connections that do not match an inbound rule
allowoutbound 仅允许不匹配的出站连接 规则
allowoutbound only allow outbound connections that do not match a rule
因此我建议您查看设备上的所有现有规则...
so i would recommend to view all existing rules on your device...
例如
netsh advfirewall firewall show rule name=all > c:\rules.txt or netsh advfirewall firewall show rule dir=in name=all > c:\rules.txt
br Andre
br Andre
更多推荐
[Windows IoT核心]防火墙管理
发布评论