These are my pfSense notes and are not comprehensive because tutorials have been done for this by better people, I am just going to answer the things that stump me.
- Official pfSense Documentation - RTFM
- Netgate Forum
- This might not be fully setup for IPv6
- I have disabled IPv6 where ever possible
Setup
Hardware
- Lenovo Low profile PC with i3 (Gen4/Quad Core) and a single 1000MB onboard NIC, 8GB RAM, 120GB Kingston SSD
- Intel 4 port 1000MB low profile Network Card
- OpenReach PPPoE DSL/VDSL modem
Installation
I saw the the installer noticed the Virtualization technologies were disabled. I don't think it needs them, but it does not harm to turn them on.
- Partitioning
- Choose Auto (ZFS) : Guided Root-on-ZFS
- ZFS Configuration - Configure Options
- Partition Scheme: GPT (BIOS+UEFI)
- This creates an EFISYS partition on GPT hard disk (on my UEFI)
- I had to turn on legacy booting (CSM) in my PC's BIOS to get this to work. Probably because the PC is old.
- Pool Type/Disks
- 1 disk striped (No Redundancy) as I can easily swap the SSD and restore config quickly.
- Companies should always run a mirror as they cannot afford any downtime. If you cant, then use 2 SSD and mirror them.
- ZFS Partitioning | pfSense Documentation
- When you start the installation
- Complete
- Click Reboot
- Shell is for advanced users
- pfSense will now load to the console (WebConfigurator)
At the Console (WebConfigurator)
- Assign Interfaces
- No VLANs
- WAN, Autodetect, Plug the WAN (PPPoE modem) cable into the onboard network socket, Press enter
- LAN, Autodetect, Plug the LAN cable into the top socket (port 0) on the intel low profile NIC, press enter
- Add no more
- Accept settings
- Set Interface(s) IP address
- Set LAN
- IPv4 = 10.0.0.1
- Subnet: 24 (255.255.255.0)
- No LAN IPv6 (enable at a later date)
- Enable DHCP on LAN
- Client address range = 10.0.0.100 --> 10.0.0.199
- Do you want to revert to HTTP as the webConfigurator protocol?
- Currently the web-server is using HTTPS and this is asking if you want to downgrade to HTTP
- Select No
Setup Wizard via GUI (WebGUI)
- If password does not work just after you set it using the setup wizard (common issue) then the solution is easy.
- Just reset the password With the WebConfigurator, and once in the WebGUI make sure it is a complex password.
- Login for pfsense not working | Netgate Forum
- Login into pfsense GUI
- URL: https://10.0.0.1/
- Default Username: admin
- Default Password: pfsense
- Follow the pfSense Setup Wizard
- Step 1 - Netgate® Global Support is available 24/7
- Just click next.
- Step 2 - General Information
- Hostname: pfsense
- Domain: mydomain.com
gives: pfsense.mydomain.com - Primary DNS Server: 9.9.9.9
- Secondary DNS Server: n/a
- Override DNS: leave ticked
- Step 3 - Time Server Information
- Time server hostname: 2.pfsense.pool.ntp.org (default)
- Timezone: GB (or what ever you require)
- Step 4 – Configure WAN Interface
- Fill in details as required
- DNS Server Override: Unticked
- Block RFC1918 Private Networks: leave ticked
- Block bogon networks: leave ticked
- Step 5 – Configure LAN interface
- LAN IP Address: 10.0.0.1
- Subnet Mask: 24
- Step 6 – Set Admin WebGUI Password
- Make sure you use a complex one as shortly your router will be online
- Step 7 – Reload configuration
- Click ‘Reload’
- Step 8 - Reload in progress
- Just wait
- Step 9 – Wizard Complete
- Check for updates (optional)
- Click Finish
- Step 1 - Netgate® Global Support is available 24/7
Advanced/Further settings via GUI (WebGUI)
- Hostname and Domain
- System --> General Setup --> Hostname: pfsense (already done in wizard)
- System --> General Setup --> Domain: mydomain.com (already done in wizard)
- Custom WAN DNS Servers (Secure)
- System --> General Setup --> DNS Servers: (DNS Server: 9.9.9.9 / DNS Hostname: dns.quad9.net) (Primary DNS) (partly already done in wizard)
- System --> General Setup --> DNS Servers: (DNS Server: 149.112.112.112 / DNS Hostname: dns.quad9.net) (Secondary DNS) (optional)
- System --> General Setup --> DNS Server Settings --> DNS Server Override: unticked (already done in wizard??)
- Services --> DNS Resolver --> General Settings --> DNSSEC: unticked
- Quad9 does all of this upstream so we dont need too.
- Services --> DNS Resolver --> General Settings --> DNS Query Forwarding --> Enable Forwarding Mode: ticked
- DNS Resolver uses unbound and the old way of doing things was with DNS Forwarder powered by dnsmasq which could only forward DNS requests.
- Controls whether unbound uses resolver mode (unchecked) or forwarding mode (checked). See DNS Resolver Mode for an explanation of the modes.
- Services --> DNS Resolver --> General Settings --> DNS Query Forwarding --> Use SSL/TLS for outgoing DNS Queries to Forwarding Servers: ticked
- turn of DNSsec as it is not required becasue quad 9 does all of this
- Quad9 Recommended Settings - Recommended: Malware Blocking, DNSSEC Validation (this is the most typical configuration)
- Configuring Quad9 on pfSense - Linux Included
- I need to put DNS Resolver into forwarder mode to utilise Quad9 blocking capabilities.
- Configuring DNS over TLS | pfSense Documentation
- DNS Over TLS On pfSense 2.4.5 | Lawrence Systems
- Covers a little on PF Blocker
- Mentions DoH and related issues with blocking it.
- Custom LAN DNS Servers
- Services --> DHCP Server --> LAN --> Servers --> DNS Servers: 10.0.0.1
- This makes sure the DNS servers given out over DHCP are not those configure in General settings but the one(s) we specify.
- Services --> DHCP Server --> LAN --> Servers --> DNS Servers: 10.0.0.1
- Disable IPv6
- System --> Advanced --> Networking --> Allow IPv6: unticked
- System --> Advanced --> Networking --> Prefer IPv4 over IPv6: ticked
- Interfaces --> WAN (pppoe0) --> General Configuration --> IPv6 Configuration Type: None
- Interfaces --> LAN (igb0) --> General Configuration --> IPv6 Configuration Type: None (already done in wizard)
- This is done because I want to make sure I control all of my traffic and I dont fully understand IPv6.
- Set DHCP Pool
- Services --> DHCP Server --> LAN --> General Options --> Range: 10.0.0.100 – 10.0.0.199 (already done in wizard)
- It did not seem to get setup correctly in the GUI, however pfSense was respecting this range. So perhaps a small GUI bug fixed by just re-saving the range here.
- Automatic Hostnames
- Services --> DNS Resolver --> General Settings --> DHCP Registration: Ticked
- Note that this will cause the Resolver to reload and flush its resolution cache whenever a DHCP lease is issued.
- Services --> DNS Resolver --> General Settings --> Static DHCP: ticked
- Services --> DNS Resolver --> General Settings --> DHCP Registration: Ticked
- Manual Hostnames
- Services --> DNS Resolver --> General Settings --> Host Overrides --> Add
- Examples
- server.mydomain.com (Local Server)
- Host: server
- Domain: mydomain.com
- IP: 10.0.0.31
- quantumwarp.com
- Host:
- Domain: quantumwarp.com
- IP: 109.203.124.234
- www.bbc.co.uk
- Host: www
- Domain: bbc.co.uk
- IP: 151.101.64.81
- server.mydomain.com (Local Server)
- This should really only be used for 'Local Only' devices. NAT reflection is better for external facing domains otherwise you have to use tunnels to make sure your server works correctly on both networks (Intranet/Internet).
- Services — DNS Resolver | pfSense Documentation
- Services — DNS Resolver — Host Overrides | pfSense Documentation
- pfsense DNS Host Overrides | Lawrence systems - this overrides entries that are brought down from the remote DNS server, if they are present ??
- how to resolve local hostname to ip in pfSense | Netgate Forum
- pfBlocker-NG
- Install
- System --> Package Manager --> Available Packages --> Search: pfBlockerNG 3 (3.1.0_4 at time of writing) --> Install
- Wizard (can be re-run)
- Firewall --> pfBlockerNG
- Step 1 (pfBlockerNG Components)
- Click next
- Step 2 (pfBlockerNG IP Component Configuration)
- Select Inbound Firewall Interface: WAN
- Select Outbound Firewall Interface: LAN
- Step 3 (pfBlockerNG DNSBL Component Configuration)
- VIP Address: 10.10.10.1
- Port: 8081
- SSL Port: 8443
- IPv6 DNSBL: unticked (Lawrence does not mention about this so leave as is)
- DNSBL Whitelist: ticked
- Step 4 (pfBlockerNG Finalize)
- Click Finish
- pfBlockerNG has been successfully configured and updated. This installation will now block IPs based on some recommended Feed source providers. It will also block most ADverts based on Feed sources including EasyList/EasyPrivacy. Some additional Feed source providers include some malicious domain blocking.
- Advanced Setup from Lawrence Systems
- Force reload of settings
- Firewall --> pfBlockerNG --> Update --> Select 'Force' option: Reload
- Firewall --> pfBlockerNG --> Update --> Select 'Reload' option: All
- Click 'Run' for the changes to apply
- When the updates are downloaded for the lists, this makes sure they are applied (otherwise a bit pointless)
- This is a one time manual update
- Firewall Rule handling
- Firewall --> pfBlockerNG --> IP --> IP Interface/Rules Configuration --> Floating Rules: ticked
- Apply rules not specific to any interface
- All rules appear in one place
- Appear in the floating tab instead of sepearate WAN/LAN/LAN2 tabs
- Firewall --> Rules
- Firewall --> pfBlockerNG --> IP --> IP Interface/Rules Configuration --> Kill States: ticked
- If an IP appears in a Blocklist which you have live connections too, drop them
- Force reload of settings for the floating rules to appear in floating tab instead of WAN and LAN tabs in the firewall rules
- Firewall --> Rules
- Firewall --> pfBlockerNG --> IP --> IP Interface/Rules Configuration --> Floating Rules: ticked
- Maxmind GeoIP Inital Setup
- Firewall --> pfBlockerNG --> IP --> MaxMind GeoIP configuration
- Register and get a license key
- GeoLite2 Sign Up | MaxMind
- Account --> Manage License Keys --> Generate new license key
- License key description: pfSense
- Old versions of our GeoIP Update program use a different license key format. Will this key be used for GeoIP Update?: Yes
- Select "Generate a license key and config file for use with
geoipupdate
version3.1.1
or newer." - Click Confirm
- Store the Key somewhere safe
- Enter the settings
- MaxMind License Key: xxxxx
- MaxMind Localized Language: Your language
- Check to disable MaxMind CSV updates: unticked
- Click 'Save IP Settings'
- All settings usually require a reload to apply them, so do this now.
- Blocking outbound and Inbound are different
- pfBlockerNG MaxMind Registration required to continue to use the GeoIP functionality! | Lawrence Systems
- Maxmind GeoIP Configuration
- GeoIP
- Firewall --> pfBlockerNG --> IP --> GeoIP
- By Default all list are disabled. You need to edit each list as required and then save
- Action: Deny Inbound (stops spammers coming in)
- Apply Block Rules to Inbound and Outbound IPv4 traffic
- Firewall --> pfBlockerNG --> IP --> IPv4 --> [PRI1] --> Action: Deny Both
- Do for each group
- View/Delete Block Lists
- They are in different locations for the different type of list
- Firewall --> pfBlockerNG --> IP --> IPv4 --> [PRI1] --> Edit
- Firewall --> pfBlockerNG --> DNSBL --> DNSBL Groups [Name] --> Trash Can
- Add a Block List Feed (IPv4/IPv6/DNSBL)
- Firewall --> pfBlockerNG --> Feeds
- Click on a desired list
- Changes the state to ON
- Save Settings
- (Optional) Firewall --> pfBlockerNG --> IP --> IPv4
- Enable the relevant group and click save
- Might already be on
- NB: The added list will be assigned to it's relevant group
- A file pole is required because we need to get the newly specified file
- Firewall --> pfBlockerNG --> Update --> Select 'Force' option: Reload
- Click 'Run' for the changes to apply
- Add Alienvault DNSBL
- Lawrences add this one and it is by AT&T
- Firewall --> pfBlockerNG --> Feeds
- Client the 'Add' icon on the Alienvault line
- Set State to On
- Leave everything else as is
- Click 'Save IPv4 Settings'
- Goto Firewall --> pfBlockerNG --> IP --> IPv4
- PRI2 Collection --> Action --> Deny Both
- Click Save
- Add a Custom DNSBL Block Lists (Eg DoH)
- Firewall --> pfBlockerNG --> DNSBL --> Add
- See example below
- Packages — pfBlocker-NG Package | pfSense Documentation
- Tutorial: pfsense and pfBlockerNG Version 3 | Lawrence Systems - This is the best instructions for installing pfBlockerNG
- pfBlockerNG | Official Reddit
- To see the pfBlockerNG actual list goto
- Firewall --> Rules --> LAN --> Destination: pfB_PRI_v4
- The default PRI1 - Collection is pretty good for stopping ADs
- Look at selecting your preference of IPv4 and DNSBL block lists but do not select them all.
- Setup pfBlockerNG python mode with pfSense - Vikash.nl
- GeoIP
- Install
- DNS Hijacking
Clients can make their own connections to direct connections to DNS servers, so block them on TCP/UDP ports53
and853
to ensure the clients only query the pfSense DNS Resolver. We also have to block DNS requests sent over HTTPS (DoH) which is harder to do.- DNS/DoT
- Blocking External Client DNS Queries | pfSense Documentation
- Block DNS Queries (Port 53)
- Do not add the pass rule
- Do for both IpV4 and IPv6
- Name: Deny DNS
- Allow Local DNS Queries (Port 53)
- Do for both IpV4 and IPv6
- Name: Allow Local DNS
- Block DNS Over TLS (Port 853)
- Do for both IpV4 and IPv6
- Name: Deny DoT
- Do not add the pass rule.
- Block DNS Queries (Port 53)
- Blocking External Client DNS Queries | pfSense Documentation
- Redirecting Client DNS Requests | pfSense Documentation
- Instead of dropping all of the DNS requests we can re-route them through our secure DNS chain.
- This has the benefit of your can see all of the requests.
- Redirecting DoT (853) requests would have issues with the certificates not matching up. So this only worked for standard DHCP
- You need one rule for Ipv4 (127.0.0.1) and one for IPv6 (::1)
- This option might be better for some IoT devices by not hard blocking DNS requests but just sending to my router. IoT might not resend a DNS request, however do you want these sorts of devices sending dodgy DNS requests.
- This will grab all traffic on port 53/853.
- DoH Blocking
- Firewall --> pfBlockerNG --> DNSBL DNSBL SafeSearch --> DNS over HTTPS/TLS Blocking --> DoH/DoT Blocking: Enable
- Select all domains
- Canary Domain (FireFox Only)
- This is not needed if using pfBockerNG
- Add as per the document above
Services --> DNS Resolver --> General Settings --> Custom options
server: local-zone: "use-application-dns.net" always_nxdomain
- This canary domain is in pfBlockerNG
- Chrome does not have a canary domain as it works on a different model
- Add a Custom DoH DNSBL Block List into pfBlockerNG
- Firewall --> pfBlockerNG --> DNSBL --> Add
- Info
- Name: DoH_Block
- Description: Custom DoH Block List
- DNSBL Source Defintions
- Format: Auto
- State: ON
- Source: https://raw.githubusercontent.com/dibdot/DoH-IP-blocklists/master/doh-domains.txt
- Header/Label: dibdot_DoH
- Settings
- Action: Unbound
- Update Frequency: Once a day
- Weekly (day of Week): Monday
- Auto-Sort Header field: Enable auto-sort
- Group Order: Default
- Logging / Blocking Mode: DNSBL WebServer/VIP
- TOP1M Whitelist: unticked
- Advanced Tuneables
- Leave as is
- DNSBL Custom_List
- Leave as is
- Move to the top of the list and save
- Firewall --> pfBlockerNG --> DNSBL --> DNSBL Groups
- Firewall --> pfBlockerNG --> DNSBL DNSBL SafeSearch --> DNS over HTTPS/TLS Blocking --> DoH/DoT Blocking: Enable
- DNS/DoT
- Enable Auto Config Backup (Free service)
- Auto Configuration Backup automatically encrypts configuration backup content using the Encryption Password below and then securely uploads the encrypted backup over HTTPS to Netgate servers.
- Get your 'Device key' and store it somewhere safe
- Services --> Auto Configuration Backup --> Backup Now --> Device key
- Services --> Auto Configuration Backup --> Settings
- Enable automatic configuration backups: ticked
- Backup Frequency: Automatically backup on every configuration change
- Encryption Password: Make this very complex and then back it up somewhere safe
- Hint/Identifier: Something human readable and unique
- Manual backups to keep: 20
- Run a backup now
- Services --> Auto Configuration Backup --> Backup Now --> Backup
- [pfSense] Making automatic backups with AutoConfigBackup – Provya
- This Stores the last 100 configs at Netgate hashed by your encryption Key
- This only backs up the basic configurations, not the extended information of pfSense.
- Enable SSH
- System --> Advanced --> Admin Access --> Secure Shell --> Enable Secure Shell: Ticked
- Username: root
- Password: same as you admin password
- Protocol: SFTP over SSH
- Granting Users Access to SSH | pfSense Documentation
- It should be noted that this will not be available on the WAN unless you setup firewall rules (i am guessing)
- pfSense Dark Theme
- System --> General Setup --> WebConfigurator --> Theme: pfsense-dark
- Port Forwarding
- Firewall --> NAT --> Port Forward
- Very simple to setup
- pfSense: How To NAT / Port Forward With a Multiple Wan / Fail over setup | Lawrence Systems
- Touches on NAT Reflection and says you should leave these 2 options as they are:
- NAT reflection: Use system default
- Filter rule association: Add associated filter rule
- Network Address Translation — Port Forwards | pfSense Documentation
- Allow Ping (optional, but useful)
- Firewall --> Rules --> WAN --> Add
- Action: Pass
- Protocol: ICMP
- ICMP subtypes: Echo request
- Source: any
- Destination: This Firewall (self)
- Description: Allow Ping
- How to allow ping on pfSense WAN? - Thiago Crepaldi
- Is on by default in OpenWRT
- Firewall --> Rules --> WAN --> Add
- Allow IGMP (optional)
- Firewall --> Rules --> WAN --> Add
- Action: Pass
- Protocol: IGMP
- Source: any
- Destination: This Firewall (self)
- Description: Allow IGMP
- What is the Internet Control Message Protocol (ICMP)? | Cloudflare
- Internet Control Message Protocol | Wikipedia
- Is on by default in OpenWRT
- Firewall --> Rules --> WAN --> Add
- NAT Reflection (Globally)
- Accessing Port Forwards from Local Networks | pfSense Documentation
- System --> Advanced --> Firewall & NAT --> Network Address Translation
- NAT Reflection mode for port forwards: Pure NAT
- Enable NAT Reflection for 1:1 NAT: ticked
- Enable automatic outbound NAT for Reflection: ticked
- System --> Advanced --> Firewall & NAT --> Network Address Translation
- NAT reflection allows you to access a URL from the Intranet as well as the Internet without doing stupid changes.
- Same as NAT Loopback on OpenWRT
- NAT Reflection needs to be turned on
- When setting up a port forward just leave the relevant rule to use the system default
- NAT reflection: Use system default
- I am using NAT Reflection instead of Split DNS because I am running a webserver with many domains on it and I do not want to add and manage all of these domain names in the DNS Resolver.
- This will enable NAT Reflection for all rules when needed, assuming you have not specifically disabled them in the port forward rule.
- Firewall/NAT Tab - NAT Reflection for Port Forwards | pfSense Documentation
- This explains the different settings very clearly.
- How to deal with NAT on pfSense/OPNSense. Real world examples. 1:1 NAT, Inbound NAT, Outbound NAT.
- In this video I'll show you the real world operations with NAT on 2 opensource firewall products: pfSense and OPNSense.
- Network Address Translation — 1:1 NAT | pfSense Documentation
- NAT on pfSense 2.3
- NAT 1:1 and Reflection discussed here
- I have set the URL to be at the right time stamp
- Can someone explain to me what is NAT Reflection Mode in simple terms like level 1 (i'm old and newbie to pfSense) : PFSENSE
- Understand & Configure NAT Reflection, NAT Loopback, Hairpinning on Cisco ASA 5500-X for TelePresence ExpressWay and Other Applications
- Check your ports are not unnecessarily exposed with GRC Shields Up
- Accessing Port Forwards from Local Networks | pfSense Documentation
- Manual Config Backup
- Diagnostics --> Backup & Restore --> Backup & Restore
- Backup area: All
- Skip packages: unticked
- Skip RRD data: ticked
- Include extra data: unticked (no good for long term config backups)
- Backup SSH keys: ticked
- Encryption: optional
- Click on 'Download configuration as XML'
- Save the file somewhere safe
- Backup and Recovery — Making Backups in the GUI | pfSense Documentation
- You can back up all required aspects of pfSense with this feature
- Diagnostics --> Backup & Restore --> Backup & Restore
To Sort
- https://docs.netgate.com/pfsense/en/latest/recipes/index.html - a very useful page
- port forwarding / Firewall rules / add rules from openwrt
- TCP Dump
- OpenVPN / vpn
- ipsec, openvpn, which is beter, do a vs vs thing
- https://www.ivpn.net/setup/router/pfsense/
- Services --> DNS Resolver --> General Settings --> OpenVPN Clients: ticked (move to openvpn)
- VMware Tools?
- VLANs
- Disable IPv6 or NAT or block etc..
- Block IPv6 because I don’t understand it and I want to control all trwaffic. IPv6 NAT + add these to openwrt notes
- Statistics / Reporting
- Syslog (add notes to open wrt that this is a good thing)
- NAT Loopback / NAT Relections – update my openwrt notes -
- Network Loopback (prevent RFC error so external traffic is)
- NAT Reflection (preffered) / Hostfile entry --> both will re-direct external traffic locally (host option will have issue with IP address etc.. + add to opwenrt doc if not already + add term NAT Refelction to opwenr wrt notes as correct
- https://quantumwarp.com/kb/articles/34-web-server/963-cwp-full-setup-in-virtualbox-on-windows-behind-a-nat
- Eg OpenWRT à Network à Firewall à Port Forwards à CWP (All Ports / LAN Only) à Advanced Settings à Nat Loopback (if the DNS resolution points to the public IP then forward to 10.0.41)
- I think if a hostname is set in hostnames local routing happens
OpenWRT à Network à Hostnames à add (if in the list, resolve to the IP in this list) - Look at OpenWRT à Network à DHCP and DNS à
- Local server (Names matching this domain are never forwarded and are resolved from DHCP or hosts files only)
- Local domain (Local domain suffix appended to DHCP names and hosts file entries)
- In PC BIOS: make sure power on after power off.
- DHCP Scope / Address assignment
- Set 10.0.0. – lats?
- Block eternal ping + openwrt notes
- Firewall rules from openwrt
- Password – do last
- #dpcument notes – one page fopr specific product brief + long (* only for sinlge page/products)
- Don’t have any network cables plugged in
- Set some shit from console – seperte section
- Have I got some pictures from a VM for pfsense
- DNS hijacking, firewall zones, openwrt rules, rfc nat loopback, ad blocking. Pfsense has no firewall rules
- do your own certifiacte authority
Notes
- Installation Tutorials
- 2020 Getting started with pfsense 2.4 Tutorial: Network Setup, VLANs, Features & Packages - YouTube - A tutorial by Lawrence Sytems who supplies this software professionally. From installing to configuring your local network.
- Installing and Upgrading — Perform the Installation — Installation Walkthrough | pfSense Documentation - The starting point for learning. This will walk you through the setup of pfSense.
- Configuring Tutorials
- Configuring pfsense Firewall Rules For Home - YouTube - A lawrence systems video
- How To Setup pfsense OpenVPN Policy Routing With Kill Switch Using A Privacy VPN - YouTube - A lawrence systems video
- Running in VirtualBox
- Virtualization | pfSense Documentation
- pfSense® software supports a variety of Type-1 (bare metal/native) and Type-2 (hosted) virtualization environments, such as VMware (vSphere, Fusion or Workstation), Proxmox VE, VirtualBox, Xen, KVM, Hyper-V and so on.
- We recommend using Type-1 hypervisors for production use. Type-2 hypervisors such as VirtualBox or VMware Workstation work fine for testing, but avoid using them for production roles where possible.
- pfSense within VirtualBox on FreeNAS | TrueNAS Community
- Pfsense wants kernel-level access to the NICs.
- Virtualization | pfSense Documentation
- Default Configuration
- Installing and Upgrading — Perform the Installation | pfSense Documentation
- This has the default configuration of pfSense i.e. 192.168.1.1/24
- ZFS or UFS
- ZFS is more reliable and less prone to file corruption. It does not use massive amounts of memory but does like RAM.
- ZFS is the first in the list hinting at being the preferred option.
- pfSense UFS filesystem corruption after power loss
- When pfSense system losses power at a wrong moment, the UFS filesystem may get corrupted, which may result in unbootable router.
- In our experience ZFS is immune to the issue, so we strongly recommend using ZFS instead of UFS.
- Should I use ZFS or UFS for my file system? : PFSENSE
- I switched to ZFS on all my installs about 2 years ago, and I'm not looking back. It does marginally increase RAM usage, but gives you the benefit of ZFS file system integrity. ZFS does much better on power failure than UFS with regard to file system corruption. ZFS is atomic, which means you'll never have a half-written log or configuration file if you lose power, or worse the file system writes part of the file near something important and the next read causes memory corruption.
- ZFS vs UFS and power loss | Netgate Forum
- Does ZFS offer any better protection against power loss vs UFS on pfSense firewalls? Yes, it is about zillion times better than UFS. Switching to ZFS should be a complete no brainer with anything that has 4GB of RAM or better. I'd still go for it even with 2GB boxes, had nothing but pain with UFS for years. Garbage filesystem.
- Pfsense 2.4 ZFS File System | Netgate Forum
- What will be the hardware requirements for utilizing the ZFS file system? Same as any other FreeBSD system running ZFS.
- Mostly true, ZFS is not memory intensive or a resource hog any more than your average database can be depending on the setup. There's one thing I'm worried about and that's the high amount of incorrect information on the net concerning the more advanced features of ZFS such as dedup. You can expect an influx of newbies asking why their pfSense locked up hard when they enabled dedup just for the fun of it.
- What are the advantages of ZFS in a pfsense install? Unlike UFS, it doesn't crash and burn, bricking your boxes over and over again. That's enough of an advantage for me.
- ZFS w/single drive? : PFSENSE
- ZFS is the better file system and this threads explains why.
- Partition / Filesystem Selection
- Installing and Upgrading — Perform the Installation — Installation Walkthrough | pfSense Documentation
- The ZFS filesystem type is more reliable and has more features than UFS, however ZFS can be memory hungry. Either filesystem will work on hardware with several GB of RAM, but if RAM usage is critical to other tasks that will run on this firewall, UFS is a more conservative choice. For hardware that requires UEFI, use ZFS.
- Select the file system going down the list and select the first one your hardware will support:
- Auto (ZFS)
- Needs plenty of RAM
- Has more disk features.
- Auto (UFS) UEFI
- Automatically creates partitions and formats the disk with UFS and a UEFI boot environment.
- Though systems which support UEFI natively should use this option in most cases, there are occasional incompatibilities between FreeBSD and UEFI implementations. If the system fails to boot, configure the system for BIOS/legacy booting and choose that installation option instead.
- Auto (UFS) BIOS
- Automatically creates partitions and formats the disk with UFS and a traditional/legacy BIOS style boot environment.
- Auto (ZFS)
- Installing and Upgrading — Perform the Installation — Installation Walkthrough | pfSense Documentation
- pfSense will not boot
- If you set the Partition Scheme: GPT (UEFI) and the pfSense does not boot then it could be the PC BIOS is not able to handle the EFI partition even though it says it can.
- Clean install of 21.02 on ZFS filesystem not booting | Netgate Forum
- This is an old bug and might not be a thing anymore.
- At the end of the install open the terminal and run this command
echo 'zfs_load="YES"' >> /boot/loader.conf
- UEFI can be flaky on older PCs so the only choice that might work is BIOS/Legacy/CSM mode
- Partition Scheme: GPT (UEFI) did not work on my PC : created a GPT disk with a EFI partition etc..
- Partition Scheme: GPT (BIOS+UEFI) + I had to turn on legacy booting : created a GPT disk with a EFI partition etc..
- pfSense Future
- Announcing pfSense® Plus - and the downgrading of pfSense CE
- pfSense going closed source - Ars Technica OpenForum
- config.xml
- This contains all settings in 1 file and is all that is needed to re-install pfSense
- You can use the boot disk to recover the config.xml if you did not back it up before a crash.
- How to mount a ZFS drive in windows
- How do you mount a zfs drive in Windows - Servers and NAS - Linus Tech Tips
- You cant mount this file system directly
- This has some instructions on how to get files of the disk via another PC
- How do you mount a zfs drive in Windows - Servers and NAS - Linus Tech Tips
- Buying the right network card
- Intel is best
- How Do You know If the NIC Is Intel Based? : PFSENSE
- i340-T4 or i350-T4?? : PFSENSE
- I340-t4 showing up as pro/1000 | Netgate Forum
- FYI Those cheap Chinese i350-T4/AM4 nics on ebay work! | Netgate Forum
- New 0H092P Intel Pro/1000 VT Quad Port PCI-e Server Adapter Wholesale 0H092P Intel Pro/1000 VT Quad Port PCI-e Server Adapter, Price 0H092P
- Guarenteed NICs that will work | Netgate Forum
- Logging DNS Queries
- Services --> DNS Resolver --> General Settings --> Custom options: Add
server: log-queries: yes
- Troubleshooting DNS Queries | pfSense Documentation
- Access the logs via the GUI
- Status --> System Logs --> System --> DNS Resolver
- Only up to a Maximum 500 records.
- Access the log via SSH
- /var/log/resolver.log
- Services --> DNS Resolver --> General Settings --> Custom options: Add
- What is Snort
- Snort is the foremost Open Source Intrusion Prevention System (IPS) in the world. Snort IPS uses a series of rules that help define malicious network activity and uses those rules to find packets that match against them and generates alerts for users.
- Snort - Network Intrusion Detection & Prevention System
- Other Packages of Note
- System --> Package Manager
- ntopng
- Advanced data flow monitor and stats
- How to Configure Traffic Monitoring with ntopng on pfsen | Lawrence Systems