bastille
bastille copied to clipboard
[BUG] Incomplete ifconfig when using static IP addresses on VNET jails
[MANDATORY] Describe the bug [MANDATORY]
When you provide a static IP address for VNET jails one cannot provide a netmask to be passed to IFCONFIG
ARG
, thus the jail networking is incomplete.
From a sample jail:
inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255
Pretty useless.
This fails:
# bastille create -V mumu 12.2-RELEASE "1.2.3.4 netmask 255.255.255.224" bce1
Invalid: (1.2.3.4 netmask 255.255.255.224).
[MANDATORY] Bastille and FreeBSD version (paste bastille -v && freebsd-version -kru
output)
0.8.20210115
12.2-STABLE
12.2-STABLE
12.2-STABLE
[MANDATORY] How did you install bastille? (port/pkg/git) port
[optional] Expected behavior I would expect to rather do the following:
bastille create -T -V mumu 12.2-RELEASE "inet 1.2.2.4 netmask 255.255.255.X" bce1
[optional] Additional context My jails need to run in a separate VLAN from a Cisco router which has nothing to do with the network the jailhost runs on bce0. So my range, netmask and default gateway are completely different.
I believe this should work with CIDR notation. Thank you for the report; will consider ways to improve this.
Need to document that CIDR notation is the only valid method of designating netmasks. This needs to go in main documentation.
PR for documentation up. Closing.
https://github.com/BastilleBSD/bastille/pull/615