Unverified Commit 76210eaa authored by Igor Pečovnik's avatar Igor Pečovnik
Browse files

Add IPV6 toggler

parent d4af98e7
......@@ -258,10 +258,10 @@ function jobs ()
fi
;;
# Connect to wireless access point
# Start network performance daemon
#
"Iperf3" )
# disable AP mode on certain adapters
#
if pgrep -x "iperf3" > /dev/null
then
pkill iperf3
......@@ -270,6 +270,27 @@ function jobs ()
fi
;;
# Toogle IPV6
#
"IPV6" )
#
sed -i --follow-symlinks '/^net.ipv6.conf*/d' /etc/sysctl.d/99-sysctl.conf
if [ -f "/etc/apt/apt.conf.d/99force-ipv4" ]; then
rm /etc/apt/apt.conf.d/99force-ipv4
echo 'net.ipv6.conf.all.disable_ipv6 = 0' >> /etc/sysctl.d/99-sysctl.conf
echo 'net.ipv6.conf.default.disable_ipv6 = 0' >> /etc/sysctl.d/99-sysctl.conf
echo 'net.ipv6.conf.lo.disable_ipv6 = 0' >> /etc/sysctl.d/99-sysctl.conf
else
echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4
echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.d/99-sysctl.conf
echo 'net.ipv6.conf.default.disable_ipv6 = 1' >> /etc/sysctl.d/99-sysctl.conf
echo 'net.ipv6.conf.lo.disable_ipv6 = 1' >> /etc/sysctl.d/99-sysctl.conf
fi
sysctl -p > /dev/null
;;
# Connect to wireless access point
#
"WiFi" )
......
......@@ -159,6 +159,13 @@ while true; do
fi
# toogle IPV6
if [[ $(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) == 1 ]]; then
LIST+=( "IPV6" "Enable IPV6 for APT and system" )
else
LIST+=( "IPV6" "Disable IPV6 for APT and system" )
fi
# network throughput test
if check_if_installed iperf3; then
if pgrep -x "iperf3" > /dev/null
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment