Restrict WireGuard peer access to server

I have WireGuard set up on my router running OpenWrt 18.06.4. I have several peers connecting to it. I want to restrict one remote peer’s access to the local LAN while it should still being accessible from LAN.

This is how the peer is configured in the router:

config wireguard_wireguard
option description 'Peer2'
option public_key <PUBLICKEY>
option route_allowed_ips '0'
list allowed_ips ''

This is the peer’s WireGuard settings:

Address =
PrivateKey = <PRIVATEKEY>

PublicKey = <PUBLICKEY>
AllowedIPs =,
Endpoint = <ENDPOINT>
PersistentKeepalive = 25 was added to the AllowedIPs so that it can be accessed from my local LAN.

I set up the following Traffic Rule in my router to block access to the local LAN:

option src_ip ''
option proto 'all'
option target 'REJECT'
option name 'Block-Peer2’
option src '*'
option dest '*'

This above setup almost works: the peer can be accessed from LAN and it is blocked to access almost everything inside the LAN. The only exception is the router itself. The peer can still access the LuCi management page; i.e., it is not prevented from accessing port 80 of (my router).

Is there a way to prevent it from accessing anything inside my LAN, including ports of the router itself?

Add another rule with "dest" unset. This should block INPUT to the router itself.

option src_ip ''
option proto 'all'
option target 'REJECT'
option name 'Block-Peer2’
option src '*'

Thank you, that made the trick!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.