Remote NDIS

How do we install Remote NDIS in dietpi?

When I plug a 4G dongle on the RPi, it wont connect to the internet.
When I was having Raspbian, It was working fine. I guess we need to install this driver manually, is there any tutorial for that?

How did you set it up exactly on Raspbian? Via desktop tool or from command line?

However first check if the dongle is recognized correctly:


Check if it is listed as well as network device already:

ip l
ip a

If not I found a guide that suggest to install a certain package that allows to force the RPi using the dongle as Ethernet device instead of mass storage:

G_AGI usb-modeswitch
usb_modeswitch -v 0x19d2 -p 0x1405 -d

The both numbers/strings need to match the dongle from the lsusb output, in this case the output for the dongle was:

Bus 001 Device 007: ID 19d2:1405 ZTE WCDMA Technologies MSM

To use it, you need to add the interface then to the /etc/network/interfaces file, e.g.:

auto usb0
iface usb0 inet dhcp

if the ip r/a output showed it as usb0 interface.

About the eth0/wlan0 interfaces it depends then how you want to use it. In case as main network device to access internet and you don’t require wlan0 + eth0 I think it is best to disable WLAN and Ethernet via dietpi-config first, then add the usb0 interface as above.
DietPi does not natively support those dongles and otherwise would try to start Ethernet/WLAN interfaces at boot. So disabling both prevents this.

The guide above btw shows how to make the Pi a 4G router, using the Ethernet adapter to allow local network devices connect via DHCP server.


Thanks for taking time to write a solution.
The thing is I do not want to use 4G dongle’s internet for the RPi,

All I want to do is route the traffic of dongle as a proxy. The RPi is also connected with LAN cable for the internet.
If I connect to my home IP: port assigned to the dongle, the outgoing traffic should be from dongle internet.

I can set this up with squid3, but the dongle won’t connect to Internet.

Please do note that these are Hilink dongles, so they do not require any dialup, they just need a Remote NDIS driver installed on the connected system and it will connect to the internet.

I have tried Raspbian Stretch & Lite, Both have the required drivers, but they are too much resource consuming.

Ah okay, this is a bid outside my knowledge, however I was searching a bid and understood now that the RNDIS driver needs to be installed on the connecting remote device, not the RPi.

However most steps should still apply:

  • lsusb must show the dongle.
  • ip l and/or ip a must show the dongle as network interface.
  • And to assign an IP where remote devices can connect to, the dongles network interface must be added to /etc/network/interfaces and started via e.g.: ifup usb0