Skip to content

Instantly share code, notes, and snippets.

@libcrack
Created June 30, 2016 14:14
Show Gist options
  • Select an option

  • Save libcrack/45527ec58c80df47f50d4d88f2884b0b to your computer and use it in GitHub Desktop.

Select an option

Save libcrack/45527ec58c80df47f50d4d88f2884b0b to your computer and use it in GitHub Desktop.
Script to disable IPv6 in Debian systems
#!/bin/sh
# @libcrack.so
# jue nov 13 21:33:12 CET 2014
echo "Disabling IPv6"
echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf
echo net.ipv6.conf.default.disable_ipv6=1 >> /etc/sysctl.d/disableipv6.conf
echo net.ipv6.conf.lo.disable_ipv6=1 >> /etc/sysctl.d/disableipv6.conf
echo net.ipv6.conf.eth0.disable_ipv6=1 >> /etc/sysctl.d/disableipv6.conf
sed -e 's/^::1/#::1/g' -i /etc/hosts
sed -e 's/^fe/#ff/g' -i /etc/hosts
sed -e 's/^ff/#ff/g' -i /etc/hosts
echo blacklist ipv6 > /etc/modprobe.d/blacklist-ipv6.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment