
.conf
이 줄을 디렉토리의 파일 에 추가했습니다./etc/sysctl.d
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
그럼 난 할게sudo systemctl restart systemd-sysctl
지금까지는 괜찮았으며, 예를 들어
cat /proc/sys/net/ipv6/conf/lo/disable_ipv6
return을 확인할 수 1
있으며 출력에 ipv6 주소가 할당되지 않은 것을 볼 수 있습니다.ip address
그러나 컴퓨터를 절전 모드로 전환하면 설정이 유지되지 않습니다(위의 내용을 반복하지 않는 한 sudo systemctl restart systemd-sysctl
). 저는 Fedora 32를 사용하고 있습니다. 이 설정은 유지되어야 한다고 생각합니다. 여기서 뭔가 빠졌나요?
답변1
노력하다:
sysctl -p
또는 방탄 ipv6 비활성화를 위해 - grub.conf 라인 ipv6.disable=1을 추가하세요:
# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
새로운 grub 구성 파일을 생성합니다:
# grub2-mkconfig -o /boot/grub2/grub.cfg
다시 시작하세요.
# reboot