Setup wireless network brigde interface (wlan0 with eth0) on linux

0

I'm user of a public wired network. My machine gets ip (always the same) from it. Now I want to connect to this network my phone (which is registered device in network and can get its own ip address). So I need my computer to be the bridge from eth0 to wlan0 more precisely.

I use archlinux OS.

                        [eth0] My computer [wlan0]
                  <---(wired)---'        `-,-'-(wirless)-,-'-> 
Public network (with Internet)                      My phone

How to make a bridge that allow my phone to connect 'directly'(bridged) to Public network?

PS. I'm not allowed to use NAT, and I'm not interested in buying any access points.

damienix

Posted 2011-03-25T15:32:45.100

Reputation: 103

Answers

0

Looks like this is what you are trying to do here is the guide your wifi card needs to be capable of going into master mode if it cannot you will not be able to do what you are trying to. In that case you would need to get one that can but you should just get a router instead.

I would recommend getting a router either way as it creates a secure barrier between you and the public network you are on.

Riguez

Posted 2011-03-25T15:32:45.100

Reputation: 3 594

It not very public ;) it's only academic network. I'll try the tutorial. – damienix – 2011-03-25T15:55:55.343

When you don't have control over the other computers on the network it is public enough to be insecure :\ – Riguez – 2011-03-25T15:58:04.903

Unfortunately my wifi card doesn't support neither master nor repeater mode. – damienix – 2011-03-25T17:16:54.290

In that case I would try to setup your wifi card in ad-hoc with internet connection sharing to the ethernet port. Not sure how to do this but some googling and the archlinux wiki which is really nice should help you. – Riguez – 2011-03-25T19:40:46.100

Is it possible without NAT? – damienix – 2011-03-25T22:04:24.293

If it can be setup this way it should work one interface has the connection and the other is sharing with it. – Riguez – 2011-03-25T22:12:27.373

0

I suggest you to look about iptables. It will allow you to program your arch for packet routing.

Use google, you won't have trouble to find this. Just do a forward of all packets from one net to the other.

BTW your computer should be able to set up an adhoc network to handle the wireless connections.

M'vy

Posted 2011-03-25T15:32:45.100

Reputation: 3 540

That should work but he wants the phone directly bridged to the public network. – Riguez – 2011-03-25T16:26:22.773

Yes indeed, I was wondering if iptables could just forward all packets from wlan0 in monitoring mode. Basically the idea is to turn the PC into a AP repeater. – M'vy – 2011-03-25T16:33:46.033

My wifi card doesn't support repeater mode. To forward packets with iptables I probably would have to use NAT which doesn't interest me. – damienix – 2011-03-25T17:22:34.847