LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do I set up a wi-fi bridge on Linux? (http://www.linuxquestions.org/questions/linux-networking-3/how-do-i-set-up-a-wi-fi-bridge-on-linux-939753/)

Da_Nuke 04-14-2012 03:40 AM

How do I set up a wi-fi bridge on Linux?
 
I have a netbook with Arch Linux and Windows XP Home Edition on dual boot, and a desktop computer with Arch as well and Windows 7.

Some time ago I used to connect to the internet on my desktop computer with a wi-fi PCI card, a Realtek RTL8185, associated to my 2Wire ADSL modem (the one issued to Telmex's Prodigy Infinitum subscribers). However, I later found out that this card doesn't works under Linux on my computer because the drivers make my system hang, so I removed it altogether and started using my laptop as a wireless-to-Ethernet bridge via Windows's own network bridging, so far with p. good results.

Now, because Windows XP is a pretty heavy OS compared to Arch Linux, I'd really like to do the same thing under Linux. Problem is, I found out that bridge-utils won't let me do that, all the guides I find are for creating an access point (which is literally the opposite of what I need; edit: to clarify my point, I need to bridge an existing SSID with an Ethernet port), and the only similar post I've seen in this forum is from 10 years ago. This leaves me with no clue as to what should I do.

Edit: NATing my desktop computer is the last choice because I once did this with Vyatta on VirtualBox and it worked fine for 10 minutes, then Telmex's god-awful internet gateway decided to stop routing towards my virtualized NAT, and I really don't want to tinker with my gateway's configuration because I live with my family and I know that doing so will uncork at least a week of "Da_Nuke, fix the internet!", "Da_Nuke, Facebook won't load!", "Da_Nuke, there's no internet!" and things of that nature.

Any ideas?

Ser Olmy 04-14-2012 07:59 PM

If you want Linux to act a bridge between the wireless and the wired LAN, isn't an access point exactly what you need?

Or are you planning to connect the Linux computer to the existing wireless network, and connect another computer to the ethernet port of the Linux PC?

Da_Nuke 04-14-2012 08:05 PM

Quote:

Originally Posted by Ser Olmy (Post 4652898)
If you want Linux to act a bridge between the wireless and the wired LAN, isn't an access point exactly what you need?

Or are you planning to connect the Linux computer to the existing wireless network, and connect another computer to the ethernet port of the Linux PC?

It's the latter. My intention is to connect the desktop computer to an existing SSID over an Ethernet port, not creating a new one. Hence why I need a bridge, not an access point.

Ser Olmy 04-14-2012 08:17 PM

What exactly have you tried so far? Have you successfully authenticated against the wireless network? Are you getting an error message from brctl, and if so, what does it say?

According to the README file, wpa_supplicant needs a special parameter if it is to create a bridge interface. Could that be the issue?

Da_Nuke 04-14-2012 10:09 PM

Quote:

Originally Posted by Ser Olmy (Post 4652911)
What exactly have you tried so far? Have you successfully authenticated against the wireless network? Are you getting an error message from brctl, and if so, what does it say?

According to the README file, wpa_supplicant needs a special parameter if it is to create a bridge interface. Could that be the issue?

Network authentication is just fine, but brctl refuses by design to bridge anything that's not an Ethernet interface.

I was told elsewhere to use hostapd though, I'll see what I can do with it.

jschiwal 04-14-2012 10:16 PM

Do you want to use your Netbook to give the Desktop wifi access? If so, simply use the netbook as the desktop's default gateway and route the traffic to the internet through the netbook.

Da_Nuke 04-14-2012 11:52 PM

Quote:

Originally Posted by jschiwal (Post 4652977)
Do you want to use your Netbook to give the Desktop wifi access? If so, simply use the netbook as the desktop's default gateway and route the traffic to the internet through the netbook.

The problem with this is that this would require a route on the ADSL gateway to the network on the netbook's Ethernet interface, so that packets coming from the internet can reach the desktop computer. Telmex's 2Wire gateway is so ridiculously awful it won't even let me add a routing table entry. It can literally route only to its default gateway and its directly connected LAN segment.


All times are GMT -5. The time now is 12:58 AM.