Setting Up New OPNsense with Almost Default Config and DNS Access Sites on Protected Laptop

Abstract: Configure OPNsense LAN DHCP and Unbound to provide local DNS resolution for protected devices without external dependencies.

Created: 2026-09-04 by

To set up a new OPNsense firewall with minimal configuration while ensuring DNS access for protected devices, configure the LAN interface to use DHCP with static reservations and enable local DNS resolution via Unbound. This approach bypasses external DNS dependencies during initial setup, allowing you to manage the router and test connectivity without complex routing rules or third-party resolvers.

Initial Network Configuration

When you first boot a fresh installation of OPNsense, the system assigns default IP addresses to its interfaces. The WAN port typically receives an IP address via DHCP from your upstream modem or internet service provider, while the LAN port is statically assigned 192.168.1.1/24. To begin, connect a laptop directly to one of the LAN ports using an Ethernet cable. Ensure your laptop’s network adapter is set to obtain an IP address automatically via DHCP.

Open a web browser on the laptop and navigate to http://192.168.1.1. You will be prompted to log in using the default credentials, which are usually user and password. Upon successful login, the system may ask you to change the password immediately. It is critical to create a strong, unique password at this stage to secure the management interface from unauthorized access. Once authenticated, you can proceed to adjust the network settings to ensure stable communication between the firewall and your local devices.

Configuring DHCP and Local DNS

The core of having "almost default" yet functional configuration lies in how the firewall handles name resolution for clients on the local network. By default, OPNsense uses the Unbound DNS resolver. To allow your protected laptop and other devices to resolve domain names without relying on potentially blocked or slow external servers, you must ensure that the DHCP server on the LAN interface offers the firewall itself as the primary DNS server.

Navigate to DHCP Server under the DHCP menu in the left-hand sidebar. Verify that the Enable checkbox is selected for the LAN interface. In the DNS Servers field, ensure that 192.168.1.1 is listed. If the field is empty, type it in manually. This setting tells every device that requests an IP address from the OPNsense box to use the firewall for all DNS queries. This is particularly useful when you want to implement ad-blocking or parental controls later, as all traffic passes through Unbound first.

If you need to assign a fixed IP address to your protected laptop so that it always appears with the same hostname or MAC address, scroll down to the Static Leases section. Click the plus icon to add a new entry. Enter the MAC address of the laptop’s network card and assign a specific IP address within the subnet range, such as 192.168.1.50. This ensures that even if the DHCP lease expires, the device will consistently receive the same address, simplifying future firewall rule creation.

Verifying Connectivity and Resolution

After saving the changes, disconnect and reconnect the Ethernet cable on your laptop to force a renewal of the DHCP lease. You can verify the configuration by opening a command prompt or terminal on the laptop and running nslookup google.com. The response should show that the query was handled by 192.168.1.1. If you encounter issues here, refer to resources on Troubleshooting: Cannot Connect to the Internet to diagnose basic connectivity failures before diving deeper into DNS specifics.

Firewall Rules and Access Control

With DNS resolution working, the next step is to ensure that the laptop can actually reach the internet. OPNsense comes with default firewall rules that generally allow outbound traffic from the LAN to the WAN. However, it is good practice to explicitly define these rules to maintain clarity and security. Go to Firewall > Rules > LAN.

You should see a default rule that allows all IPv4 and IPv6 traffic from the LAN network to any destination. If this rule is missing or disabled, create a new rule. Set the action to Pass, the protocol to any, and the source to the LAN net. The destination should be any. Save and apply the changes. This configuration permits your protected laptop to browse the web, download updates, and communicate with services over the internet.

If you wish to restrict access further, you can add additional rules above the pass-all rule to block specific domains or IPs. For most initial setups, however, keeping the default allow-all rule for outbound traffic is sufficient to get the system operational. Remember that inbound traffic from the internet to your LAN is blocked by default, which provides a layer of security for your protected devices.

Advanced DNS Options with Unbound

OPNsense includes Unbound, a recursive DNS resolver that can perform DNSSEC validation. This feature enhances security by ensuring that the DNS responses you receive are authentic and have not been tampered with. To enable this, go to DNS Resolver under the Services menu. Check the box for Enable and also check DNSSEC. Save the settings and restart the resolver.

This setup ensures that even if your ISP’s DNS servers are compromised or misconfigured, your local network remains secure against certain types of DNS spoofing attacks. It also allows you to view detailed logs of DNS queries in the Status > DNS Resolver section, which can be invaluable for troubleshooting. For more complex scenarios involving multiple VLANs or conflicting hostnames, consider reviewing How to Configure a Gateway's DHCP and DNS to Resolve Hosts with the Same Hostname but Different VLAN Domains for advanced routing strategies.

Frequently Asked Questions

Why can my laptop ping the gateway but not resolve websites?

This indicates that basic IP connectivity is working, but DNS is failing. Check the DHCP settings on the OPNsense LAN interface to ensure that 192.168.1.1 is provided as the DNS server. Additionally, verify that the Unbound service is running under Services > DNS Resolver.

Can I use Google DNS instead of the local Unbound resolver?

Yes, you can override the local resolver by specifying external DNS servers like 8.8.8.8 in the DHCP server settings. However, this bypasses local filtering and DNSSEC validation features provided by Unbound, reducing some security benefits.

What happens if I lose access to the OPNsense web interface?

If you misconfigure the LAN IP or disable the DHCP server, you can still access the console via serial connection or SSH if enabled. Resetting the network configuration requires physical access to the router to reboot into recovery mode or restore a backup config file.

How do I block specific websites for the protected laptop?

You can use the Unbound Domain Blocklist feature under Services > DNS Resolver. Add the domains you wish to block to the list, and Unbound will return a null response for those queries, effectively blocking access without needing complex firewall rules.

Is it safe to leave the default admin password unchanged?

No, leaving the default password is a significant security risk. Always change the password upon first login. Additionally, consider disabling remote access to the web interface and restricting management to the LAN subnet only.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More