Skip to content

Instantly share code, notes, and snippets.

@Disassembler0
Created October 21, 2019 10:50
Show Gist options
  • Save Disassembler0/da48101db1e1ed7f206a0ed65c47d02c to your computer and use it in GitHub Desktop.
Save Disassembler0/da48101db1e1ed7f206a0ed65c47d02c to your computer and use it in GitHub Desktop.
IFACE=$(ip route get 1 | head -1 | awk '{print $5}')
echo "net.ipv6.conf.${IFACE}.disable_ipv6 = 1" >/etc/sysctl.d/60-disable-ipv6.conf
systemctl restart procps
echo "Disabled IPv6 on ${IFACE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment