export JAIL=debian
export JAILHOSTNAME=debian
export JAILDOMAIN=ahlawat.com
export JAILIP=65
iocage create -n "$JAIL" -e exec_start="/bin/true" exec_stop="/bin/true" exec_prestart="ifconfig tap65 create; ifconfig bridge1 addm tap65 up; ifconfig tap65 up; ifconfig tap65 inet6 auto_linklocal" interfaces="tap65:bridge1" ip4_addr="tap65|192.168.0.$JAILIP/24" defaultrouter="192.168.0.5" ip6_addr="tap65|2603:3024:3f6:e1::$JAILIP/64" defaultrouter6="2603:3024:3f6:e1::5" resolver="nameserver 192.168.0.5;nameserver 2603:3024:3f6:e1::5;search $JAILDOMAIN" allow_raw_sockets=1 boot=on host_hostname="$JAILHOSTNAME.$JAILDOMAIN"
debootstrap --arch=amd64 --no-check-gpg focal /mnt/iocage/jails/$JAIL/root/
echo "APT::Cache-Start 251658240;" > /mnt/iocage/jails/$JAIL/root/etc/apt/apt.conf.d/00aptitude
iocage fstab -e $JAIL
devfs /mnt/iocage/jails/debian/root/dev devfs rw 0 0
tmpfs /mnt/iocage/jails/debian/root/dev/shm tmpfs rw,size=1g,mode=1777 0 0
fdescfs /mnt/iocage/jails/debian/root/dev/fd fdescfs rw,linrdlnk 0 0
linprocfs /mnt/iocage/jails/debian/root/proc linprocfs rw 0 0
linsysfs /mnt/iocage/jails/debian/root/sys linsysfs rw 0 0
/tmp /mnt/iocage/jails/debian/root/tmp nullfs rw 0 0
/home /mnt/iocage/jails/debian/root/home nullfs rw 0 0
iocage fstab -l $JAIL
iocage start $JAIL
iocage console $JAIL
apt update
dpkg-reconfigure tzdata
apt install language-pack-en nano openssh-server
service ssh start
passwd # for su access
adduser ahlawat
exit
iocage set exec_start="service ssh start" debian