LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can I use two network connections at the same time in Network-Manager in ubuntu (https://www.linuxquestions.org/questions/linux-networking-3/can-i-use-two-network-connections-at-the-same-time-in-network-manager-in-ubuntu-4175512145/)

baronobeefdip 07-24-2014 09:26 AM

Can I use two network connections at the same time in Network-Manager in ubuntu
 
I have two devices, one that I want connected to the internet and another that I don't. I have setup a dhcp server on the one connected to the internet and I have the other device connected to it. I want to be able to connect to the internet on one device and connect to the other through a different subnet. I don't want to bridge the two devices because I don't want the other one to have an internet connection. Whenever I do this setup, my internet connection on the device I have connected to the internet stops working whenever the ethernet connection is active. I want to be able to connect to the device connected to my DHCP server and SSH and VNC into it while maintaining the internet connection on the dhcp server. I don't want to use the networking script, I want to use the network-manager GUI that comes in ubuntu because I have it connected to a PEAP authentication wireless network and I don't think wpa_supplicant supports that. (Plus it's hard to find a hot spot to connect to since there are several in the area that I am at and the device might have a hard time selecting one.

business_kid 07-24-2014 10:30 AM

I can't follow your description - you obviously know what you are talking about, but I missed it. I am taking it to be:

You have box A with a standard internet feed, and another nc. Box B you want to connect to box A, but not the internet.

The way I would do that is to put Box B in /etc/hosts, add a static route to it, and then connect to the internet, leaving the default route as the internet. You can control whether Box B has internet access or not by enabling/disabling ip forwarding with a command.
Code:

echo 1 > proc/sys/net/ipv4/ip_forwarding
echo 0 to disable, 1 to enable. Maybe do it with ip[v6 as well if you are futuristic :-P.

Then I fix whatever didn't work :-)).

stateless 07-24-2014 11:52 AM

I don't know anything about the Network manager... but with the network manager running the wireless interface, can you still bring up and configure the other (presumably ethernet) interface with ifconfig?

business_kid 07-24-2014 01:27 PM

If you have NetworkManager, you probably have system-config-network - a python script to set things up. It barfs a little less often than NetworkManager. You could try with that. I run slackware, which has neither.

My experience is that the config things like we are mentioning are good for basic setups, but not at the races when you get involved with your setup.


All times are GMT -5. The time now is 04:33 PM.