sshuttle
sudo apt-get install -y sshuttle
sshuttle --dns --remote foo@example.com 10.0.0.0/8 192.168.251.36/3 --exclude 192.168.179.0/24
Linux
https://sshuttle.readthedocs.io/en/stable/
https://sshuttle.readthedocs.io/en/stable/windows.html
sudo apt-get install -y sshuttle
sshuttle --dns --remote foo@example.com 10.0.0.0/8 192.168.251.36/3 --exclude 192.168.179.0/24
Linux
https://sshuttle.readthedocs.io/en/stable/
https://sshuttle.readthedocs.io/en/stable/windows.html
echo pass1234 | openconnect --no-cert-check vpn.example.com --user foo
start-stop-daemon --start --make-pidfile --pidfile "${VPNPID}" \
--stderr "${VPNERRFILE}" --stdout "${VPNLOGFILE}" \
--background --exec /bin/bash \
-- -c "exec /usr/sbin/openconnect --pid-file=\"${VPNPID}\" ${!VPNOPTS} ${!SERVER} <<< \`echo \"${!PASSWORD}\"\`"
# Custom script
# cat /etc/vpnc/post-connect.d/route
#!/bin/bash
ip route del default
ip route add default via 10.0.17.254
ip route add 120.1.0.0/16 dev tun0 scope link
export CONTAINER=vpn
# create container
# TODO: configure MAC on create container
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/lxc/master/create.jessie.sh -O - | bash -s -- -f
# configure container MAC address
sed -i 's|lxc.network.hwaddr = .*|lxc.network.hwaddr = 00:11:22:33:44:5e|' /var/lib/lxc/${CONTAINER}/config
# enable autostart
echo "lxc.start.auto = 1" | tee -a /var/lib/lxc/${CONTAINER}/config
# configure container
##echo "lxc.hook.autodev=/var/lib/lxc/vpn/autodev" >> /var/lib/lxc/${CONTAINER}/config