bastille
bastille copied to clipboard
[ENHANCEMENT] IP management not flexible
Is your feature request related to a problem? Please describe. I cannot assign multiple IPs to a regular jail. Support for multiple IPs would be good.
Describe the solution you'd like
I have bce0
on the server, the jail is supposed to have a public IP on the same interface. Cloned lo1
for a local interface for the jail.
I expect this to work:
bastille create -T jailX 12.2-RELEASE "bce0|1.2.2.3,lo1|127.0.1.1"
this just doesn't because bastiile cannot parse this.
Describe alternatives you've considered
What I did is to modify the jail's jail.conf
:
interface = bce0;
ip4.addr = bce0|1.2.2.3;
ip4.addr += lo1|127.0.1.1;
ip6 = disable;
Note that I cannot remove interface
because bastille complains. From a jail's point of view I have provided the interface name in both ip4.addr
lines.
Additional context Bastille blindly assumes that every jail will have just one IP address or be VNET.
Note: I cannot use VNET jails for now because our datacenter switch allows on one MAC address per physical LAN port.
I wanted to create a VNET jail with an additionnal lo aliased interface for acting like a reverse proxy with a hoster failover public IP that would redirect to LAN backend. It failed (because of the vnet nature of the interface I presume). Then I considered a non vnet approach and add public and local IP like the way you describe and it works.
Of course multiple IP integration in bastille's jails manager would be a great feature. Thanks anyway for the tips !