How can I setup a network bridge between a wirelessly connected Windows 7 laptop and an Ubuntu desktop (no internet)?
Question by Renato /

Alright everyone, I need some help and I’m frustrated. First, a little background info. I have a laptop with Windows 7 that is wirelessly connected to my router, and a desktop that used to have Windows XP AND Ubuntu dual booted.

To get my desktop connected to the internet, I had to jump through a million hoops just to get one little network bridge to work. Somehow, I got the bridge to work in both operating systems, so I had internet when I was in either Windows XP or Ubuntu. Sadly, I have long since forgotten the process, even though I know that it was simple. I’ve also completely removed Windows XP because it was just giving me too many problems, and I got fed up with it.

My setup is simple:

[Router]~~~(WiFi)~~~[Windows 7 Laptop]—(ethernet cable)–[Ubuntu Desktop]

Like I said, I’ve gotten it to work before, but for the love of me I can’t figure it out again.

I’ve already created the bridge on the laptop: selected the wireless connection + the ethernet connection and bridged them, and I think that’s all I have to do on the laptop. What I don’t remember is what I need to do on the desktop, and even though it’s on Ubuntu, I remember that it was similar to, and almost easier than, getting it to work on Windows XP. I think it has to do with assigning IPs or something on the desktop. I can’t remember.

