Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering pfSense
Mastering pfSense

Mastering pfSense: Manage, secure, and monitor your on-premise and cloud network with pfSense 2.4 , Second Edition

Arrow left icon
Profile Icon David Zientara
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3 (4 Ratings)
Paperback May 2018 450 pages 2nd Edition
eBook
zł39.99 zł177.99
Paperback
zł221.99
Subscription
Free Trial
Arrow left icon
Profile Icon David Zientara
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3 (4 Ratings)
Paperback May 2018 450 pages 2nd Edition
eBook
zł39.99 zł177.99
Paperback
zł221.99
Subscription
Free Trial
eBook
zł39.99 zł177.99
Paperback
zł221.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering pfSense

Advanced pfSense Configuration

The information provided in the first chapter should be enough to get you started with your pfSense router/firewall and deploy it on your network. In this chapter, we will go beyond this basic functionality. Some of the features covered in this chapter overlap with features provided by consumer-grade routers, and as a result you may be somewhat familiar with configuring them. Others, however, go beyond what the typical consumer-grade router provides.

By the end of this chapter, you should know how to configure the following pfSense services:

  • Secure Shell (SSH) login
  • Dynamic Host Configuration Protocol (DHCP)
  • Domain Name System (DNS)
  • Dynamic DNS (DDNS)
  • Captive portals
  • Network Time Protocol (NTP)
  • Simple Network Management Protocol (SNMP)

Technical requirements

You should be able to configure of all of the services listed previously with the computer hardware listed under the Technical requirements for Chapter 1, Revisiting pfSense Basics. Having internet access on the other side of your pfSense firewall is useful for testing Dynamic DNS; often the easiest way to do this is with a mobile connection that provides internet access via a network separate from your home/office broadband connection. A wireless access point or router can be useful if you want to set up DHCP or captive portal on a wireless network. Just remember to disable DHCP if you are using a wireless router (put the router in wireless access point mode and let pfSense act as the DHCP server).

SSH login

In the previous chapter, we referred several times to configurations that can be done at the pfSense console. The same functionality is available via remote SSH login, if you enable it.

  1. To do so, navigate to System | Advanced. Make sure the Admin Access tab is selected and scroll down to the Secure Shell section of the page.
  2. Check the Secure Shell Server checkbox to enable SSH login.
  3. If all you want to do is enable traditional login via the standard SSH port (22), then you can click on the Save button at the bottom of the page.
  4. If you want to change the login port, you can do so by entering a port number other than 22 in the SSH port edit box. Changing the SSH port is a good additional security measure, especially if you plan on making SSH login accessible from the WAN side of the firewall.
  5. If you set a strong password, SSH login should be pretty secure, but you can...

DHCP

If you only have a few devices on your network, you could easily configure them with static IP addresses and not use a DHCP server at all. In such cases, internet connectivity will be established more quickly, since computers on the network won't have to go through the DHCP discovery-offer-request-acknowledge process. As the size of your network grows, however, a DHCP server becomes essential, as keeping track of statically assigned IP addresses will become far too cumbersome. Fortunately, configuring pfSense to act as a DHCP server is relatively easy, and can be done from either the console or the web GUI.

DHCP configuration at the console

DHCP configuration at the console can be done with the following steps:

    ...

DNS

It seems only appropriate that we should follow up a lengthy discussion on how to configure pfSense to handle the task of granting hosts IP addresses with a discussion on how to configure pfSense to handle the service that maps hostnames to IP addresses, thus making the internet much more user friendly. You may never have the occasion to set up your own DNS server, but there are compelling reasons to do so. Having your own DNS server can reduce administrative overhead and improve the speed of DNS queries, especially as your network grows. Moreover, the ease with which a DNS server can be set up with pfSense makes it that much more appealing.

It should be noted that pfSense has two separate services for DNS. Prior to version 2.2, DNS services were configurable via Services | DNS Forwarder, which invokes the dnsmasq daemon. For version 2.2 and later, unbound is the default DNS...

DDNS

