Protecting Your Laptop with OPNsense 23.7.5: Setting up a Nearly Default Config with DNS Access Site Protection
In this article, we will walk you through the process of setting up a nearly default configuration of OPNsense 23.7.5 to protect your laptop. We will focus on securing DNS access sites to ensure that your online activity remains private and secure.
Prerequisites
Before we begin, make sure that you have OPNsense 23.7.5 installed and running on your firewall. You should also have a laptop that is dual-booting Windows and Linux, with the OPNsense firewall sitting between the laptop and your ISP's router/modem.
Setting up the Default Configuration
To set up the default configuration of OPNsense, follow these steps:
Log in to the OPNsense web interface.
Navigate to the
Systemmenu and selectSettings.Under the
Generaltab, set theHostnameandDomainfields to your liking.Under the
Timetab, set your time zone and configure the NTP servers.Under the
Servicestab, enable the services that you want to use, such as DHCP, DNS, and OpenVPN.Under the
Firewalltab, configure the rules that you want to use to control traffic flowing in and out of your network.Under the
Accesstab, configure the users and groups that will have access to the OPNsense web interface.
Securing DNS Access Sites
To secure DNS access sites, we will use the built-in DNS resolver in OPNsense. Follow these steps:
Navigate to the
Servicesmenu and selectDNS Resolver.Enable the DNS resolver by checking the
Enablebox.Under the
General Settingstab, configure the following settings:Network Interfaces: Select the interface that is connected to your ISP's router/modem.Outgoing Network Interfaces: Select the interface that is connected to your laptop.DNS Query Forwarding: Uncheck this box to prevent OPNsense from forwarding DNS queries to your ISP's DNS servers.
Under the
Custom Optionstab, add the following lines to theAdditional Configfield:server: local-zone: "." redirect local-data: "example.com IN A 192.168.1.1"Replace
example.comwith the domain name of the DNS access site that you want to protect, and replace192.168.1.1with the IP address of the OPNsense firewall.
In this article, we have shown you how to set up a nearly default configuration of OPNsense 23.7.5 to protect your laptop. We have also shown you how to secure DNS access sites by using the built-in DNS resolver in OPNsense.