LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internet sharing on linux (https://www.linuxquestions.org/questions/linux-networking-3/internet-sharing-on-linux-786968/)

prushik 02-04-2010 08:41 AM

Internet sharing on linux
 
I have two linux laptops. Currently, I'm using both of them at work, side-by-side.
Now the problem is, I'm connected to a wireless router, but the wireless only works on one of the laptops. So I'm stuck with one laptop that has no access to the internet.
Both machines do, however, have working ethernet nic cards. So, I was wondering if I could use the laptop with the wireless connection to share the internet connection with my other linux machine and access the internet on both of them.
Or as an alternative, just use the internet on the machine without wireless and be able to switch back and forth, that would increase my productivity like 30 fold.
Thank you.

zordrak 02-04-2010 08:45 AM

http://lindesk.com/2007/04/internet-...sing-iptables/

Yakideo 02-04-2010 04:08 PM

Depending on the setup you have it might be as easy as just bridging (using brctl) the wlan and lan interfaces on the laptop with the wifi connection.

prushik 02-04-2010 04:47 PM

I followed the instructions zordrak gave me. They worked on one machine, but not my laptop. I couldn't follow them exactly because of the difference of distribution, but I got the idea. So, I'm still looking for an answer.

I haven't tried setting up a bridge, could you maybe help me out with that?

Yakideo 02-04-2010 04:59 PM

Quote:

Originally Posted by prushik (Post 3853104)
I haven't tried setting up a bridge, could you maybe help me out with that?

dunno if it will work, but try:

Code:

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0

this will create a bridge called br0 and add both eth0 and wlan0 to it. Remember to replace the names of the nic interfaces to match your setup.

MrCode 02-04-2010 05:35 PM

Hi, all. I'm having a similar problem, only with two desktops. ;)

I have a machine running Arch (used to be Puppy, but got tired of fighting with its Internet Connection Wizard) that I would like to get online so that I can start downloading packages (for X and whatnot), and I have it connected via a crossover cable to my Ubuntu machine.

I can start another thread on this issue if need be.


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