modified scripts

This commit is contained in:
2023-10-07 13:16:15 -05:00
parent ac559ac0d1
commit fcf7f49af7
4 changed files with 24 additions and 22 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# disable ipv6
isInFile=$(cat /etc/sysctl.conf | grep -c "net.ipv6.conf.all.disable_ipv6 = 1")
if [ $isInFile -eq 0 ]
then
echo "" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
else
echo "ipv6 already disabled"
fi

View File

@@ -40,17 +40,6 @@ if [[ ! -f /etc/sudoers.d/akanealw ]] ; then
fi
usermod -a -G sudo akanealw
# disable ipv6
isInFile=$(cat /etc/sysctl.conf | grep -c "net.ipv6.conf.all.disable_ipv6 = 1")
if [ $isInFile -eq 0 ]
then
echo "" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
else
echo "ipv6 already disabled"
fi
# enable ping for all users
setcap 'cap_net_admin,cap_net_raw+ep' $(which ping)