Static DHCP reservation with choice of multiple gateways


#1

In my home network I have 2 Raspberry PI devices, where one of them is my VPN gateway. Some of the hosts are the 2nd Raspberry PI as default gateway. Is it possible to add DHCP option where I can set different gateway per host.
This way I have most of my network devices routed through my regular firewall and some devices that I choose are routed through VPN gateway.

For now I have manually changed /etc/dnsmasq.d/02-pihole-dhcp.conf and configured 2 router options with different tags:
dhcp-option=tag:tag0,option:router,10.X.X.1
dhcp-option=tag:tag1,option:router,10.X.X.2

as well as changed /etc/dnsmasq.d/04-pihole-static-dhcp.conf file
dhcp-host=D0:Y::Y:Y:Y,10.X.X.98,unknown,set:tag1


#2

can you please give some more details on how you do this. how do you assign the tags to specific dhcp reservations?


#3

I can find my config. Yesterday I haven’t been able to resurrect my PC. Seems like SSD died.
check the following link:


#4

Thanks! i will have a look at this. i am a newbie and i am having the same scenario as you, one local provider gateway, one protonVPN gateway.

and hey, sorry to hear about your pc.