How can I share Internet from USB dongle, but still access the home network?

junis june August 17, 2012
Pinterest Stumbleupon Whatsapp

Hello people,

I tried to deal with this problem myself for quite a while, but I failed, nothing helped, so I am here for your help.

I need to share Internet from WIMAX dongle and still be able to access the home network from the same computer.
Here is the scheme how it is right now.

http://foto.terpe.lt/inkelti/20120813/i90_Untitled.png

The red line is on the different sub-net.

I use Lubuntu 12.04
Basically what I did was:
1. Automatically connected to Eth0
2. Shared my connection trough Eth1
3. Connected Eth1 to router Internet socket
4. Connected router LAN to Eth2

The thing is that my configuration works for a while and then crashes.
Usually all of the computers connected to router works fine and can access
the internet until I connect a cable from router LAN to main computer Eth2 (to access the home network).
Then sometimes, for a while I can access the internet and home network too.
But after some time none of the computers nor the router can access the internet.

In my opinion what I need is to bridge Eth0 and Eth1. And make the main computer access the internet from Eth2. I tried to do that using brctl, but I failed. Maybe I am missing some steps.

[CODE]~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1e:42:02:a8:c8
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:42ff:fe02:a8c8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:136440 errors:0 dropped:0 overruns:0 frame:0
TX packets:120873 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:112833676 (112.8 MB) TX bytes:11318725 (11.3 MB)

eth2 Link encap:Ethernet HWaddr 00:0c:6e:96:ee:db
inet addr:192.168.1.80 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:6eff:fe96:eedb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1341 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:241311 (241.3 KB)
Interrupt:23 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:14:78:7b:fc:38
inet addr:10.42.0.1 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::214:78ff:fe7b:fc38/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:19130 (19.1 KB)
Interrupt:18 Base address:0xd000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:103376 errors:0 dropped:0 overruns:0 frame:0
TX packets:103376 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16875707 (16.8 MB) TX bytes:16875707 (16.8 MB)
[/CODE]

So I would be glad if anyone could help me.

Kindly,

Younio

Ads by Google

  1. Timothy Liem
    August 17, 2012 at 7:53 pm

    it's in Indonesian (yep, I'm Indonesian) but I think it will help
    http://ubuntu-indonesia.com/forums/ubbthreads.php/topics/110316/1

    • dragonmouth
      September 26, 2012 at 10:54 pm

      It will help only if one knows Indonesian.

  2. Bruce Epper
    August 17, 2012 at 1:18 pm

    You are confusing the router. Your computer only needs ONE connection to the router, not two. Also your addressing on eth1 is incorrect. You are using a Class A address with a Class C subnet mask. Because of this, your router is probably misconfiguring its side of that link. If you want to statically configure eth1, that's okay, but your network address and mask need to match classes. Reconfigure eth1 with your config for eth2 and completely drop eth2 and you should be good to go. Once that is done, you should be able to ping another machine on your LAN as well as machines on the internet. Once you do that, verify that your routing tables are correct so your internet traffic gets sent out via eth0 and your LAN traffic is going through eth1.