Hi all,
I'm trying to set up a jail with network interface bridged to the host and DHCP (from a different host). I've been somewhat successful in that it works, but it feels like I'm missing something and would like to double-check.
I've defined the jail as a VNET jail and am using jib to set up the bridged interface. All of that works as expected, but the jail doesn't source /etc/rc.firewall on startup, i.e. the default firewall is applied (instead of the configured WORKSTATION in /etc/rc.conf in the jail) and no network traffic is possible. DHCP inside the jail also fails.
My workaround is to explicitly source rc.firewall and run DHCP in the jail config file, but it feels like this is is a hack and I'm missing some configuration somewhere. Any advice?
Here's the jail config on the host:
XXX {
exec.prestart += "jib addm XXX igc0";
exec.start = "dhclient e0b_XXX";
exec.start += "/bin/sh /etc/rc.firewall";
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.poststop += "jib destroy XXX";
host.hostname = "XXX";
path = "/jails/XXX";
exec.clean;
vnet;
vnet.interface = "e0b_XXX";
devfs_ruleset = 11;
mount.devfs;
allow.raw_sockets = 1;
allow.sysvipc = 1;
}
/etc/rc.conf in the jail:
clear_tmp_enable="YES"
firewall_enable="YES"
firewall_type="WORKSTATION"
firewall_myservices="something"
firewall_allowservices="something else"
firewall_quiet="YES"
firewall_logdeny="YES"
hostname="XXX"
ifconfig_e0b_XXX="DHCP"
ifconfig_e0b_XXX_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
Without the exec.start lines that run dhclient and source /etc/rc.firewall in the jail config, the jail starts, but has no IP address and all network traffic is blocked.
Thanks,
Lars