My First 5 Minutes on an OpenWRT Router

by kacang bawang

This article talks about the changes that I like to make away from default configuration on a new OpenWRT installation.

Set password, then re-login via ssh

Turn off IPv6
If you don’t have a specific use for it, turn it off.

Configure WAN and LAN

I don’t like my wired and wireless bridged, so remove the bridge. Then add a new interface definition for the wifi network. We will need to add routing between wired and wireless in the firewall settings later.

Link wireless device to ‘wifi’ interface, and select AP/Client mode. If you want to be an access point, set mode to ‘ap’. If you want to connect to an access point, then set mode to ‘client’. The other settings are dual-purpose.

Enable DHCP on the wifi interface

Configure local domain name

I found it easiest to edit dnsmasq.conf directly than to try to go through UCI (the stuff in /etc/config) for this one.

Configure firewall

Last but not least, we need to include the ‘wifi’ interface into the “lan” zone of the firewall. This marks the wifi interface as trusted, and messages from it will be accepted and forward to other interfaces.

And that’s about it. We’ve split out the wifi interface (which comes bridged by default) and set up host names for our DHCP clients. The rest of the settings are fine as defaults. Perhaps the wifi settings could use a tweaking, but that’s a topic for another day.