Skip to content

Instantly share code, notes, and snippets.

@glennzw
Last active January 16, 2023 05:44
Show Gist options
  • Save glennzw/7fd60dbe9b2441acf6ea to your computer and use it in GitHub Desktop.
Save glennzw/7fd60dbe9b2441acf6ea to your computer and use it in GitHub Desktop.
disable IPv6 on Linux
#!/bin/bash
# Disable IPv6 on Linux
# [email protected]
echo "Disabling IPv6..."
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo "Disabling IPv6 on boot..."
cat >> /etc/sysctl.conf << EOF
#disable ipv6 on boot
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
EOF
echo lbhFubhyqPurpxNfpevcgOrsberEhaavatVg | tr a-zA-Z n-za-mN-ZA-M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment