I am configuring a GL.iNet Flint 2 (MT6000) running OpenWrt 24.10 to act as both a VPN Server and a VPN Client simultaneously. The goal is to have a Pixel 9 connect remotely to my home network via WireGuard and have its traffic routed through a commercial VPN provider (ProtonVPN) before hitting the internet.
The Architecture:
Remote Client: Pixel 9 running the WireGuard app.
Inbound (Server): WireGuard Server instance on the router (Port 51820).
Outbound (Client): WireGuard Client instance connected to a commercial VPN (ProtonVPN).
DNS: AdGuard Home running locally on the router for network-wide filtering.
DDNS:DuckDNS for maintaining connectivity to a dynamic home IP.
Network Flow:
Pixel 9 Home Router (WG Server) AdGuard Home (DNS) ProtonVPN (WG Client) Internet
Current Configuration:
- Network Interface
Created an interface for the WG Server(10.0.0.1/24) to accept the Pixel 9.
Created an interface for the WG Client (proton_vpn) with 0.0.0.0/0 in Allowed IPs.
- Firewall Setup
Zones: LAN zone that includes both the physical lan and the wg_server interface.
VPN zone (vpn_client) for the outbound ProtonVPN tunnel.
Forwarding: Configured a rule to forward traffic from lan (which includes the remote Pixel) to vpn_client.
Input Rule: Opened UDP port 51820 on the WAN to allow the inbound handshake.
The Goal
I want to ensure that the routing is "leak-proof." When the Pixel 9 is connected, it should:
-
Resolve DNS via the router's AdGuard Home.
-
Route all traffic through the ProtonVPN tunnel rather than the local ISP WAN.
-
Maintain a stable handshake when switching between mobile data and external Wi-Fi.
So, I would like to know if it is ok so far? (secure etc?)
thanks
Firewall .
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
option flow_offloading '1'
option flow_offloading_hw '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'server_vpn'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'DROP'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
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 'vpn_client'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'proton_vpn'
config forwarding
option src 'lan'
option dest 'vpn_client'
config rule
option name 'Allow-WireGuard-Inbound'
option src 'wan'
option proto 'udp'
option dest_port '51820'
option target 'ACCEPT'
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'
config globals 'globals'
option dhcp_default_duid '000452460f3f2b7047da93c1e9018a667785'
option ula_prefix 'fdf1:661:c855::/48'
option packet_steering '2'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'lan5'
config interface 'lan'
option device 'br-lan'
option proto 'static'
list ipaddr '192.168.1.1/24'
option ip6assign '60'
config interface 'wan'
option device 'eth1'
option proto 'dhcp'
config interface 'wan6'
option device 'eth1'
option proto 'dhcpv6'
config device
option name 'eth1'
option mtu '1495'
config interface 'server_vpn'
option proto 'wireguard'
option private_key 'aFh9q2cSbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
option listen_port '51820'
list addresses '10.0.0.1/24'
config wireguard_server_vpn
option description 'pixel9'
option public_key '8K1Zu6+uqwy3xxxxxxxxxxxxxxxxxxxxxxag+c6OHE='
list allowed_ips '10.0.0.2/32'
option route_allowed_ips '1'
config interface 'proton_vpn'
option proto 'wireguard'
option private_key 'sNeT3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxVcOkw='
list addresses '10.2.0.2/32'
list dns '192.168.1.1'
config wireguard_proton_vpn
option description 'mtl'
option public_key 'nLx6LJxxxxxxxxxxxxxxxxxxxxxxxxxxxGCpN3lolm1I='
list allowed_ips '0.0.0.0/0'
list allowed_ips '::/0'
option endpoint_host '176.xx.xxxx.82'
option endpoint_port '51820'
option route_allowed_ips '1'