I’m running OpenWrt on my Wi-Fi router and have configured a WireGuard interface that routes all LAN traffic through my paid VPN provider. That setup is working correctly.
Now I’m trying to add remote access into my home network. For this, I’ve set up a Raspberry Pi as a WireGuard server. I’ve created the necessary port-forwarding and firewall rules on the OpenWrt router, and my DDNS is confirmed working. However, I’m unable to establish a remote WireGuard connection to the Pi, and I’m not sure what I’m missing.
What should I check or adjust to get remote access working in this setup?
uci export network
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 'fd29:bc64:9b1e::/48'
option packet_steering '1'config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'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 'wan'
option proto 'dhcp'
option peerdns '0'
option type 'bridge'config interface 'WGINTERFACE'
option proto 'wireguard'
option private_key 'XXXXXX'
option force_link '1'
list addresses '10.65.185.68/32'
list dns '100.64.0.63'config wireguard_WGINTERFACE
option public_key 'XXXXXX'
option route_allowed_ips '1'
option endpoint_host '###'
option endpoint_port '51820'
list allowed_ips '0.0.0.0/0'
option description ' ch-zrh-wg-001 '
option disabled '1'config wireguard_WGINTERFACE
option description 'fi-hel-wg-102'
option public_key 'XXXXXX'
list allowed_ips '0.0.0.0/0'
option endpoint_host '###'
option endpoint_port '51820'
option route_allowed_ips '1'config device
option type 'bridge'
option name 'br-lan2'
option bridge_empty '1'config interface 'lan2'
option proto 'static'
option device 'br-lan2'
option ipaddr '192.168.71.1'
option netmask '255.255.255.0'config rule
option in 'lan2'
option src '192.168.71.0/24'
option lookup '4'config route
option interface 'wan'
option target '0.0.0.0/0'
option table '4'config wireguard_WGINTERFACE
option description 'fi-hel-wg-101'
option public_key 'XXXXXX'
list allowed_ips '0.0.0.0/0'
option endpoint_host '###'
option endpoint_port '51820'
option disabled '1'
uci export firewall
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'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 rule
option name 'Allow-RPI-Wireguard'
list proto 'udp'
option src 'wan'
option dest 'lan'
list dest_ip '192.168.1.214'
option dest_port '51820'
option target 'ACCEPT'
option family 'ipv4'
list src_ip '0.0.0.0/0'config rule
option name 'Allow-RPI-SSH'
list proto 'tcp'
option src 'lan2'
list src_ip '192.168.71.0/24'
option dest 'lan'
list dest_ip '192.168.1.214'
option dest_port '22'
option target 'ACCEPT'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 'WGZONE'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'WGINTERFACE'config include 'pbr'
option fw4_compatible '1'
option type 'script'
option path '/usr/share/pbr/pbr.firewall.include'config zone
option name 'lan2'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan2'config forwarding
option src 'lan2'
option dest 'wan'config redirect
option target 'DNAT'
option name 'forward-RaspberryPiWireguard'
option src 'wan'
option src_dport '51820'
option dest_ip '192.168.1.214'
option dest_port '51820'
option family 'ipv4'
list proto 'udp'
option dest 'lan'config forwarding
option src 'lan'
option dest 'WGZONE'config forwarding
option src 'WGZONE'
option dest 'wan'config rule
config redirect
option dest 'lan'
option target 'DNAT'
option name 'forward-RPI-Wireguard'
option family 'ipv4'
list proto 'udp'
option src 'wan'
option src_dport '51820'
option dest_ip '192.168.1.214'
option dest_port '51820'
Thank you