Last active 17 hours ago

jail.conf Raw
1# Global parameters
2exec.start = "/bin/sh /etc/rc";
3#exec.start += "/sbin/ifconfig lo0 127.0.0.1 up";
4#exec.start += "/sbin/ifconfig epair${nid}b 192.168.123.${nid}/24 up";
5#exec.start += "/sbin/route add default 192.168.123.1";
6exec.stop = "/bin/sh /etc/rc.shutdown";
7exec.clean;
8mount.devfs;
9mount.procfs;
10mount.fstab = "/mnt/ssd/jail/${name}/etc/fstab";
11
12devfs_ruleset = 5;
13allow.raw_sockets;
14allow.sysvipc;
15allow.mount;
16allow.mount.fusefs;
17allow.mount.devfs;
18allow.mount.procfs;
19enforce_statfs = 1;
20
21# VNET-specific parameters
22vnet;
23vnet.interface = "epair${nid}b";
24exec.prestart = "ifconfig epair${nid} create up";
25exec.prestart += "ifconfig epair${nid}a up";
26exec.prestart += "ifconfig bridge1 addm epair${nid}a";
27exec.poststop = "ifconfig epair${nid}a destroy";
28
29# Path parameters
30path = "/mnt/ssd/jail/${name}";
31host.hostname = "${name}.jail";
32
33# NID 3, 4 is available now
34
35navidrome {
36 $nid = 17;
37}
38ntfy {
39 $nid = 16;
40}
41seafile {
42 $nid = 15;
43}
44immich {
45 # This is a Linux jail.
46 $nid = 14;
47 mount.procfs = 0;
48
49 exec.start = "/bin/sh /sbin/swinit";
50 exec.stop = "/bin/sh /sbin/swshutdown";
51}
52kanboard {
53 $nid = 13;
54}
55authelia {
56 $nid = 12;
57}
58freshrss {
59 $nid = 11;
60}
61nextcloud {
62 $nid = 10;
63}
64games {
65 $nid = 9;
66}
67mastodon {
68 $nid = 8;
69}
70matrix {
71 $nid = 7;
72}
73ircbots {
74 $nid = 6;
75}
76peertube {
77 $nid = 5;
78}
79# {
80# $nid = 4;
81#}
82# {
83# $nid = 3;
84#}
85thelounge {
86 $nid = 2;
87}
88forgejo {
89 $nid = 1;
90}
91opengist {
92 $nid = 0;
93}
94
pf.conf Raw
1ext_if = "em0"
2jail_net = "192.168.123.0/24"
3
4table <crowdsec-blacklists> persist
5table <crowdsec6-blacklists> persist
6
7set skip on lo
8
9# NAT so jails can access internet
10nat on $ext_if from $jail_net to any -> ($ext_if)
11
12# Forward Luanti ports to its jail
13rdr pass on $ext_if proto udp from any to any port 30000:40000 -> 192.168.123.11 port 30000:40000
14
15block drop in quick from <crowdsec-blacklists> to any
16block drop in quick from <crowdsec6-blacklists> to any
17
18pass in all
19pass out all
20
rc.conf Raw
1# SYSTEM PROPERTIES ##
2hostname="oreo"
3dumpdev="AUTO"
4moused_nondefault_enable="NO"
5clear_tmp_enable="YES"
6syslogd_flags="-ss"
7ntpd_enable="YES"
8ntpd_sync_on_start="YES"
9smartd_enable="NO"
10powerd_enable="NO"
11linux_enable="YES"
12zfs_enable="YES"
13zfskeys_enable="YES"
14
15## REMOTE ACCESS ##
16webmin_enable="YES"
17sshd_enable="YES"
18nginx_enable="YES"
19
20## ETHERNET ##
21#ifconfig_em0="DHCP"
22ifconfig_em0="inet 10.0.0.86 netmask 255.255.255.0 up"
23ifconfig_em0_ipv6="inet6 accept_rtadv up"
24ipv6_activate_all_interfaces="YES"
25rtsold_enable="YES"
26defaultrouter="10.0.0.1"
27
28## VPN ##
29wireguard_enable="YES"
30wireguard_interfaces="wg0"
31
32## VMS AND CONTAINERS ##
33jail_enable="YES"
34
35vm_enable="YES"
36vm_dir="/mnt/ssd/vm"
37vm_list="haos"
38
39## JAIL NETWORKING ##
40gateway_enable="YES"
41
42cloned_interfaces="bridge1"
43ifconfig_bridge1="inet 192.168.123.1/24 description jailnet up"
44
45pf_enable="YES"
46pf_rules="/etc/pf.conf"
47gateway_enable="YES"
48
49## LOCAL SERVICES ##
50bootstrapsona_enable="YES"
51
52## TO CATEGORIZE ##
53postgresql_enable="YES"
54valkey_enable="YES"
55kld_list="i915kms"
56