Hello,
I've a NanoPi NEO2 SBC running LuCI openwrt-22.03 branch (git-22.288.45147-96ec0cd) / OpenWrt 22.03.2 r19803-9a599fee93
. This is a cheap ARM board that has one gigabit Ethernet port and I've it setup as DHCP and DNS server for my network. The router ISP works as gateway.
- OpenWrt/ARM (DHCP/DNS Server): 172.20.1.1
- ISP Router (Gateway): 172.20.1.254
I've setup a WG "server" using the GUI and I'm able to connect my phone to it. The phone is able access the OpenWrt interface but it can't access any other on the network and/or the Internet.
Network config:
# 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 'fdb0:01c0:5208::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
option ipv6 '0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ip6assign '60'
option delegate '0'
list ipaddr '172.20.1.1/24'
option gateway '172.20.1.254'
option broadcast '172.20.1.255'
config device
option name 'eth0'
option ipv6 '0'
config interface 'VPN'
option proto 'wireguard'
option private_key '...'
option listen_port '41390'
option mtu '1200'
option peerdns '0'
list dns '172.20.1.1'
option delegate '0'
list addresses '172.20.3.1/24'
config wireguard_VPN
option description 'iPhone'
option public_key '...'
option private_key '...'
option preshared_key '...'
option route_allowed_ips '1'
option persistent_keepalive '600'
list allowed_ips '172.20.3.10/32'
config device
option name 'VPN'
option ipv6 '0'
Client config:
As I said the phone connects just fine:
# wg show
interface: VPN
public key: ......
private key: (hidden)
listening port: 41390
peer: ......
preshared key: (hidden)
endpoint: ....:33817
allowed ips: 172.20.3.10/32
latest handshake: 41 seconds ago
transfer: 14.21 KiB received, 12.70 KiB sent
persistent keepalive: every 10 minutes
The current routing table:
# ip route show
default via 172.20.1.254 dev br-lan
172.20.1.0/24 dev br-lan scope link src 172.20.1.1
172.20.3.0/24 dev VPN scope link src 172.20.3.1
172.20.3.10 dev VPN scope link
This looks to me like some routing problem but since this isn't a standard setup where the OpenWrt box also acts as gateway I'm not sure.
Thank you.