简体   繁体   中英

How to disable windows firewall settings

I am doing firewall related work. I can turn ON/OFF windows firewall programatically using COM interface but I want to disable turn ON/OFF options. Is there any COM interface, Windows API present for that?

You can Turn off windows firewall through command line.Just paste this command in your command prompt.

netsh advfirewall set currentprofile state off

This behavior is triggered by the presence of Group Policy for the firewall, specifically the Windows Firewall: Protect all Network connections setting.

As per How to disable Windows Firewall using python , you need to enable this setting in any of the available ways outlined there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM