On 03/01/14 04:55, Tom H wrote:
> On Thu, Jan 2, 2014 at 1:53 PM, Bonno Bloksma <
b.bl...@tio.nl> wrote:
>>>>
>>>> # rmmod ipv6
>>>>
>>>> libkmod: ERROR ../libkmod/libkmod-module.c:1802
>>>> kmod_module_get_holders: could not open '/sys/module/ipv6/holders': No
>>>> such file or directory Error: Module ipv6 is in use
>>>
>>> So I am certain now that I don't have ipv6 enabled at all, and that message can be ignored.
>>
>> In previous Debian versions ipv6 was done via a module that one could unload or disable to prevent ipv6 being activated.
>> As of Squeeze ipv6 is built in at the kernel level and cannot be disabled that way.
>>
>> So unless you are still running Lenny or build your own kernel there is no ipv6 module.
>> Just do "ip addr" or "ifconfig" and you will probably see ip6 lines, ip6 is default on now. If your uplink does not do ipv6 then there is no ipv6 traffic going over the line and no delay in using ipv4.
>
> When ipv6 is compiled as a module, you can disable it with modprobe or sysctl.
>
> When ipv6 is compiled in-kernel, you can disable it in two ways.
>
> You can disable the ipv6 stack by adding "ipv6.disable=1" to the kernel cmdline.
>
> You can disable the assignment of ipv6 addresses to nics by adding
> "ipv6.disable_ipv6=1" to the kernel cmdline.
>
> The latter's the equivalent of creating "/etc/sysctl.d/disable_ipv6.conf" where
>
> # cat /etc/sysctl.d/disable_ipv6.conf
> net.ipv6.conf.all.disable_ipv6=1
> net.ipv6.conf.default.disable_ipv6=1
> net.ipv6.conf.eth<X>.disable_ipv6=1
>
> (or you can "echo 1 > /proc/sys/net/ipv6/conf/.../disable_ipv6" at boot)
>
>
I don't know that having IPv6 enabled but unused makes the system slower
but those instructions alone still leave IPv6 services running.
To see what uses IPv6 *and* is running:-
# netstat -tunlp |grep p6 |more
tcp6 0 0 :::22 :::*
LISTEN 3492/sshd
tcp6 0 0 :::445 :::*
LISTEN 3340/smbd
tcp6 0 0 :::139 :::*
LISTEN 3340/smbd
udp6 0 0 :::51849 :::*
2454/dhclient
For samba edit /etc/samba/smb.conf and uncomment the lines:-
; interfaces =
127.0.0.0/8 eth0
; bind interfaces only = yes
then:-
# service samba restart
For dhclient edit /etc/dhcp/dhclient.conf and replace:-
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
with:-
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
then:-
# service networking restart
For sshd:-
# echo "AddressFamily=inet" >> /etc/ssh/sshd_config
then:-
# service ssh restart
If you no longer have any IPv6 programs running you should get 0 from
the following:-
# netstat -tunlp |grep p6 |wc -l
The above examples work with Wheezy.
Kind regards
Archive:
http://lists.debian.org/52C9289B...@gmail.com