diff --git a/docker-hosts.sh b/docker-hosts.sh new file mode 100755 index 0000000..fa37148 --- /dev/null +++ b/docker-hosts.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +docker ps --format='{{json .Names}}' | xargs docker inspect -f '{{range .NetworkSettings.Networks}}{{json .}}{{end}}' | jq -r '.IPAddress + " " + .Aliases[0]' + diff --git a/one-time-stuff/privacy-setting.sh b/one-time-stuff/privacy-setting.sh new file mode 100644 index 0000000..bde81c2 --- /dev/null +++ b/one-time-stuff/privacy-setting.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +echo "----- Disable IPv6 privacy settings? in sysctl -------" +read -p 'if using as a IPv6 enabled server, you probably want to turn that off? [y/N]: ' fix_tempaddr +case $fix_tempaddr in + [Yy]* ) + echo 'Comment existing tempaddr settings' + sudo sed -i '/^\(net.ipv6.conf.all.use_tempaddr\|net.ipv6.conf.default.use_tempaddr)/s/^/# ABS #/' "/etc/sysctl.d/10-ipv6-privacy.conf" + + echo 'Appending replacement tempaddr settings' + ( + cat << 'TERM' + +# ABS do not use the privacy extensions +net.ipv6.conf.all.use_tempaddr = 0 +net.ipv6.conf.default.use_tempaddr = 0 + +TERM +) | sudo tee -a "/etc/sysctl.d/10-ipv6-privacy.conf" + + echo "You should reboot to ensure the new settings go into effect" + + ;; + * ) + echo 'Skipping' + ;; +esac +