LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 07-06-2008, 11:55 PM   #1
Azizcoos
Member
 
Registered: Nov 2004
Location: KHIE
Distribution: Debian et al
Posts: 81

Rep: Reputation: 16
How to Connect Wireless Router to USB Modem


Here's the setup:
We have a linksys router running the stock firmware, connected to an ethernet port (eth0) on a computer running Kubuntu. This computer also has a Novatel U720 USB wireless broadband modem connected to it. We just got the internet connection up and running through the modem, and the router is working properly as far as it goes.

Now how do we get the router to work with this internet connection?

We need to get the router to use the computer as the uplink, and we need the computer to forward all nonlocal traffic from eth0 to ppp0.
 
Old 07-07-2008, 02:18 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
What are you trying to do with the router? Have it act as an AP, or do you actually want it to perform NAT?

The problem is that you will need to do NAT on the Kubuntu machine to get Internet access to eth0. If you then connect eth0 to the router's WAN port you will be doing double NAT, and have created a rather complicated network setup.

You could connect eth0 to one of the router's LAN ports, but then none of the router functions of device will work (firewalling, QoS, etc, etc); you would be able to use it as an AP, though.

A more elegant solution would be to put a master mode capable WLAN card into the Kubuntu machine, and create a soft AP. Then you wouldn't need the router at all, you could share out WiFi access all from the same machine. Assuming that is what you are looking to do.

Which brings us back to the original question, what exactly is your goal here?
 
Old 07-07-2008, 07:27 AM   #3
Azizcoos
Member
 
Registered: Nov 2004
Location: KHIE
Distribution: Debian et al
Posts: 81

Original Poster
Rep: Reputation: 16
The goal is to share the internet connection with the local wireless network. The only thing that is strange is that we have a USB modem and a computer on the uplink instead of a DSL modem connected directly to the router.
 
Old 07-17-2008, 09:17 PM   #4
Azizcoos
Member
 
Registered: Nov 2004
Location: KHIE
Distribution: Debian et al
Posts: 81

Original Poster
Rep: Reputation: 16
This Should Be Simple

Let me get a little more specific. As I see it, what I am asking the computer to do is only the same job that would be handled by the DSL modem in a typical setup. However, since our modem is USB, it can not be plugged directly into the router.

We have an old Thinkpad, now running Kubuntu, which can be dedicated to the job if necessary. We have a Linksys WRT54GC wifi router. We have wifi-capable laptops with which we would like to share the internet access, and a wifi-capable printer which is already working on the WLAN. The location is rather remote, and we are limited to equipment on hand.

The proposed setup is to connect the Thinkpad to the "internet" port on the WRT54GC, and to the USB modem. I don't understand why I would have to do "double NAT" in order to have the computer simply forward all traffic through eth0 to the USB and vice-versa. We don't need any advanced functionality, just a basic working setup.

What software would be required to accomplish the should-be-simple routing function?
 
Old 09-29-2008, 12:03 PM   #5
mjolnir
Member
 
Registered: Apr 2003
Posts: 815

Rep: Reputation: 99
Azizcoos, did you ever get this to work? I am interested in doing something similar.
 
Old 09-30-2008, 08:48 AM   #6
Azizcoos
Member
 
Registered: Nov 2004
Location: KHIE
Distribution: Debian et al
Posts: 81

Original Poster
Rep: Reputation: 16
Yes, we did!
We had to hook the uplink computer to one of the regular wired ethernet ports on the router, not the "internet" port, for reasons which I don't understand. Then there were several configuration changes required to the router, specifics of which will vary by router and firmware. Unfortunately, the router we had couldn't be switched to the Openwrt firmware. That would have changed things. We moved the dhcp and dns servers to the uplink computer, set fixed IP addresses for the router and the uplink machine, and set the router to throw everything to the uplink machine. We used dnsmasq for the dns server, but there are also others available that would work. A couple of dnsmasq.conf file tweaks later, we were on line. We set kppp to reconnect on disconnect, because the uplink connection seemed to have a timeout, and it wouldn't reconnect automatically on internet access attempts. As I recall, we hit some routing issues on the uplink box, with fixes like:
Code:
route add default ppp0
ping, traceroute, ifconfig and route are your friends. Start-up of the uplink box can be problematic, because the system detects the wired ethernet interface, but not the USB modem since it isn't active, then tries to use the ethernet for all traffic. The above line fixes that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ADSL USB Modem / Router connecting ( through USB ) but cannot connect to internet DJ Shaji Linux - Networking 1 03-28-2008 03:24 AM
Intel 4965 AGN - can't connect to wireless 802.11b router, can connect to 11g siodine Linux - Wireless Networking 3 12-01-2007 07:36 AM
How i connect Suse 10.2 to a modem router?!? LFGringo SUSE / openSUSE 2 07-12-2007 12:07 PM
How to Connect to ADSL Modem via Router davcefai Linux - Networking 2 01-14-2007 05:13 AM
SUSE 9.2 detect my [B]ADSL USB-Ethernet Modem-Router [/B] as a [B]Dial up modem[/B]. myprecius Linux - Hardware 0 06-27-2005 09:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration