It's important to enable a local firewall to protect from unauthorized access. Windows contains a built-in firewall called Windows Defender that is on by default, you should leave the default firewall on. If you’ve turned the firewall off for some reason, and you didn’t replace it with something else, then you should turn on the Windows Defender firewall. Without a firewall, your computer is vulnerable to external attacks.

 

For Windows 10

  1. Select the Start button > Settings  > Update & Security  > Windows Security and then Firewall & network protection.
  2. Select a network profile: Domain network, Private network, or Public network.
  3. Under Microsoft Defender Firewall, switch the setting to On


For Windows 11

  1. Right-click the Windows icon on the taskbar.
  2. Click Settings.
  3. Click Privacy & security.
  4. Click Windows Security.
  5. Click Firewall & network protection.
  6. If the firewall is off, you will see a red X icon in the Firewall & network protection section. Click the Turn on button.


For Mac OS

  1. Navigate to System Preferences
  2. Click on Security & Privacy
  3. Select the Firewall tab. 
  4. Click the lock icon to make changes, and type in credentials. 
  5. Select Turn on Firewall.