how to setup wireguard vpn client with multiple devices properly?
-
i have read several tutorials and i seem to have the wireguard client setup, it seems to connect and ping is working for the interface but i cannot seem to get client devices to connect into pfsense to use the vpn connection. i am wondering how to properly do this.
this is basically the configuration i am trying to achieve:
+-------+ <-----> phone VPN | | <-----> laptop Server <-----> |pfsense| <-----> VM | | <-----> VM +-------+ <-----> LXC
i would like to have some devices off the vpn and most others on the vpn, hopefully with a different subnet address having the main 10.0.0.1 subnet off vpn and 10.0.3.1 on vpn
but i cannot seem to find a good tutorial that outlines how to properly setup a wireguard client vpn with multiple client devices. the vpn configuration has 0.0.0.0/0 allowed so to my understanding this should allow for such a configuration?
but i am currently stuck trying to make it work.
-
You need to policy route clients via the VPN gateway. So first add static leases for the clients so they always have the same IP addresses. Or if you have different subnets for those clients just policy route all traffic from the subnet.
https://docs.netgate.com/pfsense/en/latest/multiwan/policy-route.html