Switch to using a script to dynamically spin up the netgraph bridge for jails.

This commit is contained in:
Tom Alexander
2023-04-25 18:33:19 -04:00
parent be2e0c964b
commit ba7567ad9c
7 changed files with 159 additions and 106 deletions

View File

@@ -1,9 +1,12 @@
nat_dhcp {
path = "/jail/main/jails/nat_dhcp";
path = "/jail/main/jails/${name}";
vnet;
vnet.interface += "host_link3";
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;
mount.devfs; # To expose tun device
mount.devfs;
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";