码迷,mamicode.com
首页 > Windows程序 > 详细

windows advanced firewall simple config

时间:2020-03-13 18:35:23      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:network   shel   windows   display   restart   man   rest   art   power   

To ALLOW ONLY Specific Network To Access:

There is a underlying policy‘s under the policies: deny all
what we need to do is create the explicit allow policies

what we need to do:

  1. under the inbound scope:
  2. disable all of other allow rules or connections will still make it through from them
  3. run the command below
    netsh advfirewall firewall add rule name="Allow from Internal Access" dir=in action=allow protocol=ANY remoteip=172.16.11.0/24
    172.16.15.0/24
    172.16.10.0/24
    172.16.30.0/24
    Or powershell:
    New-NetFirewallRule -Name Allow192.0.2.55 -DisplayName ‘Allow from 192.0.2.55‘ -Enabled True -Direction Inbound -Protocol ANY -Action Allow -Profile ANY -RemoteAddress 172.16.15.0/24

  4. Restart the Firewall service after creating the rules

windows advanced firewall simple config

标签:network   shel   windows   display   restart   man   rest   art   power   

原文地址:https://blog.51cto.com/zhangfang526/2478149

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!