Jump to content


Photo
- - - - -

Network Bridge on Linux


  • Please log in to reply
7 replies to this topic

#1 isolationx

isolationx

    Mack Daddy 31337

  • Members
  • 232 posts
  • Country:
  • Gender:Male
  • Location:760

Posted 09 January 2009 - 08:35 PM

Almost every machine in my house has been converted to some form of Linux. The latest being my wife's computer machine, which I am very pleased to announce. At the moment I have one machine with two wireless cards (bridged) on Windows XP, and I was thinking about switching that machine to Linux as well. This machine is only for pushing a wireless connection to her machine because it's network adapter is a bit shitty. That's basically what I'm using it for. After installing Ubuntu on her machine, I saw an internet connection sharing deal and was wondering if you can "Bridge" two wireless cards on linux (supposing I had the drivers and such).

I was going to fiddle with this tomorrow, and that would leave one machine with Windows. And once I can get around Netflix's "We need Windows to run!!" deal, it will be long gone.

On a side note I'll bet Internet Explorer as well as Windows Media player works on WINE.

#2 phr34kc0der

phr34kc0der

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 469 posts
  • Country:
  • Gender:Male

Posted 09 January 2009 - 08:57 PM

Not really sure what your trying to do by iptables would probally work. There are even some nice frontends like Webmin and firestarter (i've used webmin for a ubuntu firewall i made but never used firestarter). Using iptables will allow you to set up rules to specify that packets coming into interface1 should be sent out to interface2 and visa versa.

Whats the point of the bridge? Im a bit confused what your using it for (and im interested)

#3 isolationx

isolationx

    Mack Daddy 31337

  • Members
  • 232 posts
  • Country:
  • Gender:Male
  • Location:760

Posted 09 January 2009 - 09:30 PM

Not really sure what your trying to do by iptables would probally work. There are even some nice frontends like Webmin and firestarter (i've used webmin for a ubuntu firewall i made but never used firestarter). Using iptables will allow you to set up rules to specify that packets coming into interface1 should be sent out to interface2 and visa versa.

Whats the point of the bridge? Im a bit confused what your using it for (and im interested)


At one end of the house I have a nice little wifi router, but on the opposite side of the house I have her computer machine which can't receive the signal. So in the middle of the house I have the windows box with two wifi adapters. I bridged them, and one pushes the wifi connection out to her computer, while the other grabs the connection from the router. So it's a bit like an ad-hoc, but not I suppose. I should have worded it better. I'm just trying to see if I can do that with a linux machine.

And firestarter is pretty nifty. I set it up a couple days ago on her new ubuntu machine. I thought I was having problems with it, because it kept telling me the Binary Revolution was attacking her computer. Then I realized that our computers had been using the same IP address. I fixed it, and found to my dismay that BR wasn't trying to download all her pron.

#4 mirrorshades

mirrorshades

    aviatorglasses

  • Agents of the Revolution
  • 951 posts
  • Gender:Male

Posted 10 January 2009 - 12:13 AM

So in the middle of the house I have the windows box with two wifi adapters. I bridged them, and one pushes the wifi connection out to her computer, while the other grabs the connection from the router. So it's a bit like an ad-hoc, but not I suppose. I should have worded it better. I'm just trying to see if I can do that with a linux machine.

Sure, why not?

In fact, save yourself some work. Go download pfSense (actually a BSD-based distribution, not linux) and it will make it a lot easier for you. That distribution is designed to be a firewall/router, so you can configure it all through the web GUI (instead of tinkering with drivers and network config and such by hand). Assuming it can recognize the two WiFi cards (which gets to be a bit of a problem once you step outside of the Microsoft world), it should be no problem to bridge them.

Alternately, you could look into getting a better antenna for your AP, or perhaps relocating it. Lots of options.

#5 isolationx

isolationx

    Mack Daddy 31337

  • Members
  • 232 posts
  • Country:
  • Gender:Male
  • Location:760

Posted 10 January 2009 - 12:23 AM

Sure, why not?

In fact, save yourself some work. Go download pfSense (actually a BSD-based distribution, not linux) and it will make it a lot easier for you. That distribution is designed to be a firewall/router, so you can configure it all through the web GUI (instead of tinkering with drivers and network config and such by hand). Assuming it can recognize the two WiFi cards (which gets to be a bit of a problem once you step outside of the Microsoft world), it should be no problem to bridge them.

Alternately, you could look into getting a better antenna for your AP, or perhaps relocating it. Lots of options.


I'll check this out, thank you. It's such a small download. I know that the last time I played around with linux on that particular machine, I needed Madwifi for one of the wifi cards, but I haven't checked up on the usb wifi card yet. I'll give it a go and see what happens. Thanks again.

#6 phr34kc0der

phr34kc0der

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 469 posts
  • Country:
  • Gender:Male

Posted 10 January 2009 - 06:42 PM

cant you just get a wifi repeater? It would save on the trouble of setting up a bridge with linux (assuming your wifi cards are supported you could try something like ipcop or smoothwall, but then you would have to work out how to turn off the firewall settings) and save on the cost of having an extra machine running.

#7 oblivion

oblivion

    I have the Phreak Phactor

  • Members
  • 77 posts

Posted 14 January 2009 - 03:08 AM

you can use firestarter, to create easily bridge connections

#8 mungewell

mungewell

    SUPR3M3 31337 Mack Daddy P1MP

  • Agents of the Revolution
  • 376 posts
  • Location:Planet Earth

Posted 14 January 2009 - 11:01 AM

There are a specific set of commands for bridging ethernet/wireless interfaces. Install the 'bridge-utils' package.

There is a 'howto' here:
http://www.linuxfoun...g/en/Net:Bridge

Cheers,
Mungewell.




BinRev is hosted by the great people at Lunarpages!