Book Image

OPNsense Beginner to Professional

By : Julio Cesar Bueno de Camargo
5 (1)
Book Image

OPNsense Beginner to Professional

5 (1)
By: Julio Cesar Bueno de Camargo

Overview of this book

OPNsense is one of the most powerful open source firewalls and routing platforms available. With OPNsense, you can now protect networks using features that were only previously available to closed source commercial firewalls. This book is a practical guide to building a comprehensive network defense strategy using OPNsense. You’ll start with the basics, understanding how to install, configure, and protect network resources using native features and additional OPNsense plugins. Next, you’ll explore real-world examples to gain in-depth knowledge of firewalls and network defense. You’ll then focus on boosting your network defense, preventing cyber threats, and improving your knowledge of firewalling using this open source security platform. By the end of this OPNsense book, you’ll be able to install, configure, and manage the OPNsense firewall by making the most of its features.
Table of Contents (25 chapters)
1
Section 1: Initial Configuration
6
Section 2: Securing the Network
13
Section 3: Going beyond the Firewall

What this book covers

Chapter 1, An OPNsense Overview, will introduce you to the OPNsense project and tell you about its history, license, fork motivations, and where you can find help if you need it. We will learn a little bit about FreeBSD and its fork, HardenedBSD, and explore OPNsense features and the common deployment scenarios you can use them in.

Chapter 2, Installing OPNsense, will teach you how to choose the right OPNsense version for your project, download it, and do the initial configuration. We will also see how to expand OPNsense features with plugin installations and briefly discuss FreeBSD's packages.

Chapter 3, Configuring an OPNsense Network, discusses networking configuration and concepts in OPNsense. We will dive into each network interface type and see some examples of how to use each one and learn about the different types of virtual IP addresses. At the end of the chapter, we will tackle some of the common problems with networking and how to solve them.

Chapter 4, System Configuration, provides steps on how to configure OPNsense common and advanced settings, managing users, groups, and certificates, how to add external authentication, and how to perform backups and restores.

Chapter 5, Firewall, starts with firewalling concepts and the features available on OPNsense. We will learn how to manage rules, change firewalling settings when necessary, and troubleshoot common issues using diagnostic tools and logs.

Chapter 6, Network Address Translation (NAT), explores the different types of Network Address Translation (NAT), such as port forwarding, outbounds, and one-to-ones, and how to use each one. We will also briefly discuss IPv6 network prefix translation and how to troubleshoot NAT common problems.

Chapter 7, Traffic Shaping, provides an overview of traffic shaping and how to use it on OPNsense to prioritize and limit network bandwidth. We will learn about pipes and queues, how to combine them to create rules, and how to monitor them.

Chapter 8, Virtual Private Networking, will dive into the Virtual Private Network (VPN) world. We will explore the different types of deployments and technologies available on OPNsense, and learn how to troubleshoot some common issues and monitor VPN tunnels.

Chapter 9, Multi-WAN – Failover and Load Balancing, explores some multi-Wide Area Network (WAN) strategies such as load balancing and failover. We will learn how to create gateway groups and policy-based rules using them. We also will see some caveats while using multi-WAN on OPNsense and how to solve the most common issues with it.

Chapter 10, Reporting, will teach you how to correctly read graphs, which is a very important part of managing a firewall. We will explore the available graphs and how to use them to identify possible unexpected behaviors in a network or see a firewall's health.

Chapter 11, Deploying DHCP in OPNsense, discusses one of the possible firewall duties – providing IP addresses to network hosts. We will learn about the Dynamic Host Configuration Protocol (DHCP) concepts used by OPNsense and how to use them to perform dynamic IP address leasing.

Chapter 12, DNS Services, covers DNS resolvers, what the available options are on OPNsense core, and the features available in each one. We will also take a brief look at dynamic DNS and explore some available DNS plugins to see how to troubleshoot common issues with DNS resolving.

Chapter 13, Web Proxy, shows how to configure and understand the different options to deploy a web proxy, one of the top features of a firewall solution. With it, you will be able to extend the control capabilities of OPNsense to another level.

Chapter 14, Captive Portal, shows how to configure and use a captive portal with OPNsense, and covers the most common deployments and issues and how to solve them.

Chapter 15, Network Intrusion (Detection and Prevention) System, explores IDS/IPS concepts, Suricata and Netmap implementations on OPNsense, and how to use them to alert or block threats on a network.

Chapter 16, Next-Generation Firewall with Zenarmor, Zenarmorexplores the ZenarmorZenarmor plugin, which broke the commercial-only next-generation firewall barrier and brought to the open source world this wonderful feature. We will examine its features and how to install and use it to apply a layer 7 control in a network.

Chapter 17, Firewall High Availability, shows how to configure high availability by connecting two firewalls to sync configuration, connect states, and preserve network connectivity if something goes wrong with one of our firewalls.

Chapter 18, Website Protection with OPNsense, delves into the NGINX plugin, with which OPNsense became a strong full-featured Web Application Firewall (WAF), helping you to protect your network and web servers.

Chapter 19, Command Line Interface, explores the shell command-line interface and some of the most relevant FreeBSD commands to manage the operating system, networking, and firewalling. We also will learn how to customize some parts of the system and use commands to improve information extraction from logs.

Chapter 20, API – Application Programming Interface, explores the APIs on OPNsense, how they work, and how to use them, with some scripting examples.