LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Ubuntu 9.10 Disable IPv6? (https://www.linuxquestions.org/questions/ubuntu-63/ubuntu-9-10-disable-ipv6-782905/)

linuxnoby 01-18-2010 01:40 AM

Ubuntu 9.10 Disable IPv6?
 
Hi,

Fairly new to linux and first time posting. Any help would be much appreciated! Here is my problem

Short version: how do I check if IPv6 has been disabled correctly?

Long Version:
After I updated to ubuntu 9.10, I could not access the Internet. I disabled IPv6 in Firefox and that solved the problem for firefox. As for the rest of the applications, still no luck.

I'm guessing I need to disable IPv6 systemwide. I found various posts on how to disable IPv6 however I didn't seem to have the files they referred to for the most popular ones... I did find stuff for older versions which I tried but didn't solve the problem.

I would like to know how to check if IPv6 is enabled/disabled on my system. Can't seem to find out how to check.

The 2 methods I attempted to use to disable IPv6 are the following

1- sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

2- sudo gedit /boot/grub/menu.lst
added ipv6.disable=1 (so it looked like this)

title Ubuntu 9.10, kernel 2.6.31-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=bd85aeae-f8e2-4c6c-a759-af537e79da38 ro quiet splash ipv6.disable=1
initrd /boot/initrd.img-2.6.31-16-generic
quiet

want to rule out IPv6 or find out what I'm doing wrong

Thank you

Linux.tar.gz 01-18-2010 03:35 AM

Blacklisting the ipv6 module should be sufficient.
/etc/modprobe.d/blacklist

tredegar 01-18-2010 04:23 AM

A search for disable ipv6 9.10 returns a lot of relevant advice.

The bottom line is that since kernel 2.6.30, ipv6 support has been built into the kernel, and cannot now be disabled the old way (by blacklisting modules).

You need to add ipv6.disable=1 to your kernel boot line

A fresh install of 9.10 defaults to using grub2 so to add this to your kernel boot line, you need to edit the file /etc/default/grub ( as root) and add the line

Code:

GRUB_CMDLINE="ipv6.disable=1"
Then sudo update-grub

At the next boot, ipv6 will be disabled.

[EDIT]
Re-reading your post, it looks like you are still using grub-legacy
you have edited the right file /boot/grub/menu.lst, but the ipv6.disable=1 needs to be on the same line as the one that begins
kernel /boot/vmlinuz-2.6.31... not on the next line.

Maybe it already is, you can avoid these ambiguities by posting code using CODE tags (as above)
[/EDIT]

Welcome to LQ!

linuxnoby 01-18-2010 02:28 PM

Thanks for the welcome tredegar and for replying folks. To answer some of your questions

1- (Linux.tar.gz) Don't have the file /etc/modprobe.d/blacklist (I do have other ones like blacklist.conf etc in that directory)

2- (tredegar) the ipv6.disable=1 is on the same line. Here is what code snippet with tag
Code:

title Ubuntu 9.10, kernel 2.6.31-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=bd85aeae-f8e2-4c6c-a759-af537e79da38 ro quiet splash ipv6.disable=1
initrd /boot/initrd.img-2.6.31-16-generic
quiet

Also, is there a way to check if IPv6 is actually disabled? Is it possible I actually disabled it but that isn't the problem?

I will also see in my LQ preferences if I can be emailed instantly when a reply is posted...so I don't take forever to respond. I figured it would have been automatic when I signed up.

fragos 01-18-2010 03:19 PM

Right click the network icon in the applet bar and select Edit connections. On the wired tab select Auto eth0 and the Edit button becomes available. Click the Edit button and select the IPv6 Settings tab. Make sure Method is Ignore which it should be by default. If you change it to Ignore, don't forget the Apply button.

linuxnoby 01-18-2010 03:32 PM

I checked the settings as described and IPv6 was already set to ignore.

what i did notice though, is that when I selected auto eth0, it said last used Never... (I am using my wired network and when I scroll over the connection icon with the mouse it says auto eth0 is active??)

Does this confirm that IPv6 is disabled?? Would that suggest I have a different problem as to why package manager can't connect to Internet??

fragos 01-18-2010 03:52 PM

Quote:

Originally Posted by linuxnoby (Post 3831286)
I checked the settings as described and IPv6 was already set to ignore.

what i did notice though, is that when I selected auto eth0, it said last used Never... (I am using my wired network and when I scroll over the connection icon with the mouse it says auto eth0 is active??)

Does this confirm that IPv6 is disabled?? Would that suggest I have a different problem as to why package manager can't connect to Internet??

Mine says the same. IPv6 should have nothing to do with package manager troubles connecting to the Internet. Go to System-> Administration-> Software Sources. Select "Download from:" and from the list Other. Now the "Select Best Server" button. The best available Ubuntu repository server will be selected for your location.

linuxnoby 01-18-2010 04:05 PM

Problem solved!! Thanks fragos!

It found some other mirror and it worked!!

linuxnoby 01-18-2010 05:04 PM

actually, problem not solved exactly... by changing the mirror, it downloads but it cannot actually update my system...

Looks like the locations in other sources are not found and it won't update anything if they are not found

tredegar 01-19-2010 04:25 AM

I think your problem lies not with IPV6, but with your /etc/apt/sources.list file, so please post it here ( preferably within CODE tags ).

I notice you "updated" to 9.10. Many people have had problems after doing this, and the general feeling is that a clean install is the best way to go.

linuxnoby 01-19-2010 10:47 AM

Thanks Tredegar! I did indeed have a problem with my sources. I had a key issue that wasn't allowing me to download the source info. I found a command to update the key.

Code:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5A9A06AEF9CB8DB0
Solved my problem!

Thanks folks!!


All times are GMT -5. The time now is 01:05 PM.