/etc/sysctl.conf

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

/etc/sysctl.conf

Post by mimosa »

I just set up a VPN which turned out to have a DNS leak. Their support staff told me to disable IPV6 to fix it, using instructions meant for Ubuntu:
Put these lines at the end of /etc/sysctl.conf:

Code: Select all

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then do

Code: Select all

cat /proc/sys/net/ipv6/conf/all/disable_ipv6
If it reports ‘1′ means you have disabled IPV6. If it reports ‘0‘ then do

Code: Select all

sudo sysctl -p
and check again.
My hunch is this is not the proper way to do this in Slackware. There is no such file, for starters, though creating it was effective in stopping the leak. Can anyone put me straight? I should say my knowledge of networking is lamentably basic ...

EDIT

Another unsatisfactory aspect is that sysctl needs to be run again on reboot to turn IPV6 off. I could put this in a startup script, but again, I feel sure this isn't how it's meant to be done.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: /etc/sysctl.conf

Post by gapan »

Yes, you could put it in /etc/rc.d/rc.local and it would work fine.

Code: Select all

man sysctl
man sysctl.conf
at least say so.

I guess doing something like:

Code: Select all

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
should also work.

Another alternative, since we're talking about modifying kernel module parameters, would be to create a /etc/modprobe.d/ipv6.conf file (the name doesn't really matter) with the following contents:

Code: Select all

options ipv6 disable=1 disable_ipv6=1 autoconf=0
I don't really remember if the different parameters should be space-separated or comma-separated right now, or if they should be in separate "options ipv6" lines (they probably should), but try it out.

There are really lots of ways to do it...
Image
Image
Post Reply