LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   How to Connect Wireless Router to USB Modem (https://www.linuxquestions.org/questions/linux-wireless-networking-41/how-to-connect-wireless-router-to-usb-modem-653992/)

Azizcoos 07-06-2008 11:55 PM

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.

MS3FGX 07-07-2008 02:18 AM

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?

Azizcoos 07-07-2008 07:27 AM

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.

Azizcoos 07-17-2008 09:17 PM

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?

mjolnir 09-29-2008 12:03 PM

Azizcoos, did you ever get this to work? I am interested in doing something similar.

Azizcoos 09-30-2008 08:48 AM

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.


All times are GMT -5. The time now is 08:31 PM.