Grant LuCI Internet Access to OpenWRT Router/Switch

Abstract: Resolve OpenWrt internet connectivity issues by configuring WAN DNS, firewall forwarding rules, and LAN gateway settings via LuCI.

Created: 2026-08-01 by

To enable internet access for devices connected to an OpenWrt router via LuCI, you must configure the WAN interface with valid upstream DNS servers and ensure the firewall zone is set to accept traffic. Additionally, verify that DHCP settings on the LAN interface provide correct gateway addresses to clients, allowing them to route traffic through the router to the external network.

Configuring the WAN Interface

The primary requirement for internet connectivity is a properly configured Wide Area Network (WAN) interface. In the LuCI web interface, navigate to Network and then select Interfaces. You will see a list of existing interfaces; locate the one labeled wan or create a new interface if none exists.

Select the WAN interface and click Edit. Ensure the Protocol is set correctly for your connection type. For most residential connections, this will be DHCP client if your ISP provides an IP address dynamically, or PPPoE if you require authentication credentials. If using PPPoE, enter the username and password provided by your service provider. Under the General Settings tab, ensure the Device field corresponds to the physical port connected to your modem or upstream router, such as eth0 or eth1.

A common mistake is leaving the DNS fields blank. While some protocols fetch DNS automatically, it is best practice to manually specify reliable public DNS servers. Scroll down to the DNS Server field and enter primary and secondary servers like 8.8.8.8 and 1.1.1.1. This ensures that even if the upstream provider fails to push DNS information, your router can resolve domain names. After making these changes, click Save and then Save & Apply to commit the configuration.

Verifying Firewall Zone Settings

OpenWrt uses a strict default firewall policy where traffic from untrusted zones (like WAN) to trusted zones (like LAN) is dropped unless explicitly allowed. To allow internet access, the WAN zone must be permitted to forward traffic to the LAN zone. Go to Network > Firewall and select the Zones tab.

Locate the lan zone and ensure its Output setting is set to Accept. Similarly, check the wan zone. The critical setting here is the Forward rule between zones. Navigate to the Rules tab. You should see a rule that allows forwarding from wan to lan. If this rule is missing or disabled, internet access will be blocked. Ensure the Source zone is wan, the Destination zone is lan, and the Action is set to Accept. Without this explicit permission, packets from your WiFi or Ethernet devices cannot traverse the router to reach the internet.

Checking LAN DHCP and Gateway Configuration

Even with a working WAN connection, local devices may fail to connect if they do not know how to reach the gateway. Navigate to Network > Interfaces and edit the lan interface. Under the DHCP Server tab, verify that DHCPv4 is enabled. The Gateway field should point to the IP address of the LAN interface itself, typically 192.168.1.1 or 192.168.0.1, depending on your subnet mask.

If the gateway is misconfigured, devices will receive an IP address but lack a route to the outside world. Also, check the DNS field in the LAN DHCP settings. It is advisable to set this to the same public DNS servers used in the WAN configuration, ensuring consistency. Save the changes and restart the DHCP service by clicking Restart next to the interface, or simply reboot the router to apply all network changes cleanly.

Troubleshooting Connectivity Issues

If devices still cannot access the internet after these configurations, check the physical link status. Ensure the cable connecting the modem to the router's WAN port shows solid lights. Sometimes, the issue lies with the upstream device rather than the OpenWrt configuration. For more detailed diagnostics, you might need to investigate why SSH is not functioning correctly if remote management is required, as seen in Why doesn't SSH work if WiFi is on while ethernet is connected?. This can help isolate whether the problem is strictly routing-related or involves broader network stack issues.

Another potential pitfall is incorrect MTU (Maximum Transmission Unit) settings, which can cause packet fragmentation and loss. If you suspect this, you can test connectivity using ping commands from the router's command line. Log in via SSH and run ping -s 1472 8.8.8.8. If this fails but smaller pings succeed, you may need to adjust the MTU size in the WAN interface settings under the Advanced Settings tab.

Testing and Validation

Once all settings are applied, validate the setup by connecting a device to either the WiFi or an Ethernet port on the LAN side. Open a browser and attempt to load any website. If the page loads, the configuration is successful. You can also use the LuCI dashboard to monitor traffic statistics under Status > Routing to see if packets are being routed out through the WAN interface.

If you encounter issues where devices are reachable locally but have no internet, refer to guides on Troubleshooting Linux Device Not Reachable During Network (Ping) to diagnose layer 2 or layer 3 isolation problems. This often helps distinguish between a routing error and a simple IP conflict or cabling fault.

Frequently Asked Questions

Why can I ping the router but not any websites?

This indicates a DNS resolution failure rather than a routing issue. Check the DNS server entries in both the WAN and LAN interface configurations. Ensure they are set to valid public DNS servers like Google or Cloudflare. Restart the DHCP service on the LAN interface to force clients to request the new DNS settings.

What should I do if the WAN interface shows "No Link"?

Verify that the Ethernet cable is securely plugged into the correct port designated as WAN in the LuCI interface. Check the LED indicators on the router port to confirm physical connectivity. If the link is active but no IP is obtained, try changing the protocol from DHCP to Static if your ISP requires specific IP assignments.

Can I use a different subnet for the LAN interface?

Yes, you can change the LAN IP address and subnet mask in the Interface settings. However, ensure that no other device on your network uses the same IP range to avoid conflicts. Changing the subnet will require reconfiguring any static IP reservations or port forwarding rules previously established.

How do I reset the network configuration if I get locked out?

If you misconfigure the network and lose access, perform a hard reset by holding the reset button on the router for about 10 seconds until the LEDs flash. This restores all settings to factory defaults, including the default LAN IP and password. You can then log in again and reconfigure the WAN settings carefully.

Does enabling IPv6 affect my internet access?

Enabling IPv6 can provide faster direct routes but may complicate firewall rules if not configured correctly. If you experience intermittent connectivity, try disabling IPv6 in the WAN interface settings to isolate whether the issue is related to IPv6 routing or dual-stack compatibility. Most standard web browsing works fine over IPv4 alone.

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