Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
76210eaa
Unverified
Commit
76210eaa
authored
Jun 11, 2018
by
Igor Pečovnik
Browse files
Add IPV6 toggler
parent
d4af98e7
Changes
2
Show whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
76210eaa
...
...
@@ -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"
)
...
...
debian-config-submenu
View file @
76210eaa
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment