Connect USB device via host to internet (without root)

Ovomaltine

Reputable
Aug 23, 2014
5
0
4,510
Hello!

I want to realise the following idea on this picture:
plan.png


What you can see is a device that is connect to a host via USB. The host (Windows,Mac,Linux etc.) is connected to the internet. No root permissions on the host are availible!

I want to design the device as a gadget, e. g. on a linux base, that gets access to the internet via the host (like reverse tethering).

My questions are now:
1) Is this possible?
2) How can this be achieved? I already though on something like port forwarding of all requests from the device to the internet via the host.
3) Can you give me any hint how to realise this?

Thank you and regards!
 
Solution
If I got you correctly - you need an application (on gateway PC) to provide the USB-connected device with network / internet access. In order to get that:
- you have to design a protocol for TCP-over-USB, and implement in on the both sides (your device, and your gateway PC)
- you have to configure this newly defined configuration with proper routing.

There is no way an user-land application can do that for you on the gateway PC - this has to be a device driver, and at least on Windows this requires adminsitrator (root) access.

Something similar is already done on BeagleBone Black Linux board - when connected to a PC, it appears as both a flash drive, and as a network interface.

Ovomaltine

Reputable
Aug 23, 2014
5
0
4,510


Yes something like that. But this shouldn't be only an external drive. It's merely a small pc system for its own with no peripheral items and just connected via USB to the host.
 

Ovomaltine

Reputable
Aug 23, 2014
5
0
4,510


Don't know if I got you right.
No other peoples in the network should have access to the USB connect device. Only the host with which the device is connect should use it. But the device needs to have access to the network (internet services) via the connected host.
 
Yes. A router will be connected to the internet. Each PC or laptop (or phone or tablet) will be connected by cable or wifi to the router. They can all then connect to then network and share any of the others enabled sharing folders via the router.
 

Ovomaltine

Reputable
Aug 23, 2014
5
0
4,510
No thats not what I really want. Let me state my vision a little bit clearer.

1) The host that is connected to the internet is not under your control. Also the network connection to the internet is not under your control. Thats also the reason why you don't have root but only user permissions on the host (see picture).

2) The main focus is on the USB device, where you have full control. This is merely a small standalone computer (e.g. on Linux base) is connected via USB to the host PC. THe USB device has no peripherals like mouse, monitor or keyboard but can use them of the host for interaction.
Due to all the logic and needed applications are running on the USB device, it needs to use the internet connection of the host PC which is connected via USB.

I'm looking now for a way to use the internet connection of the host PC from the USB device. Do you have a clue how this can be realised?

Thank you
 
If I got you correctly - you need an application (on gateway PC) to provide the USB-connected device with network / internet access. In order to get that:
- you have to design a protocol for TCP-over-USB, and implement in on the both sides (your device, and your gateway PC)
- you have to configure this newly defined configuration with proper routing.

There is no way an user-land application can do that for you on the gateway PC - this has to be a device driver, and at least on Windows this requires adminsitrator (root) access.

Something similar is already done on BeagleBone Black Linux board - when connected to a PC, it appears as both a flash drive, and as a network interface.
 
Solution