wireless - Share Wifi Internet via Ethernet cable

23
2014-04
  • Bill

    I have a notebook connected to the internet via wifi. I'd like to share that internet connection to my pc via an ethernet cable. All descriptions on how to do that show an option box in the network manager which has to be set to "Shared to other computers". However, that box seems to be missing. Am i missing some package?

    My OS: Ubuntu 12.10 Gnome Remix

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    wireless - Problem connecting to wirless internet - computer will not boot with networking unless ethernet cable is connected
  • Jake

    Ubuntu server 12.04, fully updated, with lxde installed...

    I have a problem with my wireless connection and don't know how to solve it. I can't get any networking at all unless I plug the ethernet cable into the computer when I boot up. Being a laptop, I can't use it outside my own home (unless there is an ethernet cable to plug into) because of this. Can someone help me fix this?

    The info I have to offer so far is this:

    When the computer boots up there is some text that rolls by during the boot process (initial screen) telling you what's going on with the boot process.

    If I leave the ethernet cable unplugged and allow it to boot that way I will see a message that says it's waiting for network configuration. A while after that, it will say it's going to wait up to another 60 seconds for network configuration. After what seems like several minutes it will boot into the operating system but there will be no network service running at all (no networking).

    If I plug the ethernet cable in before or very quickly while booting it will boot normally, it will detect my wireless connection here at home (which happens to be a hidden connection), I can then unplug the ethernet cable and use my computer normally.

    It is the same if I boot the computer at a friend's house. If the cable is plugged in it will boot normally and pick up their wireless connection and connect to it, if I don't plug in the cable it will do as described above for that scenario.

    I am using network manager.

    If anyone can help I would sure appreciate this. I am about to move to a new location in two weeks and will have to transfer my internet service there. Until it is set up at that location I would be unable to connect to the internet. I take online courses at a nearby university and classes start on Aug 28th (so I'll have to be able to get on the internet somehow). I would go to mcdonalds or burger king or some coffee shop to use their connection but would not be able to connect there anyway since they would not have an ethernet cable they could let me plug into. Please, if anyone is able, help me to get this solved before my classes start again.

    Output of "less syslog | grep etwork | pastebinit is available here: http://paste.ubuntu.com/1141667/

    Thank you Jake


  • Related Answers
  • Community

    I'm facing the same problem and haven't got to a full solution yet, but I have a workaround:

    • Let computer boot without network configuration, then after you log in, run terminal and run the following command: sudo service network-manager restart

    If I find a permanent solution, I'll post it here. Hope it helps.


    I finally got to a solution:

    • Edit file /etc/network/interfaces
    • Example:

      $ sudo nano /etc/network/interfaces
      
    • Remove all network interfaces, except the loopback interface

    • In the end your file may look like this:

      # This file describes the network interfaces available on your system
      # and how to activate them. For more information, see interfaces(5).
      
      # The loopback network interface
      auto lo
      iface lo inet loopback
      

    It worked for me. I hope it helps.

  • John S Gruber

    I was able to reproduce this situation by adding "auto ie0" to /etc/network/interfaces. Wireless wouldn't come up, and I got the boot messages you mention.

    When this is in place you are telling the system not to come up all the way until this interface is up and configured. After a couple minutes there is a failsafe mechanism to cause this not to stop the system from coming up at all, but networking can't be fully initiated, and the network manager can't be started, until all of the interfaces specified as "auto" are up. The system thinks you need each of those networks in order to boot the system (using NFS, for example). Just specifying the configuration stanza, without even specifying "auto ie0" is enough to cause this situation in older Ubuntu versions due to a bug.

    I assume some people specify this in a attempt to set a static IP address or other special configuration without using the network-manager.

    A work-around I got to work is to issue the command:

    sudo initctl emit --no-wait static-network-up
    

    which simulates the network interfaces coming all the way up.

    Nevertheless, if you instead remove the 'auto ie0' and configure your Ethernet interface with network manager you can eliminate the long wait at boot time, too.