FDD-book/examples/part-07/ch30-virtualisation/shared/jail.conf.example
Edson Brandi 6e6dac94fe Add book companion files under examples/
Organize companion code and materials by book part:

  part-01/      Foundations
  part-02/      Kernel & driver fundamentals
  part-03/      Character & block devices
  part-04/      Networking & storage
  part-05/      Buses & advanced topics
  part-06/      Debugging & performance
  part-07/      Real-world drivers
  appendices/   Supplementary material
  README.md     Overview and build instructions
2026-04-25 16:51:00 +00:00

37 lines
972 B
Text

# Example jail.conf(5) snippets for Chapter 30 labs.
#
# Copy relevant blocks into /etc/jail.conf (or into a per-jail include),
# edit paths and names, and manage the jails with service jail.
# A simple non-VNET jail that uses the custom jaildev ruleset from Lab 3.
testjail {
path = "/jails/test";
host.hostname = "testjail";
ip4 = inherit;
devfs_ruleset = 100;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
persist;
}
# A VNET jail with an epair interface moved in. Complements Lab 4.
vnet-test {
path = "/jails/vnet-test";
host.hostname = "vnet-test";
vnet;
vnet.interface = "epair0b";
devfs_ruleset = 5; # devfsrules_jail_vnet
persist;
}
# A "services" jail that sees only a custom service device.
myservice {
path = "/jails/myservice";
host.hostname = "myservice";
devfs_ruleset = 101;
allow.raw_sockets = 0;
allow.mount = 0;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
persist;
}