1.先输入win+r打开运行,然后在输入control进入控制面板
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_223953.png)
2.然后在可以在控制面板的类别中更改为小图标,找到windows Defender防火墙
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224046-1024x390.png)
3.找到高级设置
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224125-1024x672.png)
4.然后点击入站规则
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224251-1024x694.png)
5.新建自己的规则
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224350-1024x469.png)
6.选择端口,然后下一步
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224442-1024x758.png)
7.输入自己的端口号
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224534-1024x639.png)
8.允许连接,然后下一步
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224647-1024x755.png)
9.何时应用规则时选择默认勾选好的,然后直接下一步
区别:防火墙的域、专用、公用的网络位置类型不同。
1、域:Windows可以验证对计算机所连接域的域控制器的访问
2、公共:除域网络以外,其他所有网络最初都归为公共网络一类。直接连接Internet的网络或者位于公共场所(如机场和咖啡店)的网络应保留为公共网络
3、专用:由用户或应用程序标识为专用的网络。只应将可信网络标识为专用网络。用户很可能希望将家庭网络或小型企业网络标识为专用网络。
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_224751-1024x756.png)
10.入站名称为端口使用名称,方便区分
![](http://43.138.69.59/wp-content/uploads/2023/04/2023-04-17_230049-1024x770.png)