Last active
May 3, 2020 08:51
-
-
Save antranigv/a3fc611711b05cd4499d63b368f6bfa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /etc/jail.conf | |
exec.start = "/bin/sh /etc/rc"; | |
exec.stop = "/bin/sh /etc/rc.shutdown"; | |
exec.clean; | |
allow.raw_sockets; | |
allow.mount.tmpfs; | |
mount.devfs; | |
base { | |
$id = "10"; | |
$ipaddr = "172.16.150.${id}"; | |
$mask = "255.255.255.0"; | |
$gw = "172.16.150.1"; | |
vnet; | |
vnet.interface = "epair${id}b"; | |
exec.prestart = "ifconfig epair${id} create up"; | |
exec.prestart += "ifconfig epair${id}a up descr vnet-${name}"; | |
exec.prestart += "ifconfig bridge150 addm epair${id}a up"; | |
exec.start = "/sbin/ifconfig lo0 127.0.0.1 up"; | |
exec.start += "/sbin/ifconfig epair${id}b ${ipaddr} netmask ${mask} up"; | |
exec.start += "/sbin/route add default ${gw}"; | |
exec.start += "/bin/sh /etc/rc"; | |
exec.poststop += "ifconfig epair${id}a destroy"; | |
host.hostname = "${name}.loc"; | |
path = "/usr/local/jailz/${name}"; | |
persist; | |
} | |
git0 { | |
$id = "11"; | |
$ipaddr = "172.16.150.${id}"; | |
$mask = "255.255.255.0"; | |
$gw = "172.16.150.1"; | |
vnet; | |
vnet.interface = "epair${id}b"; | |
exec.prestart = "ifconfig epair${id} create up"; | |
exec.prestart += "ifconfig epair${id}a up descr vnet-${name}"; | |
exec.prestart += "ifconfig bridge150 addm epair${id}a up"; | |
exec.start = "/sbin/ifconfig lo0 127.0.0.1 up"; | |
exec.start += "/sbin/ifconfig epair${id}b ${ipaddr} netmask ${mask} up"; | |
exec.start += "/sbin/route add default ${gw}"; | |
exec.start += "/bin/sh /etc/rc"; | |
exec.poststop += "ifconfig epair${id}a destroy"; | |
host.hostname = "${name}.loc"; | |
path = "/usr/local/jailz/${name}"; | |
persist; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloned_interfaces="bridge150" | |
ifconfig_bridge150="inet 192.168.150.1 netmask 255.255.255.0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment