Hei*_*ich 5 networking windows-server-2008 firewall windows-firewall
在最新版本的 Windows 防火墙中,例如包含在 Windows Server 2008 R2 中,您可以阻止传入连接并将此规则仅应用于一组用户(规则属性中的用户选项卡)。
为什么这对于出站连接规则是不可能的,如何实现?我需要一个软件解决方案来阻止特定用户和其他人的所有互联网访问,我希望通过 Windows 防火墙实现这一点。
小智 5
这是可行的,我只是为我孩子的电脑做的。只需在任务计划程序中创建以下条目。请注意,这不是超级安全,因为它不考虑来自远程桌面的多个会话等。也就是说,希望它会帮助很多人查看这个主题。另外,请注意在为注册用户关闭防火墙之前步骤 2 中的 30 秒延迟。不确定是否可以以某种方式使其更快,5-10 秒对我的计算机来说已经足够了。
步骤 1) 创建一个在任何人登录时打开防火墙的任务:
任务计划程序 -> 操作 -> “创建任务”
一般的:
Name:TurnOnWindowsFirewall
Security Options:"Run whether user is logged on or not" checked
Security Options:"Run with highest privileges" checked
Run Code Online (Sandbox Code Playgroud)
触发器:(单击“新建...”)
BeginTheTask:"At log on"
Settings:"Any User" checked
Advanced Settings:"Stop if task runs longer than:" checked; "30 minutes" selected
Advanced Settings:"Enabled" checked
Run Code Online (Sandbox Code Playgroud)
操作:(单击“新建...”)
Action:"Start a program"
Program/script:"netsh"
Add Aruments:"advfirewall set allprofiles state on"
Run Code Online (Sandbox Code Playgroud)
状况:
Uncheck everything on this tab
Run Code Online (Sandbox Code Playgroud)
设置:
AllowOnDemand: checked
RunTaskAsSoonAsPossible: checked
IfTheTaskFails: unchecked
StopTheTaskIfItRunsLonger: checked; "1 hour" selected
IfTheRunningTaskDoesNotEndForceIt: checked
IfTheTaskIsNotSchedAgainDeleteIt: unchecked
IfTheTaskIsAlreadyRunning: "Do not start a new instance" selected
Run Code Online (Sandbox Code Playgroud)
步骤 2) 创建一个在某个用户登录时关闭防火墙的任务:
任务计划程序 -> 操作 -> “创建任务”
一般的:
Name:TurnOffWindowsFirewall
Security Options:"Run whether user is logged on or not" checked
Security Options:"Do not store password" checked
Security Options:"Run with highest privileges" checked
Run Code Online (Sandbox Code Playgroud)
触发器:(单击“新建...”)
BeginTheTask:"At log on"
Settings:"Specific User" checked (select user that should have OPEN internet access.)
Advanced Settings:"Delay task for:" checked; "30 seconds" selected
Advanced Settings:"Stop if task runs longer than:" checked; "30 minutes" selected
Advanced Settings:"Enabled" checked
Run Code Online (Sandbox Code Playgroud)
操作:(单击“新建...”)
Action:"Start a program"
Program/script:"netsh"
Add Aruments:"advfirewall set allprofiles state on"
Run Code Online (Sandbox Code Playgroud)
状况:
Uncheck everything on this tab
Run Code Online (Sandbox Code Playgroud)
设置:
AllowOnDemand: checked
RunTaskAsSoonAsPossible: checked
IfTheTaskFails: unchecked
StopTheTaskIfItRunsLonger: checked; "1 hour" selected
IfTheRunningTaskDoesNotEndForceIt: checked
IfTheTaskIsNotSchedAgainDeleteIt: unchecked
IfTheTaskIsAlreadyRunning: "Do not start a new instance" selected
Run Code Online (Sandbox Code Playgroud)
祝你好运!
归档时间: |
|
查看次数: |
8275 次 |
最近记录: |