diff options
author | JoeServ <bousset.rudy@gmail.com> | 2023-02-28 18:46:08 +0100 |
---|---|---|
committer | JoeServ <bousset.rudy@gmail.com> | 2023-02-28 18:46:08 +0100 |
commit | ab31d4eb2ffb2a8d1aa96acb51ee568725386621 (patch) | |
tree | bdef23af6d7dd97b8ef8d04b3a6b4aa7fba9c63c /etc/jail.conf | |
parent | Jail rework (diff) | |
download | joe-conf-ab31d4eb2ffb2a8d1aa96acb51ee568725386621.tar.gz joe-conf-ab31d4eb2ffb2a8d1aa96acb51ee568725386621.tar.bz2 joe-conf-ab31d4eb2ffb2a8d1aa96acb51ee568725386621.tar.xz joe-conf-ab31d4eb2ffb2a8d1aa96acb51ee568725386621.tar.zst joe-conf-ab31d4eb2ffb2a8d1aa96acb51ee568725386621.zip |
Diffstat (limited to 'etc/jail.conf')
-rw-r--r-- | etc/jail.conf | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/etc/jail.conf b/etc/jail.conf new file mode 100644 index 0000000..3cd95cf --- /dev/null +++ b/etc/jail.conf @@ -0,0 +1,70 @@ +exec.start = "/bin/sh /etc/rc"; +exec.stop = "/bin/sh /etc/rc.shutdown jail"; +exec.clean; +path = "/var/jail/${name}"; +host.hostname = ${name}; +mount.devfs; +allow.mount.tmpfs; + +www { + $id = 1; + $ipaddr = 95.179.223.82; + $netmask = 255.255.255.255; + $gw = 10.0.0.254; + jid = ${id}; + ip4.addr = ${ipaddr}; +} + +git { + $id = 2; + $ipaddr = 95.179.223.82; + $netmask = 255.255.255.255; + $gw = 10.0.0.254; + jid = ${id}; + ip4.addr = ${ipaddr}; +} + +i2p { + $id = 3; + $ipaddr = 95.179.223.82; + $netmask = 255.255.255.255; + $gw = 10.0.0.254; + jid = ${id}; + ip4.addr = ${ipaddr}; +} + +wireguard { + $id = 4; + $ipaddr = 10.0.0.${id}; + $netmask = 255.255.255.255; + $gw = 10.0.0.254; + jid = ${id}; + vnet; + vnet.interface = "epair${id}b"; + allow.raw_sockets; + + exec.prestart = "ifconfig epair${id} create up"; + exec.prestart += "ifconfig epair${id}a up descr vnet-${name}"; + exec.prestart += "ifconfig bridge0 addm epair${id}a up"; + + exec.start = "/sbin/ifconfig lo0 127.0.0.1 up"; + exec.start += "/sbin/ifconfig epair${id}b inet ${ipaddr} netmask ${netmask}"; + exec.start += "/sbin/route add default ${gw}"; + exec.start += "/bin/sh /etc/rc"; + + exec.prestop = "ifconfig epair${id}b -vnet ${name}"; + + exec.poststop = "ifconfig bridge0 deletem epair${id}a"; + exec.poststop += "ifconfig epair${id}a destroy"; +} +# vnet; +# devfs_ruleset = "5"; +# vnet.interface = "vn0_wireguard"; +# exec.prestart += "jib addm wireguard vtnet0"; +# exec.poststop += "jib destroy wireguard"; +# #exec.start += "echo epair0b"; +# #ip4.addr = 95.179.223.82; + +#nextcloud { +# ip4.addr = 95.179.223.82; +#} |