Not sure if my question is too unspecific, but I'm not quite sure where to start looking. But I think my issue is related to my OpenWRT configuration somehow.
I have a Nextcloud server connected to the 5G WiFi device of my OpenWRT router (WiFi-A). When my client (Android with Nextcloud app) is connected to WiFi-A or mobile data connection, it has no problem communicating with Nextcloud. But when my client is connected to the 2.4G WiFi device (WiFi-B), it sometimes works, and sometimes throws a "server not available" error.
I'm connecting to Nextcloud via URL/external IP. Do any of you have any pointers where to start looking? Most of my OpenWRT configuration is at default.
Thanks!!
It sounds like, although I'm guessing, the 5G and 2.4G wifi radios are configured with different underlying networks as compared to both being part of the same network. Is that correct? And if so, is there a reason you specifically want to do this?
Let's review your config:
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:
ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
1 Like
Thanks a lot for your help! I don't think they're on different underlying networks, both are within br-lan.
But let me get the config..
ubus call system board
root@OpenWrt:~# ubus call system board
{
"kernel": "5.15.137",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 4",
"model": "Cudy WR3000 v1",
"board_name": "cudy,wr3000-v1",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "23.05.2",
"revision": "r23630-842932a63d",
"target": "mediatek/filogic",
"description": "OpenWrt 23.05.2 r23630-842932a63d"
}
}
cat /etc/config/network
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 ula_prefix 'REDACTED'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
option ipv6 '0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
list dns '9.9.9.9'
list dns '149.112.112.112'
list dns '2620:fe::fe'
list dns '2620:fe::9'
option delegate '0'
config interface 'wan'
option device 'wan'
option proto 'pppoe'
option username 'REDACTED'
option password 'REDACTED'
option ipv6 'auto'
cat /etc/config/wireless
root@OpenWrt:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/18000000.wifi'
option channel '7'
option band '2g'
option htmode 'HE40'
option cell_density '0'
option country 'DE'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'REDACTED'
option encryption 'psk2'
option key 'REDACTED'
config wifi-device 'radio1'
option type 'mac80211'
option path 'platform/18000000.wifi+1'
option channel '116'
option band '5g'
option htmode 'HE160'
option country 'DE'
option cell_density '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'REDACTED'
option encryption 'psk2'
option key 'REDACTED'
cat /etc/config/dhcp
root@OpenWrt:~# cat /etc/config/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 authoritative '1'
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 ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option dhcpv6 'server'
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 host
REDACTED
config host
REDACTED
config host
REDACTED
config host
option name 'Nextcloud-Client'
list mac 'REDACTED'
option ip '192.168.1.108'
option leasetime 'infinite'
config host
option name 'Nextcloud-Server'
list mac 'REDACTED'
option ip '192.168.1.111'
option leasetime 'infinite'
config host
REDACTED
cat /etc/config/firewall
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
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 redirect
option dest 'lan'
option target 'DNAT'
option name 'Nextcloud-SSH'
list proto 'tcp'
option src 'wan'
option src_dport '1234'
option dest_ip '192.168.1.111'
option dest_port '1234'
option enabled '0'
config redirect
option dest 'lan'
option target 'DNAT'
option name 'Nextcloud-HTTP'
list proto 'tcp'
option src 'wan'
option src_dport '123'
option dest_ip '192.168.1.111'
option dest_port '123'
config redirect
option dest 'lan'
option target 'DNAT'
option name 'Nextcloud-HTTPS'
list proto 'tcp'
option src 'wan'
option src_dport '234'
option dest_ip '192.168.1.111'
option dest_port '234'
Kraligor:
"version": "23.05.2",
You may want to upgrade to 23.05.5.
You're right, and my guess was wrong (but that's why I always ask for the configs).
I honestly don't see any reason for the behavior that you are experiencing. But I will say that the generally recommended approach is to use the same SSID for both bands so that client devices can use either band at any given moment, switching per their wireless logic based on the signal quality.
1 Like
Will do, thanks for the reminder.
Shows how little I know about networking lol, didn't know about that, will do that as well!
I'll keep searching for a reason of my issue and will post here if I find anything. Thanks again!
If anyone else has any idea, let me know, but maybe it's not an OpenWRT configuration issue after all..
Quick update, the issue might be caused by phantom A record DNS entries I've found for my domain in all major DNS providers (A records for both the correct and incorrect IPs). My domain host has now reset all DNS entries and reentered the correct ones (shoutout to Porkbun for enterprise grade support on a holiday), now I'm waiting for DNS propagation to test again.
Yep, that's been it. No idea why it seemingly worked on one WiFi, but not on the other, but with the DNS records corrected I can reach my Nextcloud instance from all devices.
system
Closed
January 10, 2025, 11:34am
8
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.