diff options
-rw-r--r-- | etc/jail.conf | 70 | ||||
-rw-r--r-- | etc/rc.conf | 6 | ||||
-rw-r--r-- | root/.cshrc | 1 |
3 files changed, 74 insertions, 3 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; +#} diff --git a/etc/rc.conf b/etc/rc.conf index c96e4a5..16cb503 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -20,11 +20,11 @@ ifconfig_vtnet0="DHCP -rxcsum -tso" cron_flags="-m ''" jail_enable="YES" gateway_enable="YES" -static_routes="net1" -route_net1="-net 10.0.0.0/24 95.179.223.82" +#static_routes="net1" +#route_net1="-net 10.0.0.0/24 95.179.223.82" kld_list="if_bridge if_tap if_epair" cloned_interfaces="bridge0" -ifconfig_bridge0="inet 10.0.0.254/24" +ifconfig_bridge0="inet 10.0.0.254 netmask 255.255.255.0 descr jails-bridge" #cloned_interfaces="bridge0 epair0" #ifconfig_bridge0="addm vtnet0 addm epair0a up" #ifconfig_epair0a="up" diff --git a/root/.cshrc b/root/.cshrc index fc22012..8273d02 100644 --- a/root/.cshrc +++ b/root/.cshrc @@ -12,6 +12,7 @@ alias la ls -aF alias lf ls -FA alias ll ls -lAF alias ls ls -lhG +alias less less -R -c -S alias tree tree -C alias c clear alias vim nvim |