Search icon CANCEL
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 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

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 : 9781789532975
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 : Jul 30, 2018
Length: 152 pages
Edition : 1st
Language : English
ISBN-13 : 9781789532975
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%
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
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
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.