Disable IPV6 Debian

Disable IPV6 Debian

Disable IPV6

Debian


第一種

加入 /etc/sysctl.conf 內

sudo nano /etc/syctl.conf

所有網絡

net.ipv6.conf.all.disable_ipv6 = 1

指定網絡咭

net.ipv6.conf.enp0s3.disable_ipv6 = 1

套用

sudo sysctl -p

第二種

產生一個 70-disable-ipv6.conf 在 /etc/sysctl.d 路徑上

sudo nano /etc/sysctl.d/70-disable-ipv6.conf

所有網絡

net.ipv6.conf.all.disable_ipv6 = 1

指定網絡咭

net.ipv6.conf.enp0s3.disable_ipv6 = 1

套用

sudo sysctl -p -f /etc/sysctl.d/70-disable-ipv6.conf