Hello,
Could someone please help explain my anomaly with bastille jails.
When multiple bastille jails are running, then restarting one jail loses default route in host.
When in host runs only single bastille jail, then restarting it does not lose default route in host.
Messages from /var/log/messages:
One jail running, restarting it:
Multiple jails running, restarting one of them:
jail.conf of the jail that is restarted:
It seems that restarting the jail manipulates the wlan0 interface. Should it be so?
How could i ensure that manipulating the jails does not lose connection with host?
Could someone please help explain my anomaly with bastille jails.
When multiple bastille jails are running, then restarting one jail loses default route in host.
When in host runs only single bastille jail, then restarting it does not lose default route in host.
Messages from /var/log/messages:
One jail running, restarting it:
Code:
Dec 28 09:38:33 fuj kernel: [nhop_ctl] inet.0 nhop_free: failed to unlink nh#2/inet/vnet0/resolve
Dec 28 09:38:33 fuj kernel: e0a_bastille4: link state changed to DOWN
Dec 28 09:38:33 fuj kernel: vnet0: link state changed to DOWN
Dec 28 09:38:33 fuj root[34607]: /etc/rc.d/netif: WARNING: e0a_bastille4 does not exist. Skipped.
Dec 28 09:38:33 fuj kernel: epair0a: Ethernet address: 02:bc:1c:9f:5c:0a
Dec 28 09:38:33 fuj kernel: epair0b: Ethernet address: 02:bc:1c:9f:5c:0b
Dec 28 09:38:33 fuj kernel: epair0a: link state changed to UP
Dec 28 09:38:33 fuj kernel: epair0b: link state changed to UP
Dec 28 09:38:33 fuj kernel: epair0a: promiscuous mode enabled
Dec 28 09:38:33 fuj kernel: epair0a: changing name to 'e0a_bastille4'
Dec 28 09:38:33 fuj kernel: epair0b: changing name to 'e0b_bastille4'
Dec 28 09:38:33 fuj kernel: e0b_bastille4: changing name to 'vnet0'
Dec 28 09:38:33 fuj kernel: lo0: link state changed to UP
Dec 28 09:38:33 fuj dhclient[61247]: connection closed
Dec 28 09:38:33 fuj dhclient[61247]: exiting.
Dec 28 09:38:34 fuj dhclient[69425]: New IP Address (wlan0): 192.168.1.237
Dec 28 09:38:34 fuj dhclient[70204]: New Subnet Mask (wlan0): 255.255.255.0
Dec 28 09:38:34 fuj dhclient[72356]: New Broadcast Address (wlan0): 192.168.1.255
Dec 28 09:38:34 fuj dhclient[73819]: New Routers (wlan0): 192.168.1.1
Dec 28 09:38:34 fuj root[84600]: /etc/rc.d/netif: WARNING: vnet0 does not exist. Skipped.
Dec 28 09:38:34 fuj dhclient[66505]: connection closed
Dec 28 09:38:34 fuj dhclient[66505]: exiting.
Dec 28 09:38:34 fuj dhclient[37398]: New IP Address (wlan0): 192.168.1.237
Dec 28 09:38:34 fuj dhclient[38080]: New Subnet Mask (wlan0): 255.255.255.0
Dec 28 09:38:34 fuj dhclient[40102]: New Broadcast Address (wlan0): 192.168.1.255
Dec 28 09:38:34 fuj dhclient[41276]: New Routers (wlan0): 192.168.1.1
Multiple jails running, restarting one of them:
Code:
Dec 28 09:43:51 fuj kernel: [nhop_ctl] inet.0 nhop_free: failed to unlink nh#2/inet/vnet0/resolve
Dec 28 09:43:51 fuj kernel: e0a_bastille4: link state changed to DOWN
Dec 28 09:43:51 fuj kernel: vnet0: link state changed to DOWN
Dec 28 09:43:51 fuj root[51224]: /etVc/rc.d/netif: WARNING: e0a_bastille4 does not exist. Skipped.
Dec 28 09:43:51 fuj kernel: epair0a: Ethernet address: 02:b7:16:74:14:0a
Dec 28 09:43:51 fuj kernel: epair0b: Ethernet address: 02:b7:16:74:14:0b
Dec 28 09:43:51 fuj kernel: epair0a: link state changed to UP
Dec 28 09:43:51 fuj kernel: epair0b: link state changed to UP
Dec 28 09:43:51 fuj kernel: epair0a: promiscuous mode enabled
Dec 28 09:43:51 fuj kernel: epair0a: changing name to 'e0a_bastille4'
Dec 28 09:43:51 fuj kernel: epair0b: changing name to 'e0b_bastille4'
Dec 28 09:43:51 fuj root[62188]: /etc/rc.d/netif: WARNING: vnet0 does not exist. Skipped.
Dec 28 09:43:51 fuj kernel: e0b_bastille4: changing name to 'vnet0'
Dec 28 09:43:51 fuj kernel: lo0: link state changed to UP
jail.conf of the jail that is restarted:
Code:
wg7 {
devfs_ruleset = 13;
enforce_statfs = 2;
exec.clean;
exec.consolelog = /var/log/bastille/wg7_console.log;
exec.start = '/bin/sh /etc/rc';
exec.stop = '/bin/sh /etc/rc.shutdown';
host.hostname = wg7;
mount.devfs;
mount.fstab = /usr/local/bastille/jails/wg7/fstab;
path = /usr/local/bastille/jails/wg7/root;
securelevel = 2;
vnet;
vnet.interface = e0b_bastille4;
exec.prestart += "jib addm bastille4 wlan0";
exec.prestart += "ifconfig e0a_bastille4 description \"vnet host interface for Bastille jail wg7\"";
exec.poststop += "jib destroy bastille4";
}
It seems that restarting the jail manipulates the wlan0 interface. Should it be so?
How could i ensure that manipulating the jails does not lose connection with host?