Jail: jump

one time
.

create jail
export JAIL=jump
export JAILHOSTNAME=jump
export JAILDOMAIN=ahlawat.com
export JAILIP=55
export JAILUSER=X
export JAILUSERID=1000
export JAILUSERVNC=false

/root/FreeBSD/jails/create.sh $JAIL $JAILHOSTNAME $JAILDOMAIN $JAILIP $JAILUSER $JAILUSERID $JAILUSERVNC

iocage fstab -l $JAIL

iocage set allow_vmm=1 children_max=8 securelevel=1 allow_mount=1 enforce_statfs=1 allow_mount_devfs=1 devfs_ruleset=300 allow_mount_procfs=1 exec_start="/bin/sh /mnt/config/setup_jail.sh" $JAIL 

iocage exec $JAIL "pkg install -y guacamole-server guacamole-client openldap-sasl-client wireguard libqrencode"

iocage exec $JAIL sysrc "cp -r /mnt/config/guacamole-* /usr/local/etc/"
iocage exec $JAIL sysrc "guacd_enable=YES"
iocage exec $JAIL sysrc "tomcat9_enable=YES"
iocage exec "$JAIL sysrc tomcat9_java_opts="-Xms1g -Xmx1g""
iocage exec "$JAIL sysrc wireguard_enable=YES"
iocage exec "$JAIL sysrc wireguard_interfaces=wg0"
iocage exec "$JAIL sysrc gateway_enable="YES""

Notes:

tar -xvzf /usr/local/share/guacamole-client/guacamole-auth-ldap.tar.gz
# copy schema file to ldap jail and edit slapd.conf to include it
mkdir /usr/local/etc/guacamole-client/extensions
mv guacamole-auth-ldap-1.2.0.jar /usr/local/etc/guacamole-client/extensions/


https://www.wireguard.com/quickstart/

wireguard installed on base system
wg in rc.conf's kld_list

wg genkey | tee server.private | wg pubkey > server.public
wg genkey | tee peer.private | wg pubkey > peer.public
chmod 400 *.private *.conf

qrencode -t ansi < peer.conf

https://play.google.com/store/apps/details?id=com.wireguard.android


Showcased here is a capital and operational cost effective approach, using minimal server and networking hardware with multiple virtualized applications for Home and Business. This solution template can be easily scaled out and adapted for larger Enterprise deployments.
drop by the diyIT Matrix public room at #diyit:matrix.ahlawat.com
if you have any IT questions/feedback or to request pro bono consulting for a nonprofit

message me privately at @sharad:matrix.ahlawat.com
or email me at - sharad@ahlawat.com - pgpkey: 68DD6B89
Networking and Security Technologist.
EngineerĀ andĀ an avid Programmer.

https://sharad.ahlawat.com
strive to learn and pass on the knowledge to the next generation
one day humanity will understand the meaning of life and hopefully it will be more than ASCII 42 = "*" regex for whatever you want it to be,
and destiny is more than just a roll of a pair of dice with 42 dots (Lets nail down Quantum Entanglement)

May you Live Long (Intelligently) and Prosper and work on technology that matters.
© 2024 Sharad Ahlawat

No personal identifying data is collected or any form of analytics/metrics reported to a third-party by this website.