powershell - 为给定的 IP 和 PORT 找到正确的 Internet 协议
问题描述
我正在为 Windows 10 中的特定 IP 和端口添加防火墙规则。但我收到错误: 协议无效。
我需要添加的地址:
13.79.172.43/8883,443
3.250.210.0/23
3.250.243.64/26
3.251.56.0/24
3.251.62.128/25
34.245.205.0/27
18.130.91.148/30
我正在使用的示例:
New-NetFirewallRule -DisplayName "Block-Wireless-In-01" -Name "Block-Wireless-In-01" -Direction Inbound -InterfaceType Wireless -Action Block -RemoteAddress 13.79.172.43 -LocalPort 8883,443 - Protocol TCP
我在 Windows 防火墙设置中用于定义协议的选项是:
HOPOPT
ICMPv4
IGMP
TCP
UDP
IPv6
IPv6-Route
IPv6-Frag
GRE
ICMPv6
IPv6-NoNxt
IPv6-Opts
VRRP
PGM
L2TP
如何为每个地址找到正确的协议以及在防火墙设置中选择什么?
解决方案
推荐阅读
- python - 使用 Numpy 有效地求和复杂的矩阵乘积
- c# - ASP.Net Core 2.2 App 中身份控制器的扩展方法
- javascript - Webpack 4,Babel 转译为 ES5 和 uglifyjs-webpack-plugin 的问题
- asp.net-mvc - .NET Core MVC 项目中的 Autofac 属性注入
- c# - 如何将一个接口的多个实现注入到一个实现中
- python - 如何更改数组中元素的索引
- android - 未解决的参考:onBindViewHolder 内的 LAYOUT_INFLATER_SERVICE
- python - 递归展平对象
- sql - 如何连接具有多个关系的 2 个表
- kotlin - 如何使用反射动态转换数组以匹配函数的参数?