Openwrt router suddenly thinks it's offline (it's not)

ping: bad address 'openwrt.org'

I am unfortunately not local to the router, but I am the only one with the password. I can access it fine remotely via Wireguard so there's no question it is connected. Tails it connects to the network, but does not work as a node. Ping also shows it thinks it's not connected.

Apparently no one has touched the router, but I am waiting for photos incase WAN cable has been plugged into LAN, though I suspect if this were the case I wouldn't have any remote access through wireguard anyway.

Everything has been reset but still no access.

Any ideas what it could be or what I could check?

If you can connect to it form remote it has an internet connection.

Could be DNS problem.

Try ping 8.8.8.8

If that works restart DNS: service dnsmasq restart or reboot the router

Ping 8.8.8.8 works perfectly but service dnsmasq restart gave me the following output:

root@OpenWrt:~# service dnsmasq restart
udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: no lease, failing

That is normal it checks for another DHCP server and fails so that is OK

Is there anything else I can check? I am still not connected.

root@OpenWrt:~# nslookup google.com

;; connection timed out; no servers could be reached

Did you try a reboot?

Otherwise check DNSMasq settings maybe the DNS server you set as forwarder is off line?

Yes, rebooted a couple of times. Also the ISP router was rebooted.

DNSMasq appears to be empty:

root@OpenWrt:~# vi /etc/dnsmasq.conf

# example.com                                                        
#srv-host=_ldap._tcp.example.com                                     
                                                                     
# The following line shows how to make dnsmasq serve an arbitrary PTR
# record. This is useful for DNS-SD.                                 
# The fields are <name>,<target>                                     
#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-serv
                                                                                
# Change the following lines to enable dnsmasq to serve TXT records.            
# These are used for things like SPF and zeroconf.                              
# The fields are <name>,<text>,<text>...                                        
                                                                                
#Example SPF.                                                                   
#txt-record=example.com,"v=spf1 a -all"                                         
                                                                                
#Example zeroconf                                                               
#txt-record=_http._tcp.example.com,name=value,paper=A4                          
                                                                                
# Provide an alias for a "local" DNS name. Note that this _only_ works          
# for targets which are names from DHCP or /etc/hosts. Give host                
# "bert" another name, bertrand                                                 
# The fields are <cname>,<target>                                     
#cname=bertand,bert

That is normal you need: cat /etc/config/dhcp

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'
  • Do you have DNS servers configured for the WAN interface?
  • Can we see the network config?

And this is resolv.conf

root@OpenWrt:~# cat /etc/resolv.conf

# resolv.conf(5) file generated by tailscale

# DO NOT EDIT THIS FILE BY HAND -- CHANGES WILL BE OVERWRITTEN

nameserver 100.100.100.100

search tail80d30.ts.net

You have not specified any servers here , which is normally OK, as you set the DNS forwarder on the interface they enter the router so normally on the WAN, these DNS forwarder are then added to '/tmp/resolv.conf.d/resolv.conf.auto'

So let see cat '/tmp/resolv.conf.d/resolv.conf.auto'

You can add DNS forwarder in the dnsmasq section, see last two lines, like:

OK so you are running tailscale?

Cannot help with that as I have no experience with that

root@OpenWrt:~# cat '/tmp/resolv.conf.d/resolv.conf.auto'

# Interface WG0

nameserver 192.168.1.1

# Interface lan

nameserver 192.168.1.1

# Interface wan

nameserver 192.168.1.1

search lan

192.168.1.1 is the ISP router address.

So you think maybe Tailscale addon has caused these issues? I currently have the service stopped and I have had Tailscale installed for a few months, no changes made there either.

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option packet_steering '1'
	option ula_prefix 'hidden::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'

config device
	option name 'lan1'
	option macaddr 'hidden'

config device
	option name 'lan2'
	option macaddr 'hidden'

config device
	option name 'lan3'
	option macaddr 'hidden'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.4.1'
	list dns '192.168.1.1'

config device
	option name 'wan'
	option macaddr 'hidden'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'

config interface 'WG0'
	option proto 'wireguard'
	option private_key 'hidden'
	option listen_port '1234'
	list addresses '192.168.5.0/24'
	option peerdns '0'
	list dns '192.168.1.1'

config wireguard_WG0
	option public_key 'hidden'
	list allowed_ips '192.168.5.4/32'
	option persistent_keepalive '25'
	option description '4'

config wireguard_WG0
	list allowed_ips '192.168.5.5/32'
	option persistent_keepalive '25'
	option public_key 'hidden'
	option description '5'

config wireguard_WG0
	option description '6'
	option public_key 'hidden'
	list allowed_ips '192.168.5.6/32'
	option persistent_keepalive '25'

config wireguard_WG0
	option description '7'
	option public_key 'hidden'
	list allowed_ips '192.168.5.7/32'
	option persistent_keepalive '25'

config wireguard_WG0
	option public_key 'hidden'
	list allowed_ips '192.168.5.8/32'
	option persistent_keepalive '25'
	option description '8'

config wireguard_WG0
	list allowed_ips '192.168.5.9/32'
	option persistent_keepalive '25'
	option description '9'
	option public_key 'hidden'

config interface 'Tailscale'
	option proto 'none'
	option device 'tailscale0'

I honestly do not know, but I see that the only DNS server is 192.168.1.1 probably this is a router behind another router which has that address and might not respond?

Anyway you can try to add the DNS servers 8.8.8.8 and 8.8.4.4 as stated in my earlier post and see if that mitigates it.
Restart dnsmasq after adding

Yup 192.168.1.1 is the ISP router.

What command do I use to add the other two DNS servers?

I added the DNS servers, but still no access. :frowning:

root@OpenWrt:~# nslookup google.com

;; connection timed out; no servers could be reached