Showing posts with label firewall. Show all posts
Showing posts with label firewall. Show all posts

Sunday, May 13, 2018

Tips&Tricks – Attention When Changing Windows Defender Firewall Default Log Path

Although nowadays you could (err…should) configure event viewer (or centralized logging) for your Windows Defender Firewall, here’s a tip for something I’ve noticed when changed the default Windows Defender Firewall location.

When applying a GPO to do this, you must keep in mind that MpsSvc service account is responsible to write down the Windows Firewall log, so, if you change the default location (%windir%\System32\LogFiles\Firewall) you need to give it the right NTFS permissions.

So basically what you need to do:

  1. Change the default location for the Windows Firewall log
  2. Go to the new location
  3. Right-click the folder and then Properties
  4. Click the Security tab and Edit
  5. Now, click Add
  6. Make sure that you’ve select the local computer and not the domain (in “Locations…”)
  7. Now type NT Service\MpsSvc and click OK
  8. Make sure MpsSvc has Write Access and click OK again

And…you’re done!

Monday, December 11, 2017

Tips & Tricks – Import/Export Windows Firewall Settings Command-Line

Here’s a nice tip for those that for some reason need to configure Windows Firewall (or Windows Defender Firewall on Windows 10).

The recommended way to do this should be using a group policy but because you may have a non-domain joined machine on your network, here’s how to do it.

  1. First of all, configure everything you need in Windows Firewall on a reference machine
  2. Then, open an elevated command-prompt and type the following command:
    netsh advfirewall export “C:\Temp\WindowsFirewallRules.wfw”

    advfirewall01
  3. Now that you have the file, you can import it to any machine using the following command:
    netsh advfirewall import “C:\Temp\WindowsFirewallRules.wfw”

    advfirewall02

If for any reason you need to reset firewall rules to default values just type:
netsh advfirewall reset