Hello,
I am using Linux Mint and I have found out that I am leaking ipV6 even when using my VPN. So I found a way to disable ipV6 by doing this:
sudo sh -c "echo 'net.ipv6.conf.all.disable_ipv6=1\nnet.ipv6.conf.default.disable_ipv6=1\nnet.ipv6.conf.lo.disable_ipv6=1' >> /etc/sysctl.conf"
then this:
sudo sysctl -p
and it all works like a charm. The thing is - I have to do this every time I boot up. Can someone explain to me (I'm still sort of a noob) how I can write a script to have these commands work automatically at startup, so my ipV6 is automatically disabled every time I start the computer? I would need it all explained in simple terms. I have never written a script before. Thanks for any help.
Need help disable ipV6 at startup
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Need help disable ipV6 at startup
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Need help disable ipV6 at startup
Code: Select all
gksudo xed /etc/default/grub
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"
Code: Select all
sudo update-grub
To undo: repeat the above after you have (...obviously) removed ipv6.disable=1 from the grub entry...
Re: Need help disable ipV6 at startup
Thanks!!!! That was so easy even I could do it. Do you know - will I need to do this every time I update to a new kernel? Or will this stick around until I remove it? The latest one I have is 4.13.0-31
Re: Need help disable ipV6 at startup
Unless you change it back manually yourself, it will stick...briliath wrote:Or will this stick around until I remove it?
Re: Need help disable ipV6 at startup
FANTASTIC. Thank you so much!