[RESOLU] complètement désactiver ipv6

J’ai pour habitude de désactiver ipv6, directement après l’installation de la machine, à la recompilation du kernel.

Quelqu’un me pose la question suivante: comment faire pour désactiver proprement ipv6, sans devoir recompiler mon kernel ?

J’avais fait le test il y a quelque temps en mettant la ligne correspondante, dans /etc/modprobe.conf en commentaire. Ca ne fait pas les choses proprement et suite à celà, ma config réseau était de travers…

Je pense qu’en passant par sysctl ça doit être possible, voici un output de sysctl chez moi:

luciole:/home/bej# sysctl -A | grep ipv6 error: "Success" reading key "dev.parport.parport0.autoprobe3" error: "Success" reading key "dev.parport.parport0.autoprobe2" error: "Success" reading key "dev.parport.parport0.autoprobe1" error: "Success" reading key "dev.parport.parport0.autoprobe0" error: "Success" reading key "dev.parport.parport0.autoprobe" error: "Operation not permitted" reading key "net.ipv6.route.flush" error: "Operation not permitted" reading key "net.ipv4.route.flush" net.ipv6.conf.default.max_addresses = 16 net.ipv6.conf.default.max_desync_factor = 600 net.ipv6.conf.default.regen_max_retry = 5 net.ipv6.conf.default.temp_prefered_lft = 86400 net.ipv6.conf.default.temp_valid_lft = 604800 net.ipv6.conf.default.use_tempaddr = 0 net.ipv6.conf.default.force_mld_version = 0 net.ipv6.conf.default.router_solicitation_delay = 1 net.ipv6.conf.default.router_solicitation_interval = 4 net.ipv6.conf.default.router_solicitations = 3 net.ipv6.conf.default.dad_transmits = 1 net.ipv6.conf.default.autoconf = 1 net.ipv6.conf.default.accept_redirects = 1 net.ipv6.conf.default.accept_ra = 1 net.ipv6.conf.default.mtu = 1280 net.ipv6.conf.default.hop_limit = 64 net.ipv6.conf.default.forwarding = 0 net.ipv6.conf.all.max_addresses = 16 net.ipv6.conf.all.max_desync_factor = 600 net.ipv6.conf.all.regen_max_retry = 5 net.ipv6.conf.all.temp_prefered_lft = 86400 net.ipv6.conf.all.temp_valid_lft = 604800 net.ipv6.conf.all.use_tempaddr = 0 net.ipv6.conf.all.force_mld_version = 0 net.ipv6.conf.all.router_solicitation_delay = 1 net.ipv6.conf.all.router_solicitation_interval = 4 net.ipv6.conf.all.router_solicitations = 3 net.ipv6.conf.all.dad_transmits = 1 net.ipv6.conf.all.autoconf = 1 net.ipv6.conf.all.accept_redirects = 1 net.ipv6.conf.all.accept_ra = 1 net.ipv6.conf.all.mtu = 1280 net.ipv6.conf.all.hop_limit = 64 net.ipv6.conf.all.forwarding = 0 net.ipv6.conf.eth0.max_addresses = 16 net.ipv6.conf.eth0.max_desync_factor = 600 net.ipv6.conf.eth0.regen_max_retry = 5 net.ipv6.conf.eth0.temp_prefered_lft = 86400 net.ipv6.conf.eth0.temp_valid_lft = 604800 net.ipv6.conf.eth0.use_tempaddr = 0 net.ipv6.conf.eth0.force_mld_version = 0 net.ipv6.conf.eth0.router_solicitation_delay = 1 net.ipv6.conf.eth0.router_solicitation_interval = 4 net.ipv6.conf.eth0.router_solicitations = 3 net.ipv6.conf.eth0.dad_transmits = 1 net.ipv6.conf.eth0.autoconf = 1 net.ipv6.conf.eth0.accept_redirects = 1 net.ipv6.conf.eth0.accept_ra = 1 net.ipv6.conf.eth0.mtu = 1500 net.ipv6.conf.eth0.hop_limit = 64 net.ipv6.conf.eth0.forwarding = 0 net.ipv6.conf.lo.max_addresses = 16 net.ipv6.conf.lo.max_desync_factor = 600 net.ipv6.conf.lo.regen_max_retry = 5 net.ipv6.conf.lo.temp_prefered_lft = 86400 net.ipv6.conf.lo.temp_valid_lft = 604800 net.ipv6.conf.lo.use_tempaddr = -1 net.ipv6.conf.lo.force_mld_version = 0 net.ipv6.conf.lo.router_solicitation_delay = 1 net.ipv6.conf.lo.router_solicitation_interval = 4 net.ipv6.conf.lo.router_solicitations = 3 net.ipv6.conf.lo.dad_transmits = 1 net.ipv6.conf.lo.autoconf = 1 net.ipv6.conf.lo.accept_redirects = 1 net.ipv6.conf.lo.accept_ra = 1 net.ipv6.conf.lo.mtu = 16436 net.ipv6.conf.lo.hop_limit = 64 net.ipv6.conf.lo.forwarding = 0 net.ipv6.neigh.eth0.base_reachable_time_ms = 30000 net.ipv6.neigh.eth0.retrans_time_ms = 1000 net.ipv6.neigh.eth0.locktime = 0 net.ipv6.neigh.eth0.proxy_delay = 79 net.ipv6.neigh.eth0.anycast_delay = 99 net.ipv6.neigh.eth0.proxy_qlen = 64 net.ipv6.neigh.eth0.unres_qlen = 3 net.ipv6.neigh.eth0.gc_stale_time = 60 net.ipv6.neigh.eth0.delay_first_probe_time = 5 net.ipv6.neigh.eth0.base_reachable_time = 30 net.ipv6.neigh.eth0.retrans_time = 1000 net.ipv6.neigh.eth0.app_solicit = 0 net.ipv6.neigh.eth0.ucast_solicit = 3 net.ipv6.neigh.eth0.mcast_solicit = 3 net.ipv6.neigh.lo.base_reachable_time_ms = 30000 net.ipv6.neigh.lo.retrans_time_ms = 1000 net.ipv6.neigh.lo.locktime = 0 net.ipv6.neigh.lo.proxy_delay = 79 net.ipv6.neigh.lo.anycast_delay = 99 net.ipv6.neigh.lo.proxy_qlen = 64 net.ipv6.neigh.lo.unres_qlen = 3 net.ipv6.neigh.lo.gc_stale_time = 60 net.ipv6.neigh.lo.delay_first_probe_time = 5 net.ipv6.neigh.lo.base_reachable_time = 30 net.ipv6.neigh.lo.retrans_time = 1000 net.ipv6.neigh.lo.app_solicit = 0 net.ipv6.neigh.lo.ucast_solicit = 3 net.ipv6.neigh.lo.mcast_solicit = 3 net.ipv6.neigh.default.base_reachable_time_ms = 30000 net.ipv6.neigh.default.retrans_time_ms = 1000 net.ipv6.neigh.default.gc_thresh3 = 1024 net.ipv6.neigh.default.gc_thresh2 = 512 net.ipv6.neigh.default.gc_thresh1 = 128 net.ipv6.neigh.default.gc_interval = 30 net.ipv6.neigh.default.locktime = 0 net.ipv6.neigh.default.proxy_delay = 79 net.ipv6.neigh.default.anycast_delay = 99 net.ipv6.neigh.default.proxy_qlen = 64 net.ipv6.neigh.default.unres_qlen = 3 net.ipv6.neigh.default.gc_stale_time = 60 net.ipv6.neigh.default.delay_first_probe_time = 5 net.ipv6.neigh.default.base_reachable_time = 30 net.ipv6.neigh.default.retrans_time = 1000 net.ipv6.neigh.default.app_solicit = 0 net.ipv6.neigh.default.ucast_solicit = 3 net.ipv6.neigh.default.mcast_solicit = 3 net.ipv6.mld_max_msf = 64 net.ipv6.ip6frag_secret_interval = 600 net.ipv6.ip6frag_time = 60 net.ipv6.ip6frag_low_thresh = 196608 net.ipv6.ip6frag_high_thresh = 262144 net.ipv6.bindv6only = 0 net.ipv6.icmp.ratelimit = 1000 net.ipv6.route.gc_min_interval_ms = 500 net.ipv6.route.min_adv_mss = 1 net.ipv6.route.mtu_expires = 600 net.ipv6.route.gc_elasticity = 0 net.ipv6.route.gc_interval = 30 net.ipv6.route.gc_timeout = 60 net.ipv6.route.gc_min_interval = 0 net.ipv6.route.max_size = 4096 net.ipv6.route.gc_thresh = 1024 luciole:/home/bej#

