Re: Rpi4 disable ipv6
My network using an old windows server doesn't like ipv6 to much so I have disabled ipv6 by creating the file /etc/modprobe.d/ipv6.conf and added the line
Works for a variety of Pis including the Pi4.
MrEngman
Code: Select all
blacklist ipv6
MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Please post ALL technical questions on the forum. Please Do Not send private messages.
Please post ALL technical questions on the forum. Please Do Not send private messages.
Re: Rpi4 disable ipv6
You don't need to use sudo as rc.local runs as root anyway.22/7 wrote: ↑Fri Nov 08, 2019 3:16 pmI addedto /etc/rc.local and it did the trick.Code: Select all
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
Whilst changing the sysctl in rc.local does work, it isn't the right place to do it. Create a file called disable-ipv6.conf in /etc/sysctl.d with the contents "net.ipv6.conf.all.disable_ipv6 = 1"
From /etc/sysctl.d/README.sysctl
Kernel system variables configuration files
Files found under the /etc/sysctl.d directory that end with .conf are
parsed within sysctl(8) at boot time. If you want to set kernel variables
you can either edit /etc/sysctl.conf or make a new file.
The filename isn't important, but don't make it a package name as it may clash
with something the package builder needs later. It must end with .conf though.
My personal preference would be for local system settings to go into
/etc/sysctl.d/local.conf but as long as you follow the rules for the names
of the file, anything will work. See sysctl.conf(8) man page for details
of the format.
Re: Rpi4 disable ipv6
Add the following to the end of the single line of text in the file /boot/cmdline.txt:
This also has the advantage that you can add it from Windows/OSX before you boot the Pi, since the boot partition is readable under those operating systems.
Code: Select all
ipv6.disable=1