View Full Version : [ubuntu] Internet bridging

July 12th, 2009, 05:14 PM
Hello! I'm completely new to Ubuntu.
I'm trying to create a home network. My configuration:
1. My machine with Ubuntu 9.04 (local It is connected to the Internet via LAN+VPN
2. My wife's machine with WinXP (local It is connected to my machine via LAN on second Ethernet adapter.
3. Netbook with WinXP (local, which is connected to my machine via Wi-Fi (direct computer-computer connection).

I've already done:
1. I have connected to the Internet on my machine. Also, I've managed local connection to wife's machine.
2. With Samba server I see her disks and she see mine.

Need help:
1. I've tried to manage bridge connection just like in Windows. I've downloaded bridge-utils and 've created bridge br0 using following commands in console:

sudo brctl addbr br0
sudo brctl addif br0 eth0
sudo brctl addif br0 wlan0
sudo ifconfig eth0 down
sudo ifconfig wlan0 down
sudo ifconfig eth0 up
sudo ifconfig wlan0 up
sudo ifconfig br0 up

After that bridge is working. All three machines are seeing each other shared disks. But after reboot all settings are lost. I've tried to edit /etc/network/interfaces but there is only loopback lo. After adding commands to create bridge br0 listed below i've received error that there in no interface eth0.

auto br0
iface br0 inet static
bridge_ports eth0, wlan0 # Is this string correct?
bridge_stp off

What I must do?

2. After creating bridge there were still no Internet on other machines. How can I route Internet to them?

July 12th, 2009, 05:25 PM
Hmmn complicated setup...

In theory, the latest network manager in 9.04 can do this for you.

Right click on the networking applet and edit connections.

In there select the wired connections tab, select the connection corresponding to the 2nd ethernet port and edit it. In the ipv4 tab just select shared to other computers as the method.

The wireless connection should be similar.

Now the bad news...This is designed to share one machines internet connection to others, but uses ip masquerading, so you might well end up with the machine connected to the second lan not being able to see the ones connected via wifi..Although it might just work, you'll have to just try it.

July 12th, 2009, 06:26 PM
Oops! I've got another problem: My network manager is duplicating my connections (screenshot attached, the "AAA" connections are manuall created, others are created automatically), and after reboot it seems that samba server had somehow altered it's settings - I must again type commands to setup bridge, otherwise my wife's machine ( do not see my disks.

I've tried your advice. It seems that it don't work at all :( After setting suggested option in network manager just nothing happens

July 15th, 2009, 04:23 PM
Any new suggestions?

July 15th, 2009, 05:12 PM
You should probably post this in Networking and Wireless.


In the mean time take a look at this it might help.