Need to configure Linux machine to route and share internet connection

Asked by george_rutkay

My D-link router died today and I can't afford a replacement right now. So I've connected my computer directly to the cable modem. But this cuts out anyone else in the house using the computer upstairs which uses a wireless connection.

I have on hand a Siemens SpeedStream 6520 Wireless ADSL gateway. It CAN see the wireless computer upstairs. But there's a problem. I've tried to get it to talk with my cable modem but it's programmed by the local phone company to work only with their DSL protocols, not with the Cable company's modem.

I tried for 3 hours to get it to see the cable modem as something more than a glorified rock and it just would not do it. The error log in the Siemens device states it does not have the correct software for the connection being attempted.

The cable modem does work, that is how I'm typing this question now.

SO......here's what I need to do.

I have plugged the Siemens device into an open USB port on my Dell.

lsusb reveals:
geo@Dell1:~$ lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 004: ID 067c:e240 Efficient Networks, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 04f3:0210 Elan Microelectronics Corp.
Bus 001 Device 001: ID 0000:0000

So you can see that it's there in the list at Bus 002 Device 004.

Now what I need to do is to route part of my incoming Internet via Ethernet and route it out the USB port to this Siemens device and hope that it will come out of the antenna and radiate up to the other computer in the house.

In other words I need to treat this Siemens device as an add-on USB wireless adapter, if that's possible.

Has anyone ever tried this? Anyone successful?

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
george_rutkay
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Yuo can try to reset your router...

Here there is something to reset and update firmware http://forums.whirlpool.net.au/forum-replies-archive.cfm/511797.html

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2
Revision history for this message
george_rutkay (yaktur) said :
#3

There is a reset button on the bottom of it. I had to press and hold it for several seconds with power on to remove the set up the previous person had in it (I couldn't get into it).

After resetting it, it appeared to my computer at 192.168.2.1 ready for set up.

I ran the internal "Wizard" and set up the wireless connection, input all of the info for the cable modem, for my computer. But there's something about the internal software from Bell Canada which isn't compatible with what comes out of the cable modem (Rogers cable, a competitor of Bell for internet services here).

The log in the Siemens device indicates there there is something to this effect.

Revision history for this message
george_rutkay (yaktur) said :
#4

None of the firmware on that site works with this Siemens device, I tried them whether in ZIP or unarchived format. The software in this thing doesn't recognize them as being valid.

Isn't there any way I can route incoming internet to the Dell out the USB port, up the cable to the Siemens device's USB port and have it broadcast somehow?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

The only way i'm able to suggest you is http://www.ubuntugeek.com/sharing-internet-connection-in-ubuntu.html

Hope this helps

Revision history for this message
george_rutkay (yaktur) said :
#6

I looked at http://www.ubuntugeek.com/sharing-internet-connection-in-ubuntu.html and it's very informative.

But it deals with a second Ethernet port added to a computer. With my issue, it's through a USB port into another device. I'm not seeing any path to route anything to a emulated Ethernet port via USB into another black-box device.

I also tried Firestarter. But Firestarter doesn't recognize anything other than the single Ethernet port I already have in use to the cable modem.

Am I out of luck on this one? :(

Revision history for this message
Ethan Baldridge (ethan-superiordocumentservices) said :
#7

The "sharing internet connection" thing is for any network connection, not just Ethernet ports. It sounds like the issue is that your device isn't currently being recognized as a network adapter.

A quick google shows that your device *would be* supported through wlan-ng, if anywhere, but I don't think those drivers have been kept up to date (they're not part of the mainline kernel).

It looks like NDISwrapper is the only way to get that USB dongle working for you. This document should help:
https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper

Revision history for this message
george_rutkay (yaktur) said :
#8

I've since changed the thing since I couldn't get past it's internal programming, seeking a DSL connection.

I'm using a Belkin PCI Wireless G desktop card. But I'm having problems.

I'm running the WinXP driver under Ndiswrapper but things just aren't working properly. The wireless link isn't working though apparently the card is configured correctly.

Can anyone help me?

The results of "lspci":

00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 01)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
01:07.0 Ethernet controller: Belkin Unknown device 700f (rev 20)
01:0c.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)

The results of "ifconfig":

eth0 Link encap:Ethernet HWaddr 00:08:74:2f:79:7f
          inet addr:99.239.148.213 Bcast:255.255.255.255 Mask:255.255.254.0
          inet6 addr: fe80::208:74ff:fe2f:797f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:29530 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:42057483 (40.1 MB) TX bytes:1554279 (1.4 MB)
          Base address:0xe8c0 Memory:ff8c0000-ff8e0000

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:4018 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4018 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:346573 (338.4 KB) TX bytes:346573 (338.4 KB)

wlan0 Link encap:Ethernet HWaddr 00:17:3f:d3:ed:0c
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:16 Memory:ff8ffc00-ff8ffc25

Revision history for this message
Ethan Baldridge (ethan-superiordocumentservices) said :
#9

wlan0 is the wireless connection, but it doesn't have an IP address associated with it. Is your wireless router on? You should be able to left-click on the network manager applet in the system tray and get a list of wireless networks that you can log into.

