Bonjour
le but est de désactiver l’ipv6 au boot donc je rajoute cette règle:
ll /etc/sysctl.d
total 12K
-rw-r--r-- 1 root root 146 18 mai 14:11 30-brave.conf
-rw-r--r-- 1 root root 102 30 août 11:39 70-disable-ipv6.conf
lrwxrwxrwx 1 root root 14 20 mars 20:55 99-sysctl.conf -> ../sysctl.conf
-rw-r--r-- 1 root root 639 17 mai 2018 README.sysctl
les règles:
# cat /etc/sysctl.d/70-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
puis:
reboot
apres le reboot SURPRISE:
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether bc:ae:c5:be:bf:ac brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
valid_lft 86369sec preferred_lft 86369sec
inet6 2a01:cb18:8453:b200:f8af:34d6:66c9:953d/64 scope global temporary dynamic
valid_lft 86390sec preferred_lft 590sec
inet6 2a01:cb18:8453:b200:beae:c5ff:febe:bfac/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86390sec preferred_lft 590sec
inet6 fe80::beae:c5ff:febe:bfac/64 scope link noprefixroute
valid_lft forever preferred_lft forever
toujours de l’ipV6, petite vérification:
# cat /etc/sysctl.d/70-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
# cat /proc/sys/net/ipv6/conf/all/disable_ipv6 && cat /proc/sys/net/ipv6/conf/default/disable_ipv6&& cat /proc/sys/net/ipv6/conf/lo/disable_ipv6
1
1
1
il faut croire que le default
ou le all
ne marchent pas!
# cat /proc/sys/net/ipv6/conf/enp2s0/disable_ipv6
0
# cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
# cat /proc/sys/net/ipv6/conf/default/disable_ipv6
1
mais le pire c’est que si je fais ça:
# sysctl -p /etc/sysctl.d/70-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether bc:ae:c5:be:bf:ac brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
valid_lft 85866sec preferred_lft 85866sec
BOOM plus d’ipv6!! je décide de rebooter
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether bc:ae:c5:be:bf:ac brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
valid_lft 86372sec preferred_lft 86372sec
inet6 2a01:cb18:8453:b200:6207:5aaf:5b13:76a6/64 scope global temporary dynamic
valid_lft 86374sec preferred_lft 574sec
inet6 2a01:cb18:8453:b200:beae:c5ff:febe:bfac/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86374sec preferred_lft 574sec
inet6 fe80::beae:c5ff:febe:bfac/64 scope link noprefixroute
valid_lft forever preferred_lft forever
l’ipv6 est toujours là donc je rajoute la règle pour l’interface:
# cat /etc/sysctl.d/70-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv6.conf.enp2s0.disable_ipv6=1
# reboot
attention les yeux!!
ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether bc:ae:c5:be:bf:ac brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
valid_lft 86342sec preferred_lft 86342sec
inet6 2a01:cb18:8453:b200:109e:280f:fbb3:32b2/64 scope global temporary dynamic
valid_lft 86391sec preferred_lft 591sec
inet6 2a01:cb18:8453:b200:beae:c5ff:febe:bfac/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86391sec preferred_lft 591sec
inet6 fe80::beae:c5ff:febe:bfac/64 scope link noprefixroute
valid_lft forever preferred_lft forever
encore ipv6 et manuellment:
# sysctl -p /etc/sysctl.d/70-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp2s0.disable_ipv6 = 1
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether bc:ae:c5:be:bf:ac brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
valid_lft 86289sec preferred_lft 86289sec
Merci pour vos retour