So, please, I’d love some help. I hate having to deal with these problems, especially with my limited free time :(

Browse other questions & answers in the category , ; tagged , , , , ; or ask your own question.

Comments for this Question are closed.

If you are looking for help, please ask a new question.

We will be happy to help you!

Answers (20)
  • Basile4bees

    My son deleted the bridge in his computer while trying to set up xbox live. I don’t care about the xbox going live, how do I get the computer to go back online now? I tried resetting back to an earlier date and that didn’t work.

  • Renato

    Well, I feel silly, but guess what I’m posting from. :D
    Yep, the desktop.
    What did it? Internet Connection Sharing. I didn’t give it a shot because I remember it not working for my desktop when it had Windows XP on it, but it did the trick!
    A huge thanks to everyone that helped, I’m glad people are willing to lend a hand to those who need it. I’m off to enjoy the internet now!

  • Renato

    I’m not sure if this helps, but my router was accidentally turned off yesterday by my roommate, and when he did, my laptop (windows 7) detected an IP address conflict. I’m not sure why this happens, but it doesn’t happen when my laptop is connected to the internet. This only happens when both the Wireless Network and the Ethernet are set to obtain IP addresses automatically and the laptop isn’t connected to the internet.

  • Anonymous

    go to run then type cmd and launch with administrative rights then type the followings

    Netsh add helper Hnetmon.dll
    the context bridge appears then. just use the proper adapter compatibility mode.

    to force connection at cmd type
    netsh bridge show adapter

    then according to your internet connection
    netsh bridge set
    netsh bridge set adapter 1 forcecompatmode=enable
    netsh bridge set adapter 2 forcecompatmode=enable

    ti=o check then cmd-netsh bridge show adapter

    on ubuntu have you tried: sudo dhclient eth0
    either missing the auto eth0 line in your /etc/network/interfaces file, or you are trying to connect manually

    auto eth0
    iface eth0 inet static

  • Renato

    Alrighty then Mike, and I do thank you and everyone else for your patience, I did everything you told me to.
    1. Connected, with WiFi, to the network. Check.
    2. Set Ethernet to obtain IP address automatically. Check. Wireless was already set to this.
    3. Set ethernet to automatic/DHCP. Check.
    4. Selected both connections and created the bridge. Check.

    It did not work. However, when I tried a webpage, it looked as if it were going to load for a while, but then gave me a network problem. If I fiddle with any of the settings on either ubuntu or windows, it immediately displays a network problem. I’m not sure if that helps.

    I do not think that the WiFi adapter is disconnecting, because I can still access the internet from my laptop. I went a head and tried the solution, and it tells me that “bridge adapter 1 forcecompatmode=enable” does not exists as a command. I hope that helps a little more.
    Do I perhaps need to make my wireles NOT obtain an IP address automatically?

    • Mike

      You can try using a static IP, just make sure that
      1) the IP is not within your Routers DHCP Range (IP’s it is giving out)
      2) all values are entered correctly (IP, Subnetmask, Gateway, DNS)

      Usually it doesn’t make a difference. [as I said before] The Network Bridge is designed to do everything automatically, even for exotic networks like USB Male-To-Male connection.

      Is there any way you can directly connect your Ubuntu machine to the Router [via cable] at least temporary? Just to see if it is able to access the Internet that way.

      You could also try using ICS (Internet Connection Sharing) instead of bridging.
      You will have to delete the network bridge to enable ICS ~ that’s pretty much all I know about it. I have given up on that method long time ago.

  • Renato

    It still won’t work by just choosing the two (lan and wireless) and bridging them. And I haven’t gone with the other solutions because I remember that none of it was necessary to get it to work. I’m CERTAIN that none of the “in depth” solutions are unnecessary, because the last time I had the bridge working, it was simply a matter of: Plug in crossover cable, Choose both lan and wireless, bridge them, and then, this is the part I don’t remember, change something- IP addresses, default gateways, SOMETHING on either the laptop, the desktop, or both. I know that this shouldn’t be as complicated as everyone is making it out to be.
    I really, really appreciate all the help though. It’s hard to find answers by simply googling, and other forums haven’t provided me with any sort of feedback, so thank you.

    • Anonymous

      typing ipconfig /all into the windows host what gives you

      having eth0 missing isn’t good. You need eth0 for the bridging to work.

      Right click the network icon,
      click “Edit Connections…”,
      select the “Wired” tab,
      select “Auto eth0″,
      click “Edit…”,
      select “IPv4 Settings” tab,
      and change “Method” to “Shared to other computers”,
      Click “Apply” and you’re done.

      possible that after restarting both desktop and laptop at the same time the internet will not work until you unplug and replug the Ethernet cord.

    • Mike

      Network Bridge 101:

      1. on Windows 7 – connect to your WiFi network
      2. on Windows 7 – set Ethernet to obtain an IP address automatically
      3. on Ubuntu – set Ethernet to automatic/DHCP
      4. on Windows7 – select both connections and create the Ethernet Bridge

      That’s it, no TCP/IP configuration, IP-Address or Gateway, no Cross-Over cable required … nothing …

      If this doesn’t work there are two possible reasons:
      1. your WiFi Adapter is disconnected after creating the Bridge
      2. Ethernet on either of the machines is not configured or working correctly

      If Numero #1 is the case and your WiFi Adapter is disconnected it would have been a vital information. Some adapters are not compatible for bridging without further settings on the Windows machine:

      1. open the Startmenu
      2. type cmd into the search box
      3. right-click on the result cmd.exe and select Run as Administrator
      4. type “netsh bridge show adapter” follow by return/enter
      5. remember the number for the WiFi Adapter
      6. type “netsh bridge adapter X forcecompatmode=enable” replace X with the WiFi number

      Now WiFi should reconnect automatically and everything should be working a minute later.

  • Anonymous

    Windpws 7
    -Click on the Start (windows logo) button.
    -Select “Control Panel”
    -If your control Panel is arranged by Category, click “View network status and tasks” under “Network and Internet”
    -If you are viewing your control panel by icons, click on “Network and Sharing Center”
    -On the left hand side of the Network and Sharing Center screen, click on “Change adapter settings”
    -Hold down CTRL and select “Wireless Network Connection” and “Local Area Connection”
    -Right click on one of the networks and select “Bridge Connections”
    -Windows will now create a network bridge, allowing you to share your wireless connection across your ethernet port.

    You can try with firesatarter
    -Install Firestarter from here or through your distro’s precompiled binary distribution method (such as Ubuntu’s Add/Remove Applications or Synaptic Package Manager, terminal commands, etc).
    -Install DHCP, likely using the same method you installed firestarter. The package you need will vary depending on what distro you use.
    -Once you have Firestarter installed, start it up
    -You will be presented with a wizard to configure Firestarter. Don’t close this wizard, it’s actually a useful one.
    -The first thing to set up is what connection you want to be Firestarter’s main connection. In the Network Device Setup, select your wireless card. In my case, I am using an atheros wireless card, which was identified as an Unknown Device (ath0)
    -Keep the “Start Firewall on dial-out” box unchecked
    -If you don’t have a static IP on your laptop (which most people won’t), make sure the “IP Address is assigned via DHCP” box is checked.
    -Click Forward
    -In the “Internet Connection Sharing Setup” dialog, make sure “Enable Internet Connection Sharing” is checked.
    -In the “Local area network device” drop down menu, select Ethernet device (usually eth0).
    -If you have installed DCHP, you will be able to dynamically assign IP addresses to the machine you attach to your ethernet port (You want this). In other words, Enable DHCP for local network will be checked.
    -If you weren’t able to install DHCP, I don’t believe Firestarter will successfully be able to share your connection, or at least won’t be able to without a lot more configuration
    -Click forward, and go ahead and check the “Start Firewall Now” box and then click save.
    -Your computer is now ready to share its wireless connection.

    Once you have configured your operating system to share your wireless connection, you should be able to simply plug a ethernet cable's-wireless-connection/

    Bridge May Not Work With a Non-Promiscuous Mode Network Adapter

    1) select Bridge adapter and choose an ACTIVE network card
    2)2) take note of the ip setting of the active nic that u have chosen, and let’s say it is

    3) Boot Ubuntu and edit /etc/network/interface to be:

    fs@ubuntu:~$ more /etc/network/interfaces
    # 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

    # The primary network interface
    auto eth0
    #iface eth0 inet dhcp
    iface eth0 inet static

    Here I choose, it can be anything, as long as it does not conflict with the active nic in step 1 or other ip in the network… u must be careful if your network is big with many machines.

    That’s it, reboot Ubuntu and u should be able to ping to it from Windows.

    • Mike

      If the Router is set to assign IP Addresses (is running DHCP) which is almost always the case I strongly advise you against setting up another DHCP Server.
      Before you notice it will act like arogue DHCP server and none of your devices will be able to access the Internet.

      I also don’t see where Firestarter or any Firewall for that matter will be of any help. They usually make things more complicated. Unless you are on a public network the only one active should be the Firewall built into the Router.

  • Renato

    I thank both of you for the answers, but I feel like neither one is just enough. ha14, the last time I got the bridge to work, I didn’t have to go through any of the IP masqurerading steps. And Mike, the bridge is created, but it still won’t work.
    That’s why I have a feeling that the solution is some sort of a mix between the two of your answers, but I just can’t remember it. After I have the bridge created, do I have to change either the laptop’s IP or the desktops? Change default gateways or anything around? I know that I’m missing something, but just not what it is.

    • Mike

      Make sure that the Ethernet Interface within Ubuntu is set to DHCP/Automatic Configuration.

      Although it shouldn’t be required enable Internet Connection Sharing:
      1. open up the Control Panel
      2. click on Network and Internet
      3. open the Network and Sharing Center
      4. click on Manage Network connection
      5. right-click the Wireless Connection and select Properties
      6. click on the “Sharing” tab
      7. enable the option to allow other network users to connect through this computers Internet Connection

    • Tina


      did the additional help provided below help you solve the challenge? Please let us know in case you need more support. And if you managed to set up the network bridge, tell us how you did it. Thank you!

  • Mike

    Since your Windows 7 laptop is connected to the existing network you don’t need any special setup.

    All you have to do is creating a Network Bridge between the WiFi and Ethernet connection. All necessary steps under the following link:

    • Mike

      Answer to your last question: The network bridge will forward any DHCP requests from your Ethernet to the WiFi Router and back.

  • Anonymous


    1. You’ll need to create on both computers static IP configurations for the ethernet ports in a subnet that is separate from the wireless subnet (e.g. on the laptop and on the desktop if wireless is 192.168.0.x or 192.168.1.x). In the desktop configuration, use the laptops ethernet IP address as the gateway.

    2. On the laptop, you’ll net to enable IP masquerading so that traffic from the ethernet port gets forwarded to the wireless port. Instructions for how to do that are here:

New comment

Please login to avoid entering captcha

Log In