Revision history for this message
Ethan Baldridge (ethan-superiordocumentservices) said :
#10

Also, sorry - I keep accidentally clicking "Answered" instead of "Information Request"

Revision history for this message
george_rutkay (yaktur) said :
#11

No, I can't.....I don't think the driver is correct.

Also now, my whole machine doesn't connect when I boot from the hard drive. I'm booting from the 8.04 Live CD now to type this. I cannot get Ethernet or anything to connect.

I think my Network manager is missing now but I can't reinstall it from the bootable CD and Synaptic stubbornly insists on looking for an internet connection when one isn't available, it doesn't look to the CD!

I'm really starting to get ticked off now, this is totally absurd that the Ethernet connection software gets buggered up while trying to set up a wireless adapter, and I can't even repair the missing software from the bootable CD or anything!

Revision history for this message
george_rutkay (yaktur) said :
#12

The network manager was missing, that's why my machine totally buggered itself. And stupidly, Synaptic would not refer to the CD but kept looking to a non-functioning network!

I solved it by:

Booting from the CD and getting the network running like that.
Running Synaptic and selecting Network manager, but just download the packages so I can reboot and install them manually.

The hardest part was figuring out where Synaptic caches it's downloads since it's not written anywhere!

Synaptic caches it's downloads in /var/cache/apt

But now my machine doesn't retain all of it's network settings. It seems particularly the gateway and nameserver settings under DHCP are not discovered/maintained if the machine is turned off/on.

Where is this stored in the computer? How do i get it to keep these settings on the hard drive?

Revision history for this message
george_rutkay (yaktur) said :
#13

The machine was misbehaving again, losing network connectivity. It was faster for me to just update my backup of the user files, wipe the drive (reformat) and reinstall the system.

You have no idea how frustrating this is becoming! It's worked well for a long time but when I want to add one bit of wireless connection sharing, it all falls apart?

I still need to have a way to effectively simulate sharing my internet connection from the incoming Ethernet port over the attached USB wireless thing. How please?

Revision history for this message
Ethan Baldridge (ethan-superiordocumentservices) said :
#14

Have you got both the wireless and the wired connections working now? If so...

wlan0 will be getting it's IP address via DHCP (I assume), and eth0 already is (from Comcast), so no need to mess with that.

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo echo 1 > /proc/sys/net/ipv4/ip_forward

Running both those lines in a terminal should take care of sharing your connection. (The first line says "set up a firewall entry to make any connections going out of eth0 look as though they're from this computer, even if they're not; the second line says "if I get a packet destined for another network, go ahead and forward it to the right place")

Adding the line “net.ipv4.ip_forward=1″ to /etc/sysctl.conf will make the ip_forward setting persist on reboot.
You also will want to write "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" as the last line in /etc/rc.local, to make the firewall setup persist over reboot (you don't need the "sudo" in that line because as a startup script, rc.local is already run with root privileges).

Revision history for this message
george_rutkay (yaktur) said :
#15

The problem has been, and remains, the driver I have to use for the wireless network do-hickey. It just isn't man enough for the job.

I got my tax refund today so I broke down and bought a new router.

The lack of a driver that works correctly under Linux for these kind of devices will remain an Albatross around user's necks until it is solved though. Sad.

Revision history for this message
Ethan Baldridge (ethan-superiordocumentservices) said :
#16

I thought you installed Network Manager - do you have the applet available on your panel now? You should be able to click on it and see a list of wireless networks.

I can tell from your earlier post that the driver is just fine - your Belkin Wireless card is up and running. The issue was that you weren't connected to a wireless network.

Revision history for this message
george_rutkay (yaktur) said :
#17

I was trying to configure the Belkin to BE the wireless network, to BE the router, to serve the incoming internet connection over wireless to the upstairs computer.

No such luck. The driver didn't run the Belkin card at all under Ndiswrapper and with my little USB network adapter I only was able to get limited operation to search for other up-and-running networks, which is completely not the point of my efforts.

Revision history for this message
Ethan Baldridge (ethan-superiordocumentservices) said :
#18

Ahhhh, now I think I understand - you want to turn your computer into a wireless access point! That's a separate issue from sharing your internet connection.

(googling, googling...) Looks like if that's the case, you need to run your wireless card in "Master" mode. Not all hardware supports this, so hopefully one of your two things does.

sudo iwconfig wlan0 mode master
sudo iwconfig wlan0 essid my_network
sudo ifconfig wlan0 192.168.0.1
...
Actually, better yet, set it to run in ad-hoc mode instead of managed mode. That'll work for a small number of clients (which it sounds like you have) and it'll work with just about any hardware. replace the "mode master" above with "mode ad-hoc".

Then follow the steps I gave above for the internet connection sharing bit and you should be good to go (as long as the clients are set appropriately - IP addresses on the same local range, like 192.168.0.2, gateway set to 192.168.0.1, DHCP server set to whatever Comcast gave you).

Revision history for this message
george_rutkay (yaktur) said :
#19

Thanks for your efforts!