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

eBook
$9.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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 : 9781788993470
Vendor :
Rubicon Communications, LLC
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : May 09, 2018
Length: 450 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788993470
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 $5 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 $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 152.97
Learn pfSense 2.4
$48.99
pfSense 2.x Cookbook
$48.99
Mastering pfSense
$54.99
Total $ 152.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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.