How to block multiple EXE files Windows Firewall

Page 3 of 3 FirstFirst 123

  1. SPB
    Posts : 78
    Windows 10 Home 22H2 x64
       #21

    I don't see a problem related to your inbound rules.
    The rules say 'block' and those rules are 'enabled'. (no trespassing sign)

    How to block multiple EXE files Windows Firewall-firewall-inbound-rules.png
      My Computer


  2. Posts : 3
    Win 10 LTSC v.1809
       #22

    Thanks for help, but it contradicts with Brink's post "If the app is checked in the allowed list, then it's not blocked. It should be unchecked."

    Add or Remove Allowed Apps through Windows Firewall in Windows 10
      My Computer


  3. SPB
    Posts : 78
    Windows 10 Home 22H2 x64
       #23

    F657 said:
    Thanks for help, but it contradicts with Brink's post "If the app is checked in the allowed list, then it's not blocked. It should be unchecked."

    Add or Remove Allowed Apps through Windows Firewall in Windows 10
    The above quote is about allowed outbound rules, not inbound rules.
    If you want to block something incoming, the corresponding blocking rule must be enabled (if there is a rule for it).

    Or if there are no inbound rules at all then all inbound traffic will be blocked.

    How to block multiple EXE files Windows Firewall-defender-fw.png
      My Computer


  4. Posts : 3
    Win 10 LTSC v.1809
       #24

    .bat file should block both inbound and outbound connections. With allowed list
    not sure if all in/out connections are blocked. Somehow this is confusing.

    - - - Updated - - -

    One more question regarding addfwrs.bat from post #10

    I would like all .exe files to be completely blocked from 2 folders:

    %ProgramFiles(x86)%\1234
    %ProgramFiles%\1234

    Folder 1234 could be in any location or maybe even in both. So made this way and it works for %ProgramFiles(x86)%
    Code:
    @CD /d "%ProgramFiles(x86)%\1234"
    for %%* in (.) do set RULENAME=%%~nx*
    ECHO.
    FOR /r %%G in ("*.exe") Do (@echo %%G
    NETSH advfirewall firewall add rule name="%RULENAME%-%%~nxG" dir=in program="%%G" action="block" enable="yes")
    FOR /r %%G in ("*.exe") Do (@echo %%G
    NETSH advfirewall firewall add rule name="%RULENAME%-%%~nxG" dir=out program="%%G" action="block" enable="yes")
    ECHO.

    So how to add %ProgramFiles%\1234 folder?
      My Computer


  5. Posts : 3,514
    Windows 10 Pro 64-bit 21H1 (May 2021 build 19043.1083)
    Thread Starter
       #25

    To make sure the application is totally blocked, you must block all files in both inbound and outbound communication. Especially the outbound one (that checks for updates and for valid key).
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:24.
Find Us




Windows 10 Forums