Andrew Mercer

Network

Local subnet access works, but internet doesn't

tl;dr:

I installed Cobbler to demo it and it has a DHCP server bundled in it. Clients of OpenWrt (and OpenWrt itself) were getting incorrect DHCP information. Here's how I manually fixed OpenWrt.

Manually update network info

ifstatus wan # make sure it's up
/etc/init.d/dnsmasq disable # Disable DHCP server if running and not needed
uci show firewall # Check the firewall
uci show network.lan
brctl show # check the lan interfaces are associated with the bridge
uci show wireless | grep network # look that the wireless is associated with lan: wireless.@wifi-iface[0].network='lan'
ip route # Make sure it has a default route
uci show network.lan | grep -e gateway -e dns # and that it is correct and dns is set/correct

If it doesn't have a default route or is incorrect, manually add one and configure DNS

uci set network.lan.gateway='[ gateway_ip ]'
uci set network.lan.dns='[ gateway_ip ]'
uci commit network
/etc/init.d/network restart