What's new

Does VPN Director Use Routes or IPTables Rules To Route Clients Over a VPN Connection?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

HarryMuscle

Senior Member
I'm trying to get a slightly better understanding of how VPN Director works and possibly at the same time fix the issue that comes up when someone tries to use the same DNS server (for example 1.1.1.1) for multiple WireGuard VPN clients (https://www.snbforums.com/threads/wireguard-client-dns-servers-resolving-to-wrong-country.87399/). For example, I added 192.168.50.100 to VPN Director and set it to go through WGC1. However, when I run
Code:
ip route show table all
there isn't a single entry with 192.168.50.100. Does that mean that VPN Director is not using routes to send traffic from certain IPs over the VPN interfaces? Or am I simply not understanding how routes are supposed to work?

Also, looking through the iptables rules, the only entry in there is related to forcing 192.168.50.100 to use a specific DNS server, but nothing about sending all of the traffic from 192.168.50.100 over the wgc1 interface so I doubt it's using iptables rules.

Thanks,
Harry
 
VPN Director is entirely based on routing tables. Look the content of the specific client table.
 
VPN Director is entirely based on routing tables. Look the content of the specific client table.
Wouldn't "ip route show table all" show all tables on the router including the tables for the WireGuard clients (I think the tables are called wgc1, wgc2, etc.). I'll go back and double check though.

Thanks,
Harry
 
Last edited:
Wouldn't "ip route show table all" show all tables on the router including the tables for the WireGuard clients
That's a very inconvenient way of looking at it.
You will find vpndirector rule by
Code:
ip rule
Then each table by i.e:
Code:
ip route show table wgc1
Keep in mindre that rules are processed in priority order and once the first possible route to target is found further traversal of routing tables/rules are stopped.
Since all wgcx table contains default routes each rule hit will provide a route in that table.
 
It does, however that`s just the routes. Maybe you are actually looking for the rules themselves that determines when a client table should be used:

Code:
ip rule show
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top