1
24.1 Legacy Series / OPNsense in a jail on a FreeBSD host?
« on: April 26, 2024, 05:03:36 pm »
Is there a way of installing and running OPNsense within a jail on a standard FreeBSD host? And if there is, is that a supported mode, rather than a works-by-accident configuration?
It's looking very much as if the answer to the question is 'no'; is that right? That means I can rule it out of my considerations, but it would be good to get that confirmed in words of one syllable.
I can see why one might not want to do this (for a firewall, a standalone box is mentally tidy, if nothing else), and I can see why this might be hard in principle (pf really wants to run in the host, so at the very least the jailed OPNsense would have to have some suitably tunneled way of communicating with the host). But it would potentially be useful for experiments, and for the phase of the moon when I think 'the more in jails the better' rather than the phase where I think 'let's have lots of little boxes'.
I see a 2017 post (see [1]) which is titled 'Can I install Opnsense in an existing FreeBSD installation ?', but while that answer reiterates/reassures/illustrates that OPNsense is indeed layered on top of FreeBSD, it doesn't say 'jail' anywhere. Also, the page [3] makes it clear that opensense-bootstrap is for converting a FreeBSD install into an OPNsense one.
There's a 2016 discussion [2] about jails, but that's really about whether more of OPNsense's services can or should be put in jails.
The 'Virtual and cloud' documentation [3] mentions various virtualisation options. The absence of the word 'jail' on this page is probably telling me what the answer is here.
Best wishes,
Norman
[1] https://forum.opnsense.org/index.php?topic=4472.0
[2] https://forum.opnsense.org/index.php?topic=4078.msg22706
[3] https://docs.opnsense.org/manual/virtuals.html
It's looking very much as if the answer to the question is 'no'; is that right? That means I can rule it out of my considerations, but it would be good to get that confirmed in words of one syllable.
I can see why one might not want to do this (for a firewall, a standalone box is mentally tidy, if nothing else), and I can see why this might be hard in principle (pf really wants to run in the host, so at the very least the jailed OPNsense would have to have some suitably tunneled way of communicating with the host). But it would potentially be useful for experiments, and for the phase of the moon when I think 'the more in jails the better' rather than the phase where I think 'let's have lots of little boxes'.
I see a 2017 post (see [1]) which is titled 'Can I install Opnsense in an existing FreeBSD installation ?', but while that answer reiterates/reassures/illustrates that OPNsense is indeed layered on top of FreeBSD, it doesn't say 'jail' anywhere. Also, the page [3] makes it clear that opensense-bootstrap is for converting a FreeBSD install into an OPNsense one.
There's a 2016 discussion [2] about jails, but that's really about whether more of OPNsense's services can or should be put in jails.
The 'Virtual and cloud' documentation [3] mentions various virtualisation options. The absence of the word 'jail' on this page is probably telling me what the answer is here.
Best wishes,
Norman
[1] https://forum.opnsense.org/index.php?topic=4472.0
[2] https://forum.opnsense.org/index.php?topic=4078.msg22706
[3] https://docs.opnsense.org/manual/virtuals.html