Connaissez-vous la commande magique qui me vire tout e cette merde d’un seul coup ou dois-je me taper toutes les lignes dans sysctl.conf ?
Et pour désactiver, si on mets tout à zéro, ca suffit ?

Sinon, si j’essaye la commande suivante:

luciole:/home/bej# modprobe -r ipv6 FATAL: Module ipv6 is in use. luciole:/home/bej# luciole:/home/bej# lsmod | grep ipv6 ipv6 229440 12 luciole:/home/bej# modinfo ipv6 filename: /lib/modules/2.6.16-1-vserver-686/kernel/net/ipv6/ipv6.ko alias: net-pf-10 license: GPL description: IPv6 protocol stack for Linux author: Cast of dozens depends: vermagic: 2.6.16-1-vserver-686 SMP 686 gcc-4.0 luciole:/home/bej#
Je suppose que c’est parce que ipv6 est encapsulé dans le driver ipv4, non ?

[code]luciole:/home/bej# ifconfig -a sit0
sit0 Lien encap:IPv6-dans-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

luciole:/home/bej#[/code]

quote="jabba"Quelqu’un me pose la question suivante: comment faire pour désactiver proprement ipv6, sans devoir recompiler mon kernel ?(…)[/quote]Un petit

Dans /etc/modutils si tu es en 2.4 suivi d’un update-modules, ou dans /etc/modprobe.d/aliases si tu es en 2.6 devrait suffire.
Bien vérifier qu’il n’y a plus nulle part de ligne

Tu as raison Matt, la dernière fois que j’avais tenté la manoeuvre j’avais fais:

Et non comme tu le proposes:

C’est probablement pour ça que c’a m’avait foutu la merde…

Grmblmblm… , quel naze … :imp:

Merci et bonne journée !