bastille icon indicating copy to clipboard operation
bastille copied to clipboard

[BUG] Incomplete ifconfig when using static IP addresses on VNET jails

Open michael-o opened this issue 3 years ago • 1 comments

[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.

michael-o avatar Jun 14 '21 08:06 michael-o

I believe this should work with CIDR notation. Thank you for the report; will consider ways to improve this.

cedwards avatar Jul 14 '21 03:07 cedwards

Need to document that CIDR notation is the only valid method of designating netmasks. This needs to go in main documentation.

bmac2 avatar Oct 20 '23 18:10 bmac2

PR for documentation up. Closing.

bmac2 avatar Oct 21 '23 04:10 bmac2

https://github.com/BastilleBSD/bastille/pull/615

tobiastom avatar Oct 25 '23 08:10 tobiastom