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 now! 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
Conferences
Free Learning
Arrow right icon
Network Security with pfSense
Network Security with pfSense

Network Security with pfSense: Architect, deploy, and operate enterprise-grade firewalls

eBook
€13.98 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.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
Table of content icon View table of contents Preview book icon Preview Book

Network Security with pfSense

pfSense as a Firewall

In the previous chapter, you got familiar with pfSense and the features provided by it. You also went through the process of installing and configuring pfSense, and you subsequently configured your pfSense server as a DHCP server. A firewall is a software or hardware device that protects your computer from being attacked over the internet by hackers, viruses, and worms. This may occur either on a large corporate network, or simply on a small home network. Both have the same security issues. With the level of threats floating around on the internet, the firewall has become an essential part of any network, large or small. pfSense is a very robust, secure, and flexible firewall. In this chapter, you will learn how to configure pfSense as a firewall. You'll also learn how to create and manage multiple firewall rules.

Here are some of the key learning...

What is a firewall?

A firewall is a hardware or software based network security system that uses rules to control incoming and outgoing network traffic. It basically acts as a barrier between a trusted network and an untrusted network. A firewall controls access to the resources of a network through a positive control model. What this means is that only the traffic defined in the firewall policy is allowed onto the network, and all other traffic is denied. It filters traffic by source and destination IP, protocols, source, and destination ports for both TCP and UDP traffic. It also limits simultaneous connection on a rule basis.

Now, let's take a look at the following diagram and see how pfSense can act as a firewall:

Consider that there is an external cloud network, which represents the Internet. Next, you have an ISP connection device, such as a cable modem, an ADSL modem...

Configuring pfSense as a firewall

Let's connect to the pfSense server via a browser:

  1. Navigate to 192.168.1.1, which is the internal LAN IP address for the pfSense server.
  2. Enter the credentials to log in to the pfSense server. Here, the admin user has logged in successfully.

We allocated an additional network interface to the virtual machine, but have not configured it yet. So, let's take care of that now.

  1. Click Interfaces on the top toolbar, and select LAN2. There you can configure the LAN2 with a static IP address as you did for earlier LAN interface we configured previously.
  2. After setting the configurations for LAN2, let's click the Apply Changes button to save the configuration. You can see that the changes have been successfully saved. Let's go back to the main pfSense Dashboard:

And you will see that LAN2 is up and running with an IP address of...

Setting up firewall rules

In the previous section, we enabled the firewall functionality within pfSense. Now it is time to configure firewall rules:

  1. Back in the pfSense WebGUI console, to set up rules for the firewall go to the Firewall menu and then click Rules. Firewall rules are configured for each network interface. The following screenshot shows the WAN tab:

As you can see, pfSense is flexible enough to allow for firewall rules for each individual network, rather than enforcing these rules globally. Moreover, the rules follow a specific order. The rules on these tabs process traffic in an inbound direction and are processed from the top down, stopping at the first match. Where no user-configured firewall rules match, the traffic is denied. The firewall rules on the LAN interface, allowing the LAN subnet to access any destination, are implemented by pfSense by default....

Managing firewall rules

You have configured firewall rules for LAN1 and LAN2. Now, let's see how you can manage these rules. Now that you have created many rules for the firewall, you need to understand how to manage all of these rules efficiently and effectively.

If you want to add a new rule that is very similar to an existing rule, you can copy the existing rule.

  1. Click the LAN2 tab and try to create some new rules by copying existing rules. Here, we have only created ICMP and DNS rules. Let's create some more standard rules.
  2. Click the copy icon under Actions for the DNS (53) rule. You can now make modifications to the rule as required. All the fields are copied from the original rule. For this instance, let's change the Source port range to HTTP(80) and leave the other fields as they are.
  3. Click the Save button. And this is the quickest way to create new rules...

Summary

Let's recap some of the key points covered in this chapter. You learned all about what firewalls are, their key functions, and importance. Next, you learned all about configuring pfSense as a firewall. You also learned how to set up firewall rules for multiple LANs, as well as how to manage these firewall rules using pfSense.

In the next chapter, you will learn about the load balancing and failover functionality provided by pfSense to work with multiple WAN connections.

Left arrow icon Right arrow icon

Key benefits

  • Explore pfSense, a trusted open source network security solution
  • Configure pfSense as a firewall and create and manage firewall rules
  • Test pfSense for failover and load balancing across multiple WAN connections

Description

While connected to the internet, you’re a potential target for an array of cyber threats, such as hackers, keyloggers, and Trojans that attack through unpatched security holes. A firewall works as a barrier (or ‘shield’) between your computer and cyberspace. pfSense is highly versatile firewall software. With thousands of enterprises using pfSense, it is fast becoming the world's most trusted open source network security solution. Network Security with pfSense begins with an introduction to pfSense, where you will gain an understanding of what pfSense is, its key features, and advantages. Next, you will learn how to configure pfSense as a firewall and create and manage firewall rules. As you make your way through the chapters, you will test pfSense for failover and load balancing across multiple wide area network (WAN) connections. You will then configure pfSense with OpenVPN for secure remote connectivity and implement IPsec VPN tunnels with pfSense. In the concluding chapters, you’ll understand how to configure and integrate pfSense as a Squid proxy server. By the end of this book, you will be able to leverage the power of pfSense to build a secure network.

Who is this book for?

Network Security with pfSense is for IT administrators, security administrators, technical architects, chief experience officers, and individuals who own a home or small office network and want to secure it.

What you will learn

  • Understand what pfSense is, its key features, and advantages
  • Configure pfSense as a firewall
  • Set up pfSense for failover and load balancing
  • Connect clients through an OpenVPN client
  • Configure an IPsec VPN tunnel with pfSense
  • Integrate the Squid proxy into pfSense

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 30, 2018
Length: 152 pages
Edition : 1st
Language : English
ISBN-13 : 9781789538618
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

Product Details

Publication date : Jul 30, 2018
Length: 152 pages
Edition : 1st
Language : English
ISBN-13 : 9781789538618
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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
€264.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 103.97
Mastering pfSense
€41.99
Learn pfSense 2.4
€36.99
Network Security with pfSense
€24.99
Total 103.97 Stars icon

Table of Contents

6 Chapters
Introduction to pfSense Chevron down icon Chevron up icon
pfSense as a Firewall Chevron down icon Chevron up icon
pfSense as a Failover and Load Balancer Chevron down icon Chevron up icon
Remote Connectivity with pfSense and IPsec Chevron down icon Chevron up icon
Using pfSense as a Squid Proxy Server Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(3 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Amazon Customer Oct 25, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
"pfsense is a really awesome free firewall. I use it to secure my home network. just buy a cheap old computer with 2GB of ram - and you are good to go."
Amazon Verified review Amazon
Amazon Customer Oct 25, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The explanation about various ways pfSense can help secure your network is bang on. I really appreciated the fact the language is simple and the steps to setup things are detailed enough. I was able to setup a new pfSense firewall on an old Pentium PC I had lying around in the basement.
Amazon Verified review Amazon
mtrego Sep 10, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book was well written and easy to follow. It seems to cover all the things necessary to understand pfSense from a security perspective. Recommended.
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.