January 15Jan 15 有些情況下,做論壇只用IPv4,而不用IPv6,所以關閉IPv6,另一方面的原因是沒寫IPv6的防火牆規則真正關閉IPv6,有可能要寫入到rc.local確認網路卡名稱ip link如果顯示 ens5 或類似的名稱就將這一行 sysctl -w net.ipv6.conf.ens5.disable_ipv6=1寫入到 /etc/sysctl.d/99-disable-ipv6.conf建立一個檔案並修改vi /etc/sysctl.d/99-disable-ipv6.conf複製貼上這幾行,視情況將 ens5 修改為你的網路卡名稱net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1net.ipv6.conf.lo.disable_ipv6 = 1sysctl -w net.ipv6.conf.ens5.disable_ipv6=1ESC儲存並離開:wq重開機reboot檢查網路卡是否還有 IPv6,不應該看到 inet6ifconfig -a | grep inet6如果還能看到 inet6,就將底下這一行,寫入到rc.localsysctl -w net.ipv6.conf.ens5.disable_ipv6=1將上面這一行,寫入到rc.localvi /etc/rc.localESC儲存並離開:wq重開機reboot檢查網路卡是否還有 IPv6,不應該看到 inet6ifconfig -a | grep inet6這時應該看不到 inet6既然要寫入到rc.local,才能關掉IPv6,那麼 99-disable-ipv6.conf 裡面的這一行 sysctl -w net.ipv6.conf.ens5.disable_ipv6=1 刪除掉vi /etc/sysctl.d/99-disable-ipv6.confESC儲存並離開:wq重開機reboot最後確認真的不會看到 inet6,真的關掉IPv6ifconfig -a | grep inet6 Edited January 16Jan 16 by Jack
Create an account or sign in to comment