Other than read the THE BOOK OF PF, what is a proper way of doing this that doesn't involve vlans, if I was to get serious with this. The book is on my to do list, obviously I haven't finished it.
What is a proper way to over-complicate this network but to keep the two networks separate and not to be able to talk to each-other but still have dhcp etc. Someone mentioned running two instances of dnsmasq, but I still only have one physical interface. In FreeBSD would that be adding rules in pf.conf?
I created two virtual switches with 'supposedly' different subnets, using dnsmasq for dns and dhcp, pf for nat and gateway enabled. Everything works fine when it comes to VM guests, they receive dhcp in accordance to their switch name assigned, but they can all talk to each-other regardless of 'subnet', that doesn't really mean anything does it, it needs to be defined in pf?
/etc/pf.conf
/usr/local/etc/dnsmasq.conf
Switching bind-interfaces on and off didn't do anything in terms of anyone can ping anyone, don't understand what that does but probably nothing regarding this.
What is a proper way to over-complicate this network but to keep the two networks separate and not to be able to talk to each-other but still have dhcp etc. Someone mentioned running two instances of dnsmasq, but I still only have one physical interface. In FreeBSD would that be adding rules in pf.conf?
I created two virtual switches with 'supposedly' different subnets, using dnsmasq for dns and dhcp, pf for nat and gateway enabled. Everything works fine when it comes to VM guests, they receive dhcp in accordance to their switch name assigned, but they can all talk to each-other regardless of 'subnet', that doesn't really mean anything does it, it needs to be defined in pf?
/etc/pf.conf
Code:
nat on wlan0 from {10.0.1.0/24} to any -> (wlan0)
nat on wlan0 from {10.0.2.0/24} to any -> (wlan0)
vm switch list
Code:
NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS
public standard vm-public 10.0.1.1/24 no - - -
public2 standard vm-public2 10.0.2.1/24 no - - -
/usr/local/etc/dnsmasq.conf
Code:
domain-needed
except-interface=lo0
bind-interfaces
local-service
dhcp-authoritative
interface=vm-public
dhcp-range=10.0.1.100,10.0.1.200
interface=vm-public2
dhcp-range=10.0.2.100,10.0.2.200
Switching bind-interfaces on and off didn't do anything in terms of anyone can ping anyone, don't understand what that does but probably nothing regarding this.