# Connection sharing (with NetworkManager?)

## nihil39

Hi,

I have a laptop connected to the internet via WiFi through a router. I have to share its connection with a desktop pc connected to the laptop with an ethernet cable, I need this just for the time necessary to install gentoo because it would be inconvenient to bring the desktop close to the router. 

How can I do it? Is it possible to do it with Network Manager which I'm using on the laptop?

Thank you in advance.

----------

## eccerr0r

One thing to check is to make sure you have USE=connection-sharing for net-misc/networkmanager built.

Maybe with this set it will become a bit more self explanatory, found

http://askubuntu.com/questions/691986/network-manager-shared-connection-and-manual-settings-of-the-interface

that might work using nm-applet.  Keep in mind you want to set it the other way around where you want to share the wifi...

[EDIT]

Actually it doesn't seem to want to "share" my cellular connection, so might want to take this with a grain of salt, it might still not work; but having that USE flag is still needed to pull in the necessary deps.

----------

## Buffoon

Download stage3 to your laptop and share the portage from your laptop with your desktop and you won't need to mess with NetworkManager.

----------

## nihil39

 *eccerr0r wrote:*   

> One thing to check is to make sure you have USE=connection-sharing for net-misc/networkmanager built.
> 
> Maybe with this set it will become a bit more self explanatory, found
> 
> http://askubuntu.com/questions/691986/network-manager-shared-connection-and-manual-settings-of-the-interface
> ...

 

Thank you. I have the connection-sharing use flag enabled and dnsmasq installed. Maybe it isn't working for you because of some missing use flag in dnsmasq, I don't know. 

I'll try that or maybe I will use something like those PowerLan connectors.

----------

## nihil39

 *Buffoon wrote:*   

> Download stage3 to your laptop and share the portage from your laptop with your desktop and you won't need to mess with NetworkManager.

 

I have to set the desktop machine to have a working kernel with a working wi-fi connection, it would definitely be easier to make it connect to the internet in the meantime.

----------

## Buffoon

 *nihil39 wrote:*   

>  *Buffoon wrote:*   Download stage3 to your laptop and share the portage from your laptop with your desktop and you won't need to mess with NetworkManager. 
> 
> I have to set the desktop machine to have a working kernel with a working wi-fi connection, it would definitely be easier to make it connect to the internet in the meantime.

 

Your choice, I personally wouldn't waste time with NetworkManager just to perform the install.

----------

## nihil39

 *Buffoon wrote:*   

>  *nihil39 wrote:*    *Buffoon wrote:*   Download stage3 to your laptop and share the portage from your laptop with your desktop and you won't need to mess with NetworkManager. 
> 
> I have to set the desktop machine to have a working kernel with a working wi-fi connection, it would definitely be easier to make it connect to the internet in the meantime. 
> 
> Your choice, I personally wouldn't waste time with NetworkManager just to perform the install.

 

If it works like it is supposed to do I just have to make the connection available to other pc's in Network Manager on the laptop and have a working dhcp client on the desktop: not a lot of time required.

----------

## eccerr0r

I have a feeling that it makes a bad assumption that you never want to share wifi or a broadband cellular connection...where that couldn't be farther from the truth.  You do see the option for sharing Ethernet however?

---

Edit

To be honest I never used this service, maybe it does work as advertised and I'm explaining how to do this wrong.  It seems interfaces you want to have the leaching computers interface should be set to 'share' and NM will find which network interface is the "upstream" so in this case it is ethernet you want to set sharing despite wifi is the WAN.  In my case setting cellular to share would not make any sense....

----------

## nihil39

 *eccerr0r wrote:*   

> I have a feeling that it makes a bad assumption that you never want to share wifi or a broadband cellular connection...where that couldn't be farther from the truth.  You do see the option for sharing Ethernet however?
> 
> ---
> 
> Edit
> ...

 

Thanks, it seems reasonable. Test it if you can: it seems that I will not get the desktop box as soon as I thought.

----------

