N. P. O'Donnell, 2021
Bring eth0
interface down:
WARNING: If you do this remotely (like through an SSH connection), it will disconnect you...
#!/usr/bin/env bash | |
# | |
# Creates a persistent, SSHable ubuntu 21.10 in a container, including tmux. | |
docker stop my-ubuntu-ctr | |
docker rm my-ubuntu-ctr | |
docker rmi my-ubuntu | |
docker build -t my-ubuntu - << HERE | |
FROM ubuntu:21.10 |
#!/usr/bin/env bash | |
NTOK=3 | |
do_cmd() { | |
echo "Command start $1" | |
sleep 5 | |
echo "Command end $1" | |
return 1 | |
} |
#!/usr/bin/env bash | |
# | |
# Switch between Wireguard tunnels located in /etc/wireguard/ | |
# Each tunnel should be defined with a config file, eg. wg0.conf | |
# | |
# N. P. O'Donnell, 2022 | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $0 [OPTIONS] [<new tunnel>]" | |
echo |
N. P. O'Donnell, 2022