Currently I am only able to connect to internet for a only short periods of time mostly after turning the router off and on again. Besides that I cannot get connection. I live in a student dorm and I get my internet straight from the wall with an ethernet cable. Personally I suspect I have some sort of DNS issue, since my school network might have something going on. But it might be something else.
Here's some debug info:
root@OpenWrt:~# nslookup openwrt.com
;; connection timed out; no servers could be reached
root@OpenWrt:~# ubus call system board; \
> uci export network; uci export dhcp; uci export firewall; \
> head -n -0 /etc/firewall.user; \
> ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
> ls -l /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
{
"kernel": "5.15.137",
"hostname": "OpenWrt",
"system": "Intel(R) Celeron(R) J6412 @ 2.00GHz",
"model": "Protectli VP2420",
"board_name": "protectli-vp2420",
"rootfs_type": "ext4",
"release": {
"distribution": "OpenWrt",
"version": "23.05.2",
"revision": "r23630-842932a63d",
"target": "x86/64",
"description": "OpenWrt 23.05.2 r23630-842932a63d"
}
}
package 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 ula_prefix 'fd68:1346:e6af::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0'
option proto 'dhcpv6'
config interface 'Frieren'
option proto 'static'
option device 'radio0.network1'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
package dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option cachesize '1000'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
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'
option ra_slaac '1'
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'
config dhcp 'Frieren'
option interface 'Frieren'
option start '100'
option limit '150'
option leasetime '12h'
package firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
list network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
config zone
option name 'FrierenFW'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'Frieren'
config forwarding
option src 'FrierenFW'
option dest 'wan'
head: /etc/firewall.user: No such file or directory
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
inet xx.xxx.x.111/24 brd xx.xxx.x.255 scope global eth0
valid_lft forever preferred_lft forever
7: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
valid_lft forever preferred_lft forever
8: phy0-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
inet 192.168.2.1/24 brd 192.168.2.255 scope global phy0-ap0
valid_lft forever preferred_lft forever
default via xx.xxx.x.254 dev eth0 src xx.xxx.x.111
xx.xxx.x.0/24 dev eth0 scope link src xx.xxx.x.111
192.168.1.0/24 dev br-lan scope link src 192.168.1.1
192.168.2.0/24 dev phy0-ap0 scope link src 192.168.2.1
local xx.xxx.x.111 dev eth0 table local scope host src xx.xxx.x.111
broadcast xx.xxx.x.255 dev eth0 table local scope link src xx.xxx.x.111
local 127.0.0.0/8 dev lo table local scope host src 127.0.0.1
local 127.0.0.1 dev lo table local scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local scope link src 127.0.0.1
local 192.168.1.1 dev br-lan table local scope host src 192.168.1.1
broadcast 192.168.1.255 dev br-lan table local scope link src 192.168.1.1
local 192.168.2.1 dev phy0-ap0 table local scope host src 192.168.2.1
broadcast 192.168.2.255 dev phy0-ap0 table local scope link src 192.168.2.1
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
lrwxrwxrwx 1 root root 16 Nov 14 13:38 /etc/resolv.conf -> /tmp/resolv.conf
-rw-r--r-- 1 root root 47 Feb 1 22:01 /tmp/resolv.conf
-rw-r--r-- 1 root root 76 Feb 1 22:33 /tmp/resolv.conf.d/resolv.conf.auto
/tmp/resolv.conf.d:
-rw-r--r-- 1 root root 76 Feb 1 22:33 resolv.conf.auto
==> /etc/resolv.conf <==
search lan
nameserver 127.0.0.1
nameserver ::1
==> /tmp/resolv.conf <==
search lan
nameserver 127.0.0.1
nameserver ::1
==> /tmp/resolv.conf.d <==
head: /tmp/resolv.conf.d: I/O error
==> /tmp/resolv.conf.d/resolv.conf.auto <==
# Interface wan
nameserver xx.xxx.x.1
nameserver xx.xxx.xx.1
search kyla.fi
I have tried to search for a solution online but to no avail. Any suggestions/help is greatly appreciated!
root@OpenWrt:~# traceroute -4 google.com
traceroute: bad address 'google.com'
root@OpenWrt:~# traceroute -6 google.com
traceroute: bad address 'google.com'
Here's what traceroute on my machine connected to the protectli box printed while OpenWrt was working:
[jsh@arch ~]$ traceroute -4 google.com
traceroute to google.com (142.250.74.174), 30 hops max, 60 byte packets
1 _gateway (192.168.1.1) 0.297 ms 0.307 ms 0.283 ms
2 xxxxxxxx.kyla.fi (xx.xxx.x.252) 0.773 ms 0.749 ms 0.725 ms
3 xxxxxxxx.ayy.fi (xx.xxx.xx.245) 0.771 ms 0.747 ms 0.811 ms
4 fi-csc.nordu.net (109.105.102.168) 0.744 ms 0.761 ms 0.737 ms
5 se-tug.nordu.net (109.105.101.10) 12.120 ms 12.098 ms 12.074 ms
6 se-kst2.nordu.net (109.105.101.25) 12.046 ms se-kst2.nordu.net (109.105.101.27) 11.650 ms se-kst2.nordu.net (109.105.101.29) 11.622 ms
7 72.14.196.42 (72.14.196.42) 11.970 ms google-gw.nordu.net (109.105.98.6) 12.468 ms as15169-10g-sk1.sthix.net (192.121.80.47) 12.223 ms
8 * * *
9 142.250.239.184 (142.250.239.184) 12.308 ms 142.251.48.40 (142.251.48.40) 12.281 ms 108.170.253.161 (108.170.253.161) 13.007 ms
10 arn11s12-in-f14.1e100.net (142.250.74.174) 12.235 ms 11.977 ms 108.170.253.181 (108.170.253.181) 11.857 ms
Are you required to do anything to login to the school network?
Someone is [at minimum] blocking access to ping 1.1.1.1 then. I'm guessing your school may block outbound DNS servers (i.e. outbound UDP traffic with port 53 as the DST) too.
After reverting your DNS setting - or using others, can you ping/lookup/trace openwrt.org (i.e. the web GUI diagnostic tool)?
Usually between 2 to 20 minutes. I can get it to work by manually unpugging and replugging the ethernet between the protectli box and the wall. Let me clarify something. During those short periods everything works normally including traceroute, nslookup, ping 1.1.1.1 etc.
No need to login or anything. If I plug my device directly to the wall there is no issues.
both fail.
Here is the output of logread where I go through the following states:
No connection -> unplug and replug eth cable -> connection for 5 mins -> no connection
Fri Feb 2 21:51:51 2024 user.notice con_status: everything stopped working
Fri Feb 2 21:52:32 2024 daemon.warn odhcpd[1789]: A default route is present but there is no public prefix on lan thus we don't announce a default route by overriding ra_lifetime!
Fri Feb 2 21:54:46 2024 user.notice con_status: I will unplug and replug the ethernet cable between the protectli box and wall next
Fri Feb 2 21:54:53 2024 daemon.notice netifd: Network device 'eth0' link is down
Fri Feb 2 21:54:53 2024 daemon.notice netifd: Interface 'wan' has link connectivity loss
Fri Feb 2 21:54:53 2024 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Fri Feb 2 21:54:53 2024 kern.info kernel: [ 2190.730794] igc 0000:01:00.0 eth0: NIC Link is Down
Fri Feb 2 21:54:53 2024 daemon.notice netifd: wan (6948): udhcpc: received SIGTERM
Fri Feb 2 21:54:53 2024 daemon.notice netifd: wan (6948): udhcpc: unicasting a release of xx.xxx.x.14 to xx.xxx.xx.33
Fri Feb 2 21:54:53 2024 daemon.notice netifd: wan (6948): udhcpc: sending release
Fri Feb 2 21:54:53 2024 daemon.notice netifd: wan (6948): udhcpc: entering released state
Fri Feb 2 21:54:53 2024 daemon.notice netifd: wan (6948): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Fri Feb 2 21:54:53 2024 daemon.notice netifd: Interface 'wan' is now down
Fri Feb 2 21:54:53 2024 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Fri Feb 2 21:54:54 2024 daemon.notice netifd: Interface 'wan6' is now down
Fri Feb 2 21:54:55 2024 daemon.warn odhcpd[1789]: No default route present, overriding ra_lifetime!
Fri Feb 2 21:54:57 2024 daemon.notice netifd: Network device 'eth0' link is up
Fri Feb 2 21:54:57 2024 daemon.notice netifd: Interface 'wan' has link connectivity
Fri Feb 2 21:54:57 2024 daemon.notice netifd: Interface 'wan' is setting up now
Fri Feb 2 21:54:57 2024 daemon.notice netifd: Interface 'wan6' has link connectivity
Fri Feb 2 21:54:57 2024 daemon.notice netifd: Interface 'wan6' is setting up now
Fri Feb 2 21:54:57 2024 kern.info kernel: [ 2195.271133] igc 0000:01:00.0 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Fri Feb 2 21:54:57 2024 daemon.notice netifd: wan (7377): udhcpc: started, v1.36.1
Fri Feb 2 21:54:58 2024 daemon.notice netifd: wan (7377): udhcpc: broadcasting discover
Fri Feb 2 21:55:00 2024 daemon.notice netifd: wan (7377): udhcpc: broadcasting discover
Fri Feb 2 21:55:01 2024 daemon.notice netifd: wan (7377): udhcpc: broadcasting select for xx.xxx.x.14, server xx.xxx.xx.33
Fri Feb 2 21:55:01 2024 daemon.notice netifd: wan (7377): udhcpc: lease of xx.xxx.x.14 obtained from xx.xxx.xx.33, lease time 86400
Fri Feb 2 21:55:01 2024 daemon.notice netifd: Interface 'wan' is now up
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using nameserver xx.xxx.x.1#53
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using nameserver xx.xxx.xx.1#53
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Fri Feb 2 21:55:01 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Fri Feb 2 21:55:02 2024 user.notice firewall: Reloading firewall due to ifup of wan (eth0)
Fri Feb 2 21:55:12 2024 daemon.notice netifd: Interface 'wan6' is now up
Fri Feb 2 21:55:12 2024 user.notice firewall: Reloading firewall due to ifup of wan6 (eth0)
Fri Feb 2 21:55:13 2024 daemon.warn odhcpd[1789]: A default route is present but there is no public prefix on lan thus we don't announce a default route by overriding ra_lifetime!
Fri Feb 2 21:55:14 2024 user.notice con_status: everything is currently working
Fri Feb 2 21:58:57 2024 user.notice con_status: everything stopped working
Fri Feb 2 22:00:11 2024 daemon.notice netifd: Network device 'eth0' link is down
Fri Feb 2 22:00:11 2024 daemon.notice netifd: Interface 'wan' has link connectivity loss
Fri Feb 2 22:00:11 2024 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Fri Feb 2 22:00:11 2024 kern.info kernel: [ 2509.210816] igc 0000:01:00.0 eth0: NIC Link is Down
Fri Feb 2 22:00:11 2024 daemon.notice netifd: wan (7377): udhcpc: received SIGTERM
Fri Feb 2 22:00:11 2024 daemon.notice netifd: wan (7377): udhcpc: unicasting a release of xx.xxx.x.14 to xx.xxx.xx.33
Fri Feb 2 22:00:11 2024 daemon.notice netifd: wan (7377): udhcpc: sending release
Fri Feb 2 22:00:11 2024 daemon.notice netifd: wan (7377): udhcpc: entering released state
Fri Feb 2 22:00:11 2024 daemon.notice netifd: wan (7377): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Fri Feb 2 22:00:11 2024 daemon.notice netifd: Interface 'wan' is now down
Fri Feb 2 22:00:11 2024 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Fri Feb 2 22:00:12 2024 daemon.notice netifd: Interface 'wan6' is now down
Fri Feb 2 22:00:13 2024 daemon.warn odhcpd[1789]: No default route present, overriding ra_lifetime!
Fri Feb 2 22:00:15 2024 daemon.notice netifd: Network device 'eth0' link is up
Fri Feb 2 22:00:15 2024 daemon.notice netifd: Interface 'wan' has link connectivity
Fri Feb 2 22:00:15 2024 daemon.notice netifd: Interface 'wan' is setting up now
Fri Feb 2 22:00:15 2024 daemon.notice netifd: Interface 'wan6' has link connectivity
Fri Feb 2 22:00:15 2024 daemon.notice netifd: Interface 'wan6' is setting up now
Fri Feb 2 22:00:15 2024 kern.info kernel: [ 2512.461101] igc 0000:01:00.0 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Fri Feb 2 22:00:15 2024 daemon.notice netifd: wan (7791): udhcpc: started, v1.36.1
Fri Feb 2 22:00:15 2024 daemon.notice netifd: wan (7791): udhcpc: broadcasting discover
Fri Feb 2 22:00:17 2024 daemon.notice netifd: wan (7791): udhcpc: broadcasting discover
Fri Feb 2 22:00:20 2024 daemon.notice netifd: wan (7791): udhcpc: broadcasting discover
Fri Feb 2 22:00:20 2024 daemon.notice netifd: wan (7791): udhcpc: broadcasting select for xx.xxx.x.14, server xx.xxx.xx.33
Fri Feb 2 22:00:20 2024 daemon.notice netifd: wan (7791): udhcpc: lease of xx.xxx.x.14 obtained from xx.xxx.xx.33, lease time 86400
Fri Feb 2 22:00:20 2024 daemon.notice netifd: Interface 'wan' is now up
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using nameserver xx.xxx.x.1#53
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using nameserver xx.xxx.xx.1#53
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Fri Feb 2 22:00:20 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Fri Feb 2 22:00:20 2024 user.notice firewall: Reloading firewall due to ifup of wan (eth0)
Fri Feb 2 22:00:29 2024 daemon.notice netifd: Interface 'wan6' is now up
Fri Feb 2 22:00:29 2024 user.notice firewall: Reloading firewall due to ifup of wan6 (eth0)
Fri Feb 2 22:00:30 2024 daemon.warn odhcpd[1789]: A default route is present but there is no public prefix on lan thus we don't announce a default route by overriding ra_lifetime!
In the logs I see some warnings about dhcp. Could that be the problem?
When everything is in failed state the stuff in the diagnostics page fails too.
Currently my wireless connection also only works for short periods of time similarly to eth.
I only followed the aforementioned Protectli's OpenWrt guide for setting up Wifi.
From the article:
Note: The settings above will not bridge your existing network. We added a wireless network to separate the management network and enabled wireless isolation for all clients connecting to it.
"non-official DNS servers blocked." So use official servers, or something that isn't port 53. It isn't clear if they are blocking only port 53, or the whole server IP so you could not use secure DNS 8.8.8.8:853 for example.
Look up the IP of a few ordinary sites (that are not itself DNS servers) while the network is working and make note of the numeric address. Then try to ping that address after the connection breaks. This will tell if it is a DNS or a general routing problem.
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have: