pfsense:pfblockerng:bypass_pfblockerng_for_specific_clients
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:pfblockerng:bypass_pfblockerng_for_specific_clients [2020/04/12 00:48] – [PFSense - pfBlockerNG - Bypass pfBlockerNG for specific clients] peter | pfsense:pfblockerng:bypass_pfblockerng_for_specific_clients [2021/01/28 09:23] (current) – [PFSense - pfBlockerNG - Bypass pfBlockerNG for specific clients] peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PFSense - pfBlockerNG - Bypass pfBlockerNG for specific clients ====== | ====== PFSense - pfBlockerNG - Bypass pfBlockerNG for specific clients ====== | ||
+ | |||
+ | Unfortunately, | ||
+ | |||
+ | To have pfBlockerNG ignore some interfaces, such as the CLEAR network in this diagram, pfSense needs to use a different DNS server. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | ---- | ||
Navigate to **Services -> DNS Resolver**. | Navigate to **Services -> DNS Resolver**. | ||
- | In the **General Settings** tab. change: | + | In the **General Settings** tab, change: |
* Custom options: < | * Custom options: < | ||
- | server: | + | server: |
- | + | | |
- | server:include: / | + | include: / |
</ | </ | ||
Line 14: | Line 23: | ||
* Custom options: < | * Custom options: < | ||
- | server: | ||
- | |||
server: | server: | ||
- | | + | |
access-control-view: | access-control-view: | ||
+ | access-control-view: | ||
access-control-view: | access-control-view: | ||
view: | view: | ||
Line 36: | Line 44: | ||
Also, do not have the word **server:** in front of the following statement **server: | Also, do not have the word **server:** in front of the following statement **server: | ||
- | The following line may be needed above the **include: / | + | The following line may be needed above the **include: / |
</ | </ | ||
+ | |||
Line 43: | Line 52: | ||
**WARNING: | **WARNING: | ||
- | You will need to check each time and remove any leading **server:** to ensure your expected behavior works as expected. | + | This is hard-coded into pfBlockerNG, |
- | + | ||
- | This is hard-coded into pfBlockerNG, | + | |
</ | </ | ||
+ | |||
Line 92: | Line 100: | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
Same problem with IPv6. (note, the examples mask my real IPv6 prefix), I had to define multiple /64's as a single /62 did not work. | Same problem with IPv6. (note, the examples mask my real IPv6 prefix), I had to define multiple /64's as a single /62 did not work. | ||
Line 123: | Line 131: | ||
</ | </ | ||
- | These entries added in our “dnsbl” view force all clients in this group (192.168.20.x) to the SafeSearch address for each of the four services included. | + | <WRAP info> |
+ | **NOTE: | ||
- | We have to add them here as adding them as a Host Override on the DNS Resolver configuration page would enforce them for all clients. | + | These have to be added here, as adding them as a Host Override on the DNS Resolver configuration page, would enforce them for all clients. |
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Allow websites on a per client basis ===== | ||
+ | |||
+ | * group A allow websites X and deny websites Y | ||
+ | * group B allow websites X and allow websites Y | ||
+ | * group C allow websites X and allow websites Y and allow websites Z | ||
+ | |||
+ | pfBlockerNG can do this using the new tag feature in [[https:// | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | Navigatge to **Services -> DNS Resolver -> Custom Options**. | ||
+ | |||
+ | < | ||
+ | # give pfSense a server: tag so it puts directives in correct place | ||
+ | server: | ||
+ | |||
+ | # Define a new tag. | ||
+ | define-tag: " | ||
+ | define-tag: " | ||
+ | define-tag: " | ||
+ | |||
+ | # Create access control entry. | ||
+ | access-control: | ||
+ | access-control: | ||
+ | access-control: | ||
+ | |||
+ | # Tag the access. | ||
+ | # Allocate IP ranges to the tag. | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | access-control-tag: | ||
+ | |||
+ | # Create the local-zone, and allow normal service | ||
+ | # which allows non-blocked users access | ||
+ | # and allow all types like A and AAAA and CNAME. | ||
+ | local-zone: www.websitex.com typetransparent | ||
+ | local-zone: www.websitey.com typetransparent | ||
+ | local-zone: www.websitez.com typetransparent | ||
+ | |||
+ | # Tag the domain. | ||
+ | local-zone-tag: | ||
+ | local-zone-tag: | ||
+ | local-zone-tag: | ||
+ | |||
+ | # Ensure local data served first. | ||
+ | access-control-tag-action: | ||
+ | access-control-tag-action: | ||
+ | |||
+ | # Send users to your polite internal block page. | ||
+ | access-control-tag-data: | ||
+ | access-control-tag-data: | ||
+ | </ | ||
---- | ---- | ||
Line 140: | Line 214: | ||
https:// | https:// | ||
+ | |||
+ | https:// | ||
pfsense/pfblockerng/bypass_pfblockerng_for_specific_clients.1586652484.txt.gz · Last modified: 2020/07/15 09:30 (external edit)