Disabling IPv6 in Ubuntu Server 18.04
I was putting the following in /etc/sysctl.conf in Ubuntu 16.04 and ipv6 was disabled.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
In Ubuntu 18.04 I have to add the following to grub.
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
Just wanted to have confirmation whether this is the new way in Ubuntu 18.04 to disable IPv6.
server 18.04
add a comment |
I was putting the following in /etc/sysctl.conf in Ubuntu 16.04 and ipv6 was disabled.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
In Ubuntu 18.04 I have to add the following to grub.
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
Just wanted to have confirmation whether this is the new way in Ubuntu 18.04 to disable IPv6.
server 18.04
add a comment |
I was putting the following in /etc/sysctl.conf in Ubuntu 16.04 and ipv6 was disabled.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
In Ubuntu 18.04 I have to add the following to grub.
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
Just wanted to have confirmation whether this is the new way in Ubuntu 18.04 to disable IPv6.
server 18.04
I was putting the following in /etc/sysctl.conf in Ubuntu 16.04 and ipv6 was disabled.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
In Ubuntu 18.04 I have to add the following to grub.
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
Just wanted to have confirmation whether this is the new way in Ubuntu 18.04 to disable IPv6.
server 18.04
server 18.04
edited Jan 28 at 3:19
Pablo Bianchi
2,86521534
2,86521534
asked Jun 12 '18 at 23:27
gagan singhgagan singh
143113
143113
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You only need to add this to /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
I also did it on GRUB_CMDLINE_LINUX_DEFAULT
to be safe. Modifying sysctl
only partially worked, and noticed the bug show-up in netplan, I even tried dhcp6=false to no avail. Netplan seems to have too many bugs for 18.04 STABLE IMO but that's another story...half tempted to remove netplan also.
Just don't forget to update grub before rebooting!
sudo update-grub
1
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
1
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
add a comment |
To clarify Stephan Rauch (for 18.04 only) -
If using grub method to disable ipv6, the /etc/sysctl.conf configuration changes were not needed. I ended up leaving them in, (in case netplan is fixed in future) but all that is needed is the following:
sudo vi /etc/default/grub
Modify the GRUB_CMDLINEs to look like:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Then execute:
sudo update-grub
sudo reboot
Enjoy ipv4.
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this throughsysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?
– sxc731
Dec 25 '18 at 12:03
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1046057%2fdisabling-ipv6-in-ubuntu-server-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You only need to add this to /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
I also did it on GRUB_CMDLINE_LINUX_DEFAULT
to be safe. Modifying sysctl
only partially worked, and noticed the bug show-up in netplan, I even tried dhcp6=false to no avail. Netplan seems to have too many bugs for 18.04 STABLE IMO but that's another story...half tempted to remove netplan also.
Just don't forget to update grub before rebooting!
sudo update-grub
1
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
1
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
add a comment |
You only need to add this to /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
I also did it on GRUB_CMDLINE_LINUX_DEFAULT
to be safe. Modifying sysctl
only partially worked, and noticed the bug show-up in netplan, I even tried dhcp6=false to no avail. Netplan seems to have too many bugs for 18.04 STABLE IMO but that's another story...half tempted to remove netplan also.
Just don't forget to update grub before rebooting!
sudo update-grub
1
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
1
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
add a comment |
You only need to add this to /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
I also did it on GRUB_CMDLINE_LINUX_DEFAULT
to be safe. Modifying sysctl
only partially worked, and noticed the bug show-up in netplan, I even tried dhcp6=false to no avail. Netplan seems to have too many bugs for 18.04 STABLE IMO but that's another story...half tempted to remove netplan also.
Just don't forget to update grub before rebooting!
sudo update-grub
You only need to add this to /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
I also did it on GRUB_CMDLINE_LINUX_DEFAULT
to be safe. Modifying sysctl
only partially worked, and noticed the bug show-up in netplan, I even tried dhcp6=false to no avail. Netplan seems to have too many bugs for 18.04 STABLE IMO but that's another story...half tempted to remove netplan also.
Just don't forget to update grub before rebooting!
sudo update-grub
edited Jan 28 at 3:22
Pablo Bianchi
2,86521534
2,86521534
answered Jun 13 '18 at 3:14
VTChevalierVTChevalier
1563
1563
1
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
1
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
add a comment |
1
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
1
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
1
1
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
Can you clarify how this answers the question? I am confused by your answer.
– Stephen Rauch
Jun 13 '18 at 3:19
1
1
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Please consider reporting the netplan bugs you found on launchpad.net! It will help the developers making it better.
– Sebastian Stark
Jun 13 '18 at 5:11
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
Sebastian Stark - I will try to get to it, it just does not seem to pay attention to kernel settings hence why the grub command was needed, everything else used sysctl.conf except netplan.
– VTChevalier
Jun 14 '18 at 19:21
add a comment |
To clarify Stephan Rauch (for 18.04 only) -
If using grub method to disable ipv6, the /etc/sysctl.conf configuration changes were not needed. I ended up leaving them in, (in case netplan is fixed in future) but all that is needed is the following:
sudo vi /etc/default/grub
Modify the GRUB_CMDLINEs to look like:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Then execute:
sudo update-grub
sudo reboot
Enjoy ipv4.
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this throughsysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?
– sxc731
Dec 25 '18 at 12:03
add a comment |
To clarify Stephan Rauch (for 18.04 only) -
If using grub method to disable ipv6, the /etc/sysctl.conf configuration changes were not needed. I ended up leaving them in, (in case netplan is fixed in future) but all that is needed is the following:
sudo vi /etc/default/grub
Modify the GRUB_CMDLINEs to look like:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Then execute:
sudo update-grub
sudo reboot
Enjoy ipv4.
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this throughsysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?
– sxc731
Dec 25 '18 at 12:03
add a comment |
To clarify Stephan Rauch (for 18.04 only) -
If using grub method to disable ipv6, the /etc/sysctl.conf configuration changes were not needed. I ended up leaving them in, (in case netplan is fixed in future) but all that is needed is the following:
sudo vi /etc/default/grub
Modify the GRUB_CMDLINEs to look like:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Then execute:
sudo update-grub
sudo reboot
Enjoy ipv4.
To clarify Stephan Rauch (for 18.04 only) -
If using grub method to disable ipv6, the /etc/sysctl.conf configuration changes were not needed. I ended up leaving them in, (in case netplan is fixed in future) but all that is needed is the following:
sudo vi /etc/default/grub
Modify the GRUB_CMDLINEs to look like:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Then execute:
sudo update-grub
sudo reboot
Enjoy ipv4.
answered Jun 14 '18 at 19:25
VTChevalierVTChevalier
1563
1563
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this throughsysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?
– sxc731
Dec 25 '18 at 12:03
add a comment |
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this throughsysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?
– sxc731
Dec 25 '18 at 12:03
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this through
sysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?– sxc731
Dec 25 '18 at 12:03
Thanks for the info. Do we think this would be worthy of a netplan bug or is configuring things like this through
sysctl.conf
deprecated anyway? I couldn't find a relevant bug in bugs.launchpad.net/netplan but perhaps I missed it?– sxc731
Dec 25 '18 at 12:03
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1046057%2fdisabling-ipv6-in-ubuntu-server-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown