1

I must at first say that I'm a total noob regarding networking.

I have two wifi adapters (wlan0 and wlan1).

wlan0 is connected to a wireless router that is not connected to internet.

wlan1 (a long range wifi adapter) is connected to a wireless router that is connected to the internet.

I wanted to share the internet connexion as described in this scheme:

Friend1 ─┐
Friend2 ─┼─ Wifi Router(bridge) ─(wlan0)─ Ubuntu ─(wlan1)─ Wifi Router(Internet)
Friend3 ─┘

How to achieve that?

Thank you.

P.S: I'm running Xubuntu 14.04 with network-manager.

1

This is all about routing and straight forward.

  1. The Router/Bridge has to have the Ubuntu Wlan0 as a default gateway
  2. Your friends machines need the Ubuntu Wlan0 as a default gateway and get it possibly from the router/bridge (as I don't know the hardware capabilities, you might want to install openwrt on that thing if possible).
  3. The Ubuntu machine has to be enabled to route the data from nic to nic and has to have the Internet Wifi Router as the default gateway

As I don't know the hw your are using I can only help you with part number three.

Here is a description of how to unlock ip forwarding.

Here ist a description on setting the routes on Ubuntu machines

I have looked at the router and I'm quite sure that your setting can't be achieved with this hardware.

The bridge you mentioned does only "glue" together the LAN with the WLAN. You can't use the ADSL-Port, pretty sure about that.

I found NO evidence that this device is capable of adding additional routes. So I guess that you can't tell this device that the default route is not going through the adsl port but that it should choose a lan port for that.

This could have worked if you would have another compatible device working with openwrt, as it hast so many more options. But unfortunately your devices is not listed there.

Besides from that

To be honest, although it will be possible to achieve your goal, you might not be satfisfied with the performance once you get there.

  1. There is WAY TOO MUCH WLAN in there, making your routes very unstable and therefore slow

  2. If one of your friends decides to stream or bit-torrent in your network it could make the bandwidth so small for veryone else, that it won't be fun to surf anymore. Maybe even collapsing the network.

If it's locationwise possible try to change from wifi to cable whenever possible.

So a much better set up would be (depending on the location of course).

friends --> WLAN ACCESS POINT --> connected to LAN CABLE --> UBUNTU router --> connected to LAN CABLE --> into LAN/WLAN router with ADSL or similar internet connector.

This would be the best for all people involved. If this is not possible another solution would be

friends --> WLAN ACCESS POINT connect to --> WLAN ACCESS POINT Ubuntu --> onnected to LAN CABLE --> into LAN/WLAN router with ADSL or similar internet connector.
  • Btw, feel free to add more info and ask more questions. Your question really depends much on the hardware you are using. Because a router and a bridge are two different things. A router routes from one ip net to another, while a bridge normally just splits up one ip lan (to reduce broadcast e.g.) – s1mmel Apr 16 '15 at 21:22
  • Thank you for all the explanations. I'm as I said a total noob. I have a Huawei HG530 a Wireless ADSL Modem Router that is not connected to internet. On the WAN settings this router can be turned to bridge mode. He has a DHCP server activated by default. Is there a way to do all the configurations through the nm-applet? I'll add some steps I took to my original post.. – pr.nizar Apr 16 '15 at 22:56
  • 1
    as long as you do your own research and prepare your question no one but a troll will moan about you being a noob. There are a lot of areas in my life where I'm a noob to, no need to excuse yourself. Just make sure you prepare and work on your own first. when people like me see that you at least try and only some info is missing, they will always help. – s1mmel Apr 17 '15 at 9:10
  • Thank you for the clear and complete answer and for the advice. Unfortunately neither dd-wrt nor openwrt have support for my router yet. So I'll have to buy an extra material.. Should I go for a hub or a switch / wifi or ethernet? What do you think? – pr.nizar Apr 17 '15 at 20:56
  • 1
    hmh, so if i get this right, you get your internet from a friend via wlan and want to share it with your friends living in the same apartment, right? – s1mmel Apr 17 '15 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.