pfsense:pfblockerng:install_pfblockerng
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:pfblockerng:install_pfblockerng [2021/01/28 09:52] – [Install pfblockerNG] peter | pfsense:pfblockerng:install_pfblockerng [2021/01/28 11:28] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PFSense - pfBlockerNG - Install pfBlockerNG ====== | ====== PFSense - pfBlockerNG - Install pfBlockerNG ====== | ||
- | ===== Increase Firewall Maximum Table Entries ===== | + | There are multiple parts to this: |
- | Navigate to **System -> Advanced -> Firewall | + | |
+ | * [[PFSense: | ||
+ | * [[PFSense: | ||
+ | * [[PFSense: | ||
+ | * [[PFSense: | ||
+ | * [[PFSense: | ||
+ | | ||
+ | | ||
- | In **Firewall Advanced**: | ||
- | |||
- | * Firewall Maximum Table Entries: | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | As a rough guide, set this value to the following, depending on how much memory there is. | ||
- | |||
- | ^Memory^Firewall Maximum Table Entries^ | ||
- | |4GB|800000| | ||
- | |8GB|1000000| | ||
- | |16GB|1200000| | ||
- | |32GB or Higher|2000000| | ||
- | |||
- | If lots of blocklists are being used, then look at setting these slightly higher if you notice any slowness in DNS resolving. | ||
- | |||
- | * Be careful of setting this too high as it directly uses more RAM the higher you set it. | ||
- | |||
- | </ | ||
---- | ---- | ||
- | |||
- | ===== Install pfblockerNG ===== | ||
- | |||
- | Navigate to **System -> Package Manager -> Available Packages**. | ||
- | |||
- | Locate **pfBlockerNG-devel**. | ||
- | |||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | pfBlockerNG-devel is much easier to configure and is extremely stable and should have no issues being used in production. | ||
- | </ | ||
- | |||
- | Click the **Install** button and wait for it to complete. | ||
- | |||
- | Once installation is completed, pfBlockerNG appears in **System -> Package Manager -> Installed Packages**. | ||
- | |||
- | ---- | ||
- | |||
- | ===== First Install - Wizard ===== | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG**. | ||
- | |||
- | The first time you visit this link, the following Wizard will be shown. | ||
- | |||
- | Click **Next**. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | A warning is shown that ALL settings will be wiped. | ||
- | |||
- | Click **Next**. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ==== IP Component Configuration ==== | ||
- | |||
- | Now select the input and output interfaces. | ||
- | |||
- | For now, even though there are other interfaces, just select the defaults. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ==== DNSBL Component Configuration ==== | ||
- | |||
- | Select the defaults. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ==== Finalized ==== | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | {{: | ||
- | |||
- | {{: | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ---- | ||
- | |||
- | ===== General Settings ===== | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG**. | ||
- | |||
- | Within the **General** section: | ||
- | |||
- | * pfBlockerNG: | ||
- | * Keep Settings: **Checked**. | ||
- | * CRON Settings: **Every Hour** | ||
- | * Download Failure Threshold: | ||
- | |||
- | Within the **Log Settings** section: | ||
- | |||
- | * Keep all settings at default: | ||
- | |||
- | Scroll to the bottom of the page and click the **Save** button. | ||
- | |||
- | General Tab should look like this: | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== IP Configuration ===== | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> IP**. | ||
- | |||
- | Within the **IP Configuration** section: | ||
- | |||
- | * De-Duplication: | ||
- | * CIDR Aggregation: | ||
- | * Suppression: | ||
- | * Force Global IP Logging: **Not checked** | ||
- | * Placeholder IP Address: **127.1.7.7** | ||
- | * ASN Reporting: **Disabled** | ||
- | |||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | ===== MaxMind GeoIP configuration ===== | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> IP**. | ||
- | |||
- | Within the **MaxMind GeoIP configuration** section: | ||
- | |||
- | * MaxMind License Key: **Enter the MaxMind License Key**. | ||
- | * MaxMind Localized Language: **English**. | ||
- | * MaxMind CSV Updates: | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== IP Interface/ | ||
- | |||
- | |||
- | Within the **IP Interface/ | ||
- | |||
- | * Inbound Firewall Rules: | ||
- | * Outbound Firewall Rules: **LAN** and **Reject**. | ||
- | * If you have more than one internal interfaces, press **CTRL** or CMD (for Mac users) and click on interfaces. | ||
- | * Floating Rules: | ||
- | * Firewall ' | ||
- | * Firewall ' | ||
- | * Kill States: | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | Scroll to the bottom of the page and click the **Save** button. | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== Setup Custom IP Lists ===== | ||
- | |||
- | See IP Lists | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> IP -> IPv4**. | ||
- | |||
- | Click the **Add** button. | ||
- | |||
- | Give it a **Name** and **Description**. | ||
- | |||
- | Add in as many **IP Source Definitions** as needed. | ||
- | |||
- | Set: | ||
- | |||
- | * State: **ON**. | ||
- | * Action: **Deny Both**. | ||
- | * Update Frequency: **Once per day**. | ||
- | |||
- | For Example: | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== Enable DNSBL ===== | ||
- | |||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> DNSBL** and check the box for **Enable DNSBL**. | ||
- | |||
- | Optionally, if you have a lot of RAM, you can also enable **TLD**. | ||
- | |||
- | {{: | ||
- | |||
- | Locate the **DNSBL Webserver Configuration** section: | ||
- | |||
- | * Virtual IP Address: **10.10.10.1**. | ||
- | * VIP Address Type: **IP Alias**. | ||
- | * Port: **8081**. The default. | ||
- | * SSL Port: **8443**. | ||
- | * Webserver Interface: | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | Locate **Permit Firewall Rules** within the **DNSBL Configuration** section: | ||
- | |||
- | * If you ONLY have one LAN interface, leave this setting unchecked. | ||
- | * If you have multiple LAN interfaces, check this setting and select each interface to protect. | ||
- | * Scroll to the bottom of the page and click the **Save** button. | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | |||
- | Locate the **DNSBL Whitelist** Section: | ||
- | |||
- | * See [[PFSense: | ||
- | * Enter the following white-list domains and modify as you like: | ||
- | * < | ||
- | .play.google.com | ||
- | .drive.google.com | ||
- | .accounts.google.com | ||
- | .www.google.com | ||
- | .github.com | ||
- | .outlook.live.com | ||
- | .edge-live.outlook.office.com # CNAME for (outlook.live.com) | ||
- | .outlook.ha-live.office365.com # CNAME for (outlook.live.com) | ||
- | .outlook.ha.office365.com # CNAME for (outlook.live.com) | ||
- | .outlook.ms-acdc.office.com # CNAME for (outlook.live.com) | ||
- | .amazonaws.com | ||
- | .login.live.com | ||
- | .login.msa.akadns6.net # CNAME for (login.live.com) | ||
- | .ipv4.login.msa.akadns6.net # CNAME for (login.live.com) | ||
- | .mail.google.com | ||
- | .googlemail.l.google.com # CNAME for (mail.google.com) | ||
- | .pbs.twimg.com | ||
- | .wildcard.twimg.com # CNAME for (pbs.twimg.com) | ||
- | .sites.google.com | ||
- | .www3.l.google.com # CNAME for (sites.google.com) | ||
- | .docs.google.com | ||
- | .mobile.free.fr | ||
- | .plus.google.com | ||
- | .samsungcloudsolution.net | ||
- | .samsungelectronics.com | ||
- | .icloud.com | ||
- | .microsoft.com | ||
- | .windows.com | ||
- | .skype.com | ||
- | .googleusercontent.com | ||
- | </ | ||
- | |||
- | |||
- | Locate **DNSBL IPs** section: | ||
- | |||
- | * List Action: **Deny Both**. | ||
- | * Enable Logging: **Enable**. | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | Scroll to the bottom of the page and click the **Save** button. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== Setup DNSBL EasyLists ===== | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> Feeds**. | ||
- | |||
- | Scroll down to the **DNSBL Category** section. | ||
- | |||
- | Select the **Easylist** by clicking on the **+** key towards the left side. | ||
- | |||
- | {{: | ||
- | |||
- | Set EasyList Feeds to: | ||
- | |||
- | * State: **ON** | ||
- | * Action: **Unbound** | ||
- | * Update Frequency: **Once per day** | ||
- | |||
- | {{: | ||
- | |||
- | Scroll to the bottom of the page and click the **Save** button. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== Setup Custom DNSBL Lists ===== | ||
- | |||
- | See [[PFSense: | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> DNSBL -> DNSBL Groups**. | ||
- | |||
- | Click the **Add** button. | ||
- | |||
- | Give it a **Name** and **Description**. | ||
- | |||
- | Add in as many **DNSBL Source Definitions** as needed. | ||
- | |||
- | Set: | ||
- | |||
- | * State: **ON** | ||
- | * Action: **Unbound** | ||
- | * Update Frequency: **Once per day** | ||
- | |||
- | For Example: | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== Update Lists ===== | ||
- | |||
- | Updates are run on the schedule earlier. | ||
- | |||
- | However, the first one must be initiated manually to take effect immediately. | ||
- | |||
- | Navigate to **Firewall -> pfBlockerNG -> Update**. | ||
- | |||
- | Click the radio button for **Update** and click the **Run** button. | ||
- | |||
- | Observe the log viewer as the update processes and allow it a couple minutes to finish. | ||
- | |||
- | After the initial update, you should notice ads are now being blocked in your browser. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== Check the Services ===== | ||
- | |||
- | Navigate to **Status -> Services**. | ||
- | |||
- | Restart both **pfBlockerNG DNSBL** & **Unbound** services. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
- | ===== Testing from the command line ===== | ||
- | |||
- | Normally, pinging a site will return the sites actual IP address. | ||
- | |||
- | However, with pfBlockerNG properly setup you may instead see a reply of 10.10.10.1, which is the default virtual IP address DNSBL creates: | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | For sites that are allowed to get through, their proper IP address will be returned by a ping instead of 10.10.10.1: | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | The same goes for an nslookup query, which will also return a response of 10.10.10.1 for adverts: | ||
- | |||
- | {{: | ||
- | |||
- | For sites that are allowed to get through, their proper IP address will be returned instead of 10.10.10.1. | ||
- | |||
- | {{: | ||
- | |||
- | ---- | ||
- | |||
pfsense/pfblockerng/install_pfblockerng.1611827539.txt.gz · Last modified: 2021/01/28 09:52 by peter