Skip to content

Instantly share code, notes, and snippets.

@nidr0x
Created April 22, 2023 13:45
Show Gist options
  • Save nidr0x/0f2f87c4a679d457b3ca892c64e191c5 to your computer and use it in GitHub Desktop.
Save nidr0x/0f2f87c4a679d457b3ca892c64e191c5 to your computer and use it in GitHub Desktop.
sysctl-ipv6
#!/bin/bash
# /etc/network/if-pre-up.d/sysctl-ipv6
# Disable IPv6 auto configuration on Ubuntu because of some bugs
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/997605
# IPv6 Privacy extensions
sysctl -w net.ipv6.conf.all.use_tempaddr=0
sysctl -w net.ipv6.conf.default.use_tempaddr=0
sysctl -w net.ipv6.conf.${IFACE}.use_tempaddr=0
# IPv6 Auto configuration
sysctl -w net.ipv6.conf.all.autoconf=0
sysctl -w net.ipv6.conf.default.autoconf=0
sysctl -w net.ipv6.conf.${IFACE}.autoconf=0
sysctl -w net.ipv6.conf.all.accept_ra=0
sysctl -w net.ipv6.conf.default.accept_ra=0
sysctl -w net.ipv6.conf.${IFACE}.accept_ra=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment