Using openwrt vpn with cable only

Hello everyone,

I'm new to Openwrt and currently started reading a lot about it, but I couldn't find information if it is possible to have the router configured to have the vpn/wireguard on the cable that's connected to my PC and to have no vpn (using my normal IP) for WiFi?

If yes, any advice/tips/tricks would be appreciated.

Best Regards! :slight_smile:

It can be done, but if you only want the VPN on one PC, why not run it on the computer ?


For certain reasons I need the VPN to not be on my PC.


if you search the forum, you will find PBR, policy based routing topics
this way, you could set static address to your PC and allow to reach VPN, other IPs will be denied toward VPN

feel free to search the forum

Use pbr package and match the VPN policy for the interface of the ethernet. Check footnote #6 from the PBR manpage.


Welcome to the community!

The PBR app isn't needed if the user just needs to make 1 or a few rules for 1 IP:

config route                
        option interface 'vpn'
        option target ''
        option netmask ''      
        option table '2'

config rule  
        option src ''
        option dest ''
        option priority '2'
        option lookup '2'

The rule can also be made for an interface instead of SRC IP - if preferred.


Thank you everyone! Really appreciate the help. :slight_smile:

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