[Bug 253435] Jail does not create tunnel (wireguard) interface alias.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 253435] Jail does not create tunnel (wireguard) interface alias.

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253435

--- Comment #1 from Jamie Gritton <[hidden email]> ---
jail(8) will automatically run "ifconfig alias <ifname> <ipaddr>" on startup
(and "-alias" on shutdown).  But it's interface-agnostic, and doesn't know
things like the tunnel interface needing the address twice (which I didn't know
either).

So anything more complicated than a single address added to an existing
interface is going to take you running the commands yourself.  For your setup,
I think this should work:

{
 ip4.addr = 192.168.0.10;
 exec.prestart = "ifconfig wgnet0 alias inet ${ip4.addr} ${ip4.addr}";
 exec.poststop = "ifconfig wgnet0 -alias inet ${ip4.addr} ${ip4.addr}";
}

Keeping track of what requirements different interfaces might need is a
potential can of worms beyond the scope of jail(8).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "[hidden email]"