Posted: Mon Nov 28, 2022 7:02 Post subject: Multiple dhcpservers + VPN connections for different ip-rang
So i have been using ddwrt for a long time, using 2 routers at home as servers and connecting with them from 2 other routers from different countries when i'm there.
- Currently using openvpn
- local ip range: 192.168.1.0
- openvpn range: 192.168.2.0
- policy based routing open vpn set on the 192.168.2.0 range
- a bridge with dhcp server that gives the 192.168.2.0 range
- bridged it with a virutal wifi ssid.
So connecting with port or normal wifi gives me normal wan on 192.168.1.1
Connecting with v-ssid gives me the vpn connection on 192.168.2.1
Now i want to make a 'simple' change to move to wiregueard because it's faster on my older netgear 3700. Also this router doesn't have the best wifi as well. And I have my house decorated with the devco m4 wifi boosters in accesspoint.
So i want:
- Modem->bridge->DD-WRT(router)->Wifiboosters(accespoint)
- on DD-WRT have the normal dhcp for wan on 192.168.1.0
- on DD-WRT a second dhcp for my wireguard tunnel vpn on ip-range 192.168.2.0
*later i want to add other wireguard tunnels with different ip-range each*
- Then when i'm connected with wifi (or cable) and want to use the vpn, to manual change the ipv4 on laptop/phone to the 192.168.2.0 range to be routed over the vpn
- When this works I will make a second ssid to only have the manual override on.
+ already have the wireguard tunnel set up
+ using it now on the vap with bridge on 192.168.2.0
Any tips advices you can give me to set it up like this?
my usual experience is that after days trying, then asking the question finally, i'll end up with the answer which i did already.
i will just keep the router on dhcp with range 192.168.1.0
have removed the extra tunnel for the vap
then in the first tunnel i've added policy based routing with:
192.168.1.200/30
192.168.1.204/29
192.168.1.208/28
192.168.1.224/27
So al 200 and up is going now trough the tunnel.
Want to also set up a second tunnel to a different server from 150-199 using
192.168.1.150/31
192.168.1.152/29
192.168.1.160/27
192.168.1.192/29
Also easier then having differnt ip-ranges, and it's exactly what i wanted
indeed, i did this with the calculator.
now 150-199 goes trough 1 tunnel
200-255 goed trough the second
all underneath will just run trough my wan, easy to remember where which one goes to