Open phyber opened 2 years ago
I have run into a similar problem where I have multiple IP adresses going to the same host. I then attach each IP to a jail. But after rebooting the host and restarting Bastille, it won't start the jail because it detects that the IP adress are already in use, but it is not. The way I fix it is to change the IP adress in the jail.conf to a fictive IP, restart the jail, then change the IP back, restart the jail again, and then it works as normal again.
@cedwards what is your thoughts on this one before I start figuring out how to implement this.
Is your feature request related to a problem? Please describe.
I run a FreeBSD server on a LAN with many jails for various things. These jails all share the internal IP address on
em0
,192.168.5.1
, which is also used for accessing SSH on the server and other things running outside of the jails.This worked fine in the past with
ezjail
, and currently works withiocage
. It's a behaviour supported by FreeBSD (mentioned injail(8)
underip4.addr
with some minor caveats), but Bastille explicitly blocks this behaviour with one of its checks on start, resulting inError: IP address (192.168.5.1) already in use.
.Describe the solution you'd like
If possible I'd like to be able to bypass this check so that the jails can start as normal and use the existing IP addresses as supported by FreeBSD.
Describe alternatives you've considered
It would be possible to use multiple distinct IP addresses as Bastille tries to push you towards (either reachable over the LAN or with
rdr
over loopback), but this complicates the setup somewhat while starting a jail on an address that already exists "just works".Additional context
None that I can think of right now.