Although DNS changes propagate through networks relatively quickly, the distributed nature of DNS and the fact that it is not fully automated means that it may take several hours to distribute a DNS change. While this is adequate for a service that only changes its IP address infrequently, it can be a problem if your IP address changes more often. For example, if you are running a server on an ISP that assigns IP addresses via DHCP, your public IP address will likely change more frequently. This is where DDNS, which provides a means of rapidly updating DNS information, comes in handy.

DDNS actually refers to two separate services. The first involves using a client to push the DNS change out to a remote DNS server. The second involves updating traditional DNS records without manually editing them (this mechanism is specified by the IETF's RFC 2136). pfSense provides the...

Captive portal

Businesses providing internet access for customers (usually via a wireless connection) is something that has become ubiquitous. Consequently, network administrators need a form of access control that covers such scenarios. You may want to redirect users to a login page to control access. Even if you don't want to require authentication, you may still want to redirect users to a page containing your terms of service. In such cases, you can utilize pfSense's captive portal service. Captive portal can be used to redirect wireless users to a login page, and it can also be used for wired users. Earlier versions of pfSense were limited to use of one interface on your firewall, but the current version allows you to enable captive portal on multiple interfaces.

Implementing...

NTP

NTP is an application layer protocol that controls the synchronization of various devices over the internet to within a few milliseconds of Coordinated Universal Time (CUT). NTP is hierarchical, with servers organized into different strata. At stratum 0 are high-precision time devices such as atomic clocks. At stratum 1 are computers that are synchronized within a few microseconds to their directly connected stratum 0 devices. At stratum 2 are computers that are directly connected to stratum 1 computers, and so on. Synchronization is achieved by adjusting the system time based on an offset. The offset is calculated by taking an average of the differences of the timestamps on request and response packets between the client and the server. The clock frequency is then adjusted to reduce the offset gradually, and the newly adjusted clock provides timestamps for the next request...

SNMP

SNMP is another application layer protocol supported by pfSense. SNMP collects and organizes information about managed devices, and is often used for monitoring network devices. SNMP-managed networks consist of managed devices, software running on the managed devices (known as agents), and software running on the manager, known as a network management station (NMS). The management data is organized hierarchically in structures known as management information bases (MIBs).

Enabling SNMP in pfSense will allow it to act as a network management station, and this in turn will enable you to monitor network traffic and flows, pfSense queues, as well as system information (for example, CPU, memory, and disk usage). It is also capable of running traps on managed devices that are triggered by certain events. SNMP is implemented under pfSense with the bsnmpd service. It contains the...

Summary

In this chapter, we covered several useful services that are available with pfSense. SSH login, DHCP, DDNS, and DNS are four services that you will probably want to implement at some point, even if you are using pfSense in a home or SOHO environment. The remaining services—captive portal, NTP, and SNMP—are services you might not be likely to implement unless you are using pfSense in a corporate environment. Nonetheless, it's a good idea to have a working knowledge of these services.

In the upcoming chapters, you will learn how to further unleash the power of pfSense, with an eye towards making our networks more robust and scalable. One of the ways we can make our networks more scalable is by implementing VLANs, and we will examine that in the next chapter.

Questions

Answer the following questions:

  1. (a) What transport layer protocol does DHCP use? (b) What ports does DHCP use? (c) What transport layer protocol does BOOTP use? (d) What ports does BOOTP use?
  2. What are the Router Advertisement (RA) flag settings that correspond to enabling Stateless DHCP (also known as SLAAC)?
  3. What are the two services pfSense has for DNS?
  4. (a) What transport layer protocol does DNS use? (b) What port does DNS use?
  5. What advantage does DDNS have over traditional DNS services?
  6. What are the three types of authentication that pfSense's captive portal service supports?
  7. What field must exist in the captive portal login page if voucher authentication is supported?
  8. Name a device that can be connected to the serial port to attain greater time accuracy than NTP normally would provide.
  9. What are management information bases (MIBs)?
  10. What is the default port for...
Left arrow icon Right arrow icon

Key benefits

  • •You can always do more to secure your software – so extend and customize your pfSense firewall
  • •Build a high availability security system that’s fault-tolerant – and capable of blocking potential threats
  • •Put the principles of better security into practice by implementing examples provided in the text

Description

pfSense has the same reliability and stability as even the most popular commercial firewall offerings on the market – but, like the very best open-source software, it doesn’t limit you. You’re in control – you can exploit and customize pfSense around your security needs. Mastering pfSense - Second Edition, covers features that have long been part of pfSense such as captive portal, VLANs, traffic shaping, VPNs, load balancing, Common Address Redundancy Protocol (CARP), multi-WAN, and routing. It also covers features that have been added with the release of 2.4, such as support for ZFS partitions and OpenVPN 2.4. This book takes into account the fact that, in order to support increased cryptographic loads, pfSense version 2.5 will require a CPU that supports AES-NI. The second edition of this book places more of an emphasis on the practical side of utilizing pfSense than the previous edition, and, as a result, more examples are provided which show in step-by-step fashion how to implement many features.

Who is this book for?

This book is for those with at least an intermediate understanding of networking. Prior knowledge of pfSense would be helpful but is not required. Those who have the resources to set up a pfSense firewall, either in a real or virtual environment, will especially benefit, as they will be able to follow along with the examples in the book.

What you will learn

  • •Configure pfSense services such as DHCP, Dynamic DNS, captive portal, DNS, NTP and SNMP
  • •Set up a managed switch to work with VLANs
  • •Use pfSense to allow, block and deny traffic, and to implement Network Address Translation (NAT)
  • •Make use of the traffic shaper to lower and raise the priority of certain types of traffic
  • •Set up and connect to a VPN tunnel with pfSense
  • •Incorporate redundancy and high availability by utilizing load balancing and the Common Address Redundancy Protocol (CARP)
  • •Explore diagnostic tools in pfSense to solve network problems

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 09, 2018
Length: 450 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788993173
Vendor :
Rubicon Communications, LLC
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 09, 2018
Length: 450 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788993173
Vendor :
Rubicon Communications, LLC
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 617.97
Learn pfSense 2.4
zł197.99
pfSense 2.x Cookbook
zł197.99
Mastering pfSense
zł221.99
Total 617.97 Stars icon
Banner background image

Table of Contents

14 Chapters
Revisiting pfSense Basics Chevron down icon Chevron up icon
Advanced pfSense Configuration Chevron down icon Chevron up icon
VLANs Chevron down icon Chevron up icon
Using pfSense as a Firewall Chevron down icon Chevron up icon
Network Address Translation Chevron down icon Chevron up icon
Traffic Shaping Chevron down icon Chevron up icon
Virtual Private Networks Chevron down icon Chevron up icon
Redundancy and High Availability Chevron down icon Chevron up icon
Multiple WANs Chevron down icon Chevron up icon
Routing and Bridging Chevron down icon Chevron up icon
Extending pfSense with Packages Chevron down icon Chevron up icon
Diagnostics and Troubleshooting Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Another Book You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3
(4 Ratings)
5 star 25%
4 star 25%
3 star 0%
2 star 50%
1 star 0%
Nicolas Boisvert Jul 31, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Je pars de zéro avec pfSense et ce livre m'a beaucoup aidé.
Amazon Verified review Amazon
Xenon 6 Jun 11, 2022
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Well written, readable book. The book does exactly what it says, teaching you how to use pfSense firewalls. Many customers can't afford the premium Palo Alto firewalls but pfSense is a credible alternative so being good at pfSense is a very useful skill set for an IT professional.From my experience many firewalls are incorrectly configured leaving customers exposed to hackers. Mistakes on firewalls can leave you unemployed or facing legal action so they are something you really have to know properly. If you are working in IT time spent learning about Cyber Security is time well spent.
Amazon Verified review Amazon
Brian Dec 22, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
This isn't going to make you a master of pfSense. Nothing in this book is more helpful than you will find in online tutorials and I don't even feel like it's a decent reference book for the shelf.
Amazon Verified review Amazon
SwedishMike Apr 22, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
This book have basically the same information as the 'Learn pfSense' book from the same author - with some added depth. IMHO - this could have been sold as basic book instead.I would not have bothered buying the basic book if I knew that this contained all this rehashed information - I'd have gone straight for this.Definitely not a book for 'mastering' pfSense - it has its moments but it is not getting all the way.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.