NethServer, ppp0 and Broadband Internet via USB Modem

feature

(Chris Larsen) #1

NethServer Version: your_version
Module: your_module

Dear All,
Here is my use case: NethServer, fresh install. currently connected to a capable router that sits between the Internet and our Intranet. The router’s intended main function is, given NethServer’s powerful firewall capabilities, to act as a superb wireless AP :-).
We are sitting in Southern Africa, so Internet some in via 3g/4g USB modem. I have installed usb_modeswitch, usb_modeswitch-data and wvdial. Configures wvdial.conf. Fired up wvdial and can see that the USB modem gets connected.
Alas, this connction in no way integrated into/used by the firewall, nor the interfaces on NethServer. As this is quite a common use case in Africa, it would be great to see this fixed somehow. Forget DSL, fibreoptic and other LAN-based access modes.
Any ideas how I can proceed?
Thanks a lot, indeed!
Chris


(André Wismer) #2

Hi

One option would be to use a Huawei E5770 Wirless Modem. Put in your SIM card, fire it up. These cost about 130.- (here in Switzerland) and have a WLan Hotspot built in AND a LAN output for hooking up a Server.

The Wireless Hotsport is OK, but to really get moving, use the Nethserver as a transparent proxy and a capable Wireless AP…

USB Modems have become rare in other parts of the world - too many driver problems.

My 2 cents
Andy


(Chris Larsen) #3

Dear André,
Thanks a lot for your quick reply.
Actually, the Huawei you suggested is about 8 times the price of those USB modems, and costs are, alas, a huge issue in this part of the world, not to mention their need for added infrastructure.
However, on a bright side, I would not worry too muchy about run-away specs of driver for USB modems. There is a core bunch of very sturdy USB 3g/4g modems that have been used extensively on OpenWRT & firends, and they do work like a charm on *BSD and *nix. So my concern is not so much to have them recognised (mine worked out of the box with usb_modeswitch and wvdial), but how to get the added ppp0 interface created by wvdial integrated into NethServer management interface. Plus wvdial as a manageable service for sheer beauty.
As you can see, I am new to NethServer, as well as the world of yum-my rpms. Not quite so new to the rest :-).
Thanks a lot for any 2 or 3 cents,
Chris


(André Wismer) #4

Hi Chris

Here in Switzerland no provider will sell you a USB Modem anymore. They won’t even service the ones they sold a while back. I was forced to buy a Huawei Wireless Router to replace my Road-Warrior USB-Modem. It wouldn’t work on my Macbook anymore, even though the driver said everything was ok… And I bought it from the largest provider in the country…

I may live in Switzerland, the country is beautiful. But just because a few Zillionnaires and over-rich Oligarchs jack up the the price of living and the “average” Income of average Joe doesn’t mean we’re among the richest countries in the world!

A lot of swiss living close (2 hours drive makes it worth it!) to the borders do their shopping abroad. Like in Lörrach (Next to Basle) or Singen (Near Schaffhausen) in Germany. Or in France, Austria or Italy. Even though those countries demand twice as much VAT, it’s still MUCH cheaper (Food, meat, clothes, a whole lot of stuff).

Still, I wouldn’t move abroad… :wink:

Opensource is great and the way to go.
It’s a good idea to advocate inclusion of a WVdial or USB modem to NethServer, people could also use that as a fallback Internet (Fail-Over). So it wouldn’t be just for your use-model, but a common need, a fail-over for Internet access where NethServer is Router / Firewall. A lot of cheap routers provide this already, so the demand is there…

My 2 cents
Andy


(Chris Larsen) #5

Dear André,
Thanks again for your reply. I know, I think, all to well, what you are talking about (having worked in Geneva for a while). Yes, GDP is a very poor measure of wealth, to put it mildly.
As I have been working for quite some time on affordable, yet robust infrastructure and such, you might want to search http://www.aliexpress.com for Huawei USB modems and friends,
Have a great afternoon,
Chris


(Filippo Carletti) #6

Do you a list/link?
I spent time working on USB modem support on NethServer, but all hw I tried failed in a way or another.
I still have some usb 3g modems in my office drawer.
Random issues: modeswitich support in centos is bad, modem overheating leads to hang, disconnect/connect to make it work again, slow performance.

BTW, if you are motivated to add umts usb modem support to nethserver I will gladly help.


(Chris Larsen) #7

Dear Filippo,
Good to hear from you.
What I did, naively unaware of the challenges, I guess:
I installed usb_modemswitch, usb_modemswitch-data and vwdial via yum, assuming that these two packages are most likely to be required by most, though not all compatible USB modems.
I then had that old Huawei e172 modem flying around, stuck it in and had a go at wvdial.conf:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT+CGDCONT=1,“IP”,"[YOUR_APN]"
stupid mode = 1
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = *99#
Carrier Check = no
Password = airtel
Username = airtel
FlowControl=Hardware(CRTSCTS)
(unashamedly copied with a minor adaptation of the APN from https://sachinsharm.wordpress.com/2013/08/11/installing-and-configuring-usb-3g-datacard-on-centosrhel-6-3/).
Note: The APN is commonly “internet” (without the quotes).
There is a useful list of Raspberry-compatible modems: https://elinux.org/RPi_VerifiedPeripherals, which may well extend to Linux in general. Though concentrating mainly on 3g modems, there are a couple of 4g modems, too. AliExpress is a useful and very affordable source of those modems, because they are all Huaweis and ZTEs, made in China, nowadays anyway.
I have ordered in a modern 4g Huawei e3372 a few days back and expect to get it into Malawi in, well, two months’ time. Despite the delay, it will be very useful to paly with, next to my old, yet still rock-solid Huawei e172. You will note that those “old” models are still going strong all over those countries that jumped the landline queue, and do everythying mobile.
An important alternative to USB modems, and probably huge;ly more accessible from Europe, too, is the option to tether your SmartPhone via USB (or Wireless) to the NethServer. USB tethering is easy to set up. In Debian speak, it would be something like:
auth usb0
allow-hotplug usb0
iface usb inet dhcp
and you are done.
Both option could be rather interesting to those without a landline, DSL or external router. Given NethServer’s powerful firewall, this setup would not pose any additional security risk, but may rather increase security buy leaving all management in one hand/device.
Though I have zero spare time at present, I can certainly help with the hardware, networking and testing side. I might be less fluent in producing the right user interface in NethServber :-/.
Let me know your thoughts and have a great day,
Chris