mirror of
https://codeberg.org/scip/jaildk.git
synced 2025-12-18 13:11:02 +01:00
Added ipfw.conf functions for jail start/stop, to manage firewalling
This commit is contained in:
5
jaildk
5
jaildk
@@ -715,7 +715,7 @@ jaildk_clone() {
|
|||||||
clone $j/data/$src/www $j/data/$new/www
|
clone $j/data/$src/www $j/data/$new/www
|
||||||
clone $j/data/$src/spool $j/data/$new/spool
|
clone $j/data/$src/spool $j/data/$new/spool
|
||||||
|
|
||||||
ex cp -pRp $j/etc/$src/mount.conf $j/etc/$src/ports.conf $j/etc/$src/mtree.conf $j/etc/$new/
|
ex cp -pRp $j/etc/$src/mount.conf $j/etc/$src/ports.conf $j/etc/$src/mtree.conf $j/etc/$src/ipfw.conf $j/etc/$new/
|
||||||
|
|
||||||
echo "Creating $j/etc/$src/jail.conf"
|
echo "Creating $j/etc/$src/jail.conf"
|
||||||
cat $j/etc/$src/jail.conf | egrep -v "^(name|version)=" > $j/etc/$new/jail.conf
|
cat $j/etc/$src/jail.conf | egrep -v "^(name|version)=" > $j/etc/$new/jail.conf
|
||||||
@@ -1165,6 +1165,9 @@ home/$name/root-$version $name/root nullfs rw' >
|
|||||||
bold "creating template config $j/etc/.template/ports.conf"
|
bold "creating template config $j/etc/.template/ports.conf"
|
||||||
(echo bash; echo ca_root_nss) > $j/etc/.template/ports.conf
|
(echo bash; echo ca_root_nss) > $j/etc/.template/ports.conf
|
||||||
|
|
||||||
|
bold "creating template config $j/etc/.template/ipfw.conf"
|
||||||
|
touch $j/etc/.template/ipfw.conf
|
||||||
|
|
||||||
bold "creating template config $j/etc/.template/mtree.conf"
|
bold "creating template config $j/etc/.template/mtree.conf"
|
||||||
# touch $j/etc/.template/mtree.conf
|
# touch $j/etc/.template/mtree.conf
|
||||||
echo '/set type=dir uid=0 gid=0 mode=01777
|
echo '/set type=dir uid=0 gid=0 mode=01777
|
||||||
|
|||||||
Reference in New Issue
Block a user