I have recently installed OpenWRT on a WRX36 and setting everything up. I have installed Wireguard server and configured. I have created a peer for Android and one for Windows 10 laptop with recent updates.
On Android, everything works as expected using the official Wireguard client. From a public wifi I enable WG, and I have full access to my network and the internet using the tunnel.
On Windows, using the same settings (just a different peer client), when using the official Windows client (0.5.3, latest even if it's from 2021) I cannot browse the internet or intranet, but I can ping the intranet IP addresses. Using Wiresock or TunnlTo clients and the exact same configuration, everything works as expected (I did say it's puzzling, didn't I ). The client configuration was exported from the Luci UI, and as I said works in the non-official clients, so I don't think that there's anything there. The non official clients use winsocks, though, not the virtual lan
One thing I noticed, when using the official client ipconfig results in
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.99.3
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : ::
0.0.0.0
so it looks like instead of the default DNS I entered (192.168.1.1 in my case), it uses the entry from allowable addresses.
How can I troubleshoot this? I mean, I could use the non-official clients, but I'd rather use that one for security reasons.
Configuration follows. I tried both wglaptop and windows as clients for Windows, no difference *you can find both in network)
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 '(removed)'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'lan1:u*'
list ports 'lan4:t*'
config bridge-vlan
option device 'br-lan'
option vlan '101'
list ports 'lan2:u*'
list ports 'lan4:t'
config bridge-vlan
option device 'br-lan'
option vlan '102'
list ports 'lan3:u*'
list ports 'lan4:t'
config interface 'lan'
option device 'br-lan.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'iot'
option device 'br-lan.101'
option proto 'static'
option ipaddr '192.168.10.1'
option netmask '255.255.255.0'
config interface 'camera'
option device 'br-lan.102'
option proto 'static'
option ipaddr '192.168.20.1'
option netmask '255.255.255.0'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
option peerdns '0'
list dns '1.1.1.1'
list dns '1.0.0.1'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config interface 'vpn'
option proto 'wireguard'
option private_key '(removed)'
option listen_port '51820'
list addresses '192.168.99.1/24'
config wireguard_vpn 'wgclient'
option public_key '(removed)'
option preshared_key '(removed)'
list allowed_ips '192.168.99.2/32'
option route_allowed_ips '1'
option private_key '(removed)'
option description 'Android'
config wireguard_vpn 'windows'
option description 'Windows'
option public_key '(removed)'
option private_key '(removed)'
list allowed_ips '192.168.99.3/32'
option route_allowed_ips '1'
config wireguard_vpn 'wglaptop'
option description 'wglaptop'
option public_key '(removed)'
option private_key '(removed)'
option route_allowed_ips '1'
list allowed_ips '192.168.99.4/32'
firewall
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone 'lan'
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'vpn'
config zone 'wan'
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
config zone
option name 'iot'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'iot'
config zone
option name 'camera'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'camera'
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 rule
option name 'IoT_DHCP'
list proto 'udp'
option src 'iot'
option dest_port '67-68'
option target 'ACCEPT'
config rule
option name 'IoT_DNS'
option src 'iot'
option dest_port '53'
option target 'ACCEPT'
config rule
option name 'Allow-IoT-mDNS'
list proto 'udp'
option src 'iot'
option src_port '5353'
list dest_ip '224.0.0.251'
option dest_port '5353'
option target 'ACCEPT'
config rule
option name 'Camera_DHCP'
list proto 'udp'
option src 'camera'
option dest_port '67-68'
option target 'ACCEPT'
config rule
option name 'Camera_DNS'
option src 'camera'
option dest_port '53'
option target 'ACCEPT'
config rule
option name 'Allow-camera-mDNS'
list proto 'udp'
option src 'camera'
option src_port '5353'
list dest_ip '224.0.0.251'
option dest_port '5353'
option target 'ACCEPT'
config forwarding
option src 'iot'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'iot'
config forwarding
option src 'lan'
option dest 'camera'
config redirect
option dest 'lan'
option target 'DNAT'
option name 'Wireguard'
list proto 'udp'
option src 'wan'
option src_dport '51820'
option dest_port '51820'
config rule 'wg'
option name 'Allow-WireGuard'
option src 'wan'
option dest_port '51820'
option proto 'udp'
option target 'ACCEPT'
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'
option serversfile '/var/run/adblock-fast/dnsmasq.servers'
option logfacility '/tmp/log/dnsmasq.log'
option quietdhcp '1'
config dhcp 'lan'
option interface 'lan'
option start '20'
option limit '149'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'iot'
option interface 'iot'
option start '20'
option limit '149'
option leasetime '12h'
option dhcpv4 'server'
config dhcp 'camera'
option interface 'camera'
option start '20'
option limit '149'
option leasetime '12h'
option dhcpv4 '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
option name 'Besder_WiFi'
list mac '(removed)'
option ip '192.168.20.161'
option leasetime '12h'