Created
June 30, 2016 14:14
-
-
Save libcrack/45527ec58c80df47f50d4d88f2884b0b to your computer and use it in GitHub Desktop.
Script to disable IPv6 in Debian systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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