# Provide internet through Micro USB while doing SSH

**URL:** <https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326>\
**Category:** Jetson Nano\
**Created:** [February 2, 2020, 7:29pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326 "2020-02-02T19:29:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaimonalphons](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jaimonalphons/32/26012_2.png) [@jaimonalphons](https://forums.developer.nvidia.com/u/jaimonalphons)\
**Post date:** [February 2, 2020, 7:29pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/1 "2020-02-02T19:29:47Z")

</div>

I want to connect Jetson Nano to the internet connection through the Micro USB which is being used for SSH!

---

<div class="post-metadata">

**Author:** ![mdegans](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mdegans/32/13104_2.png) [@mdegans](https://forums.developer.nvidia.com/u/mdegans)\
**Post date:** [February 2, 2020, 8:28pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/2 "2020-02-02T20:28:11Z")

</div>

If I’m not mistaken (and I could be, since i rarely connect via micro-usb), it already should work. When you ssh into your Jetson @ 192.168.55.1, can you not then ping [google.com](http://google.com) from the nano?

---

<div class="post-metadata">

**Author:** ![jaimonalphons](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jaimonalphons/32/26012_2.png) [@jaimonalphons](https://forums.developer.nvidia.com/u/jaimonalphons)\
**Post date:** [February 2, 2020, 8:45pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/3 "2020-02-02T20:45:13Z")

</div>

I tried to ping 8.8.8.8 but didn’t work showed 100% packet loss!

---

<div class="post-metadata">

**Author:** ![mdegans](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mdegans/32/13104_2.png) [@mdegans](https://forums.developer.nvidia.com/u/mdegans)\
**Post date:** [February 2, 2020, 9:36pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/4 "2020-02-02T21:36:24Z")

</div>

Did you configure any firewall (eg. ufw, iptables) or change any network settings on your Ubuntu desktop?

Is your network environment special in any way (eg. outgoing restrictions on your router’s firewall)?

Can you ping your Ubuntu Desktop’s primary network interface IP address _from then nano_. You can find this by running “ifconfig” _on your ubuntu desktop_ and looking for _usually_ eth0 (wired) or wlan0 (wireless).

eg: run this on your Desktop

```auto
$ ifconfig
<b>eth0</b>: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet <b>172.17.143.56</b> netmask 255.255.255.240 broadcast 172.17.143.63
...

```

Then ssh into the nano, and try to ping that IP address. That will at least tell us if forwarding is working.

---

<div class="post-metadata">

**Author:** ![jaimonalphons](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jaimonalphons/32/26012_2.png) [@jaimonalphons](https://forums.developer.nvidia.com/u/jaimonalphons)\
**Post date:** [February 3, 2020, 5:58pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/5 "2020-02-03T17:58:35Z")

</div>

Am using a Window 10 laptop as some of my 64bit college applications won’t run on Ubuntu wine!  
I can SSH to nano through micro USB connected but can’t ping 8.8.8.8 from Nano! I have a active internet connection through my mobile hotspot!  
So the thing is mobile hotspot to my windows laptop then to Nano through micro USB! It is possible some way but am not able to understand how am gonna configure it!

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [February 3, 2020, 7:12pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/6 "2020-02-03T19:12:25Z")

</div>

If you have a connection to the Nano from Windows, and that works, then you would have to configure the host to forward to the internet for that connection if you want to make the internet available via Windows. On Windows I do not know how to do that, and I am not even sure if it can be done without extra software. Probably it depends on the edition/version to some extent.

---

<div class="post-metadata">

**Author:** ![mdegans](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mdegans/32/13104_2.png) [@mdegans](https://forums.developer.nvidia.com/u/mdegans)\
**Post date:** [February 3, 2020, 7:16pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/7 "2020-02-03T19:16:41Z")

</div>

> [@](#):
>
> Am using a Window 10 laptop as some of my 64bit college applications won’t run on Ubuntu wine!

You mean you are trying to run Windows apps on Ubuntu using Wine? Or do you mean you’re trying to run Linux apps on Windows using WSL 1 or 2?

Anyway, I’m curious now, are you connecting your nano to a Windows PC to try to access the internet?

> [@](#):
>
> So the thing is mobile hotspot to my windows laptop then to Nano through micro USB! It is possible some way but am not able to understand how am gonna configure it!

That is unsupported. You would probably have to reconfigure the way the USB network is provided on the Nano to get it to work, and that’s not easy. The USB interface is intended to provide an internet connection for the Nano through a Linux machine.

You might consider connecting both your Nano and your Laptop to your phone via it’s wifi hotspot feature. That would likely work.

---

<div class="post-metadata">

**Author:** ![mdegans](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mdegans/32/13104_2.png) [@mdegans](https://forums.developer.nvidia.com/u/mdegans)\
**Post date:** [February 3, 2020, 8:00pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/8 "2020-02-03T20:00:26Z")

</div>

> [@](#):
>
> If you have a connection to the Nano from Windows, and that works, then you would have to configure the host to forward to the internet for that connection if you want to make the internet available via Windows.

There are two ways I know of to share interent connections on Windows and both are precluded by the way the USB network interface is provided on the Nano.

1. Internet connection sharing - turns your Windows PC into a router with a DHCP server for one of the interfaces. This won’t work because there is already a DHCP server on the Nano side, so the Nano would have to be configured as a DHCP client.

2. Bridge - select two network interfaces in the control panel, right click, bridge. This is like making a virtual switch, where both interfaces appear to be plugged into. That won’t work here becuase there are DHCP servers on both sides and the Nano would need to be configured to use a DHCP _client_ on the usb interface instead.

Either solution would work if the Nano was configured differently, but if it were, then the 192.168.55.1 address wouldn’t be predictable, and wouldn’t “just work” when plugged into just about anything. Unfortunately none of this helps the poster, but somebody else who is adventurous and has time to spare might want to explore further.

To anybody reading this thread who is interested, the scripts and config for the usb device mode are found in /opt/nvidia/l4t-usb-device-mode/ and the unit file that launches all the things is nv-l4t-usb-device-mode.service

---

<div class="post-metadata">

**Author:** ![jaimonalphons](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jaimonalphons/32/26012_2.png) [@jaimonalphons](https://forums.developer.nvidia.com/u/jaimonalphons)\
**Post date:** [February 4, 2020, 3:13am UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/9 "2020-02-04T03:13:00Z")

</div>

So is there any change that I can make in the script to forward the internet connection?  
Let’s see… If I can change anything in that USB config file!

---

<div class="post-metadata">

**Author:** ![mdegans](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mdegans/32/13104_2.png) [@mdegans](https://forums.developer.nvidia.com/u/mdegans)\
**Post date:** [February 4, 2020, 3:15am UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/10 "2020-02-04T03:15:26Z")

</div>

I don’t think so. You would have to modify the scripts as well.

---

<div class="post-metadata">

**Author:** ![jaimonalphons](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jaimonalphons/32/26012_2.png) [@jaimonalphons](https://forums.developer.nvidia.com/u/jaimonalphons)\
**Post date:** [February 4, 2020, 3:17am UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/11 "2020-02-04T03:17:11Z")

</div>

> [@](#):
>
> > [@](#):
> >
> > Am using a Window 10 laptop as some of my 64bit college applications won’t run on Ubuntu wine!
> 
> You mean you are trying to run Windows apps on Ubuntu using Wine? Or do you mean you’re trying to run Linux apps on Windows using WSL 1 or 2?
> 
> Anyway, I’m curious now, are you connecting your nano to a Windows PC to try to access the internet?
> 
> > [@](#):
> >
> > So the thing is mobile hotspot to my windows laptop then to Nano through micro USB! It is possible some way but am not able to understand how am gonna configure it!
> 
> That is unsupported. You would probably have to reconfigure the way the USB network is provided on the Nano to get it to work, and that’s not easy. The USB interface is intended to provide an internet connection for the Nano through a Linux machine.
> 
> You might consider connecting both your Nano and your Laptop to your phone via it’s wifi hotspot feature. That would likely work.

Exactly I had ordered a wifi module from Amazon which didn’t come as the seller just vanished and now I need to boost my project as time is nearing.

So I simple want my nano a internet connection through the micro USB when connected to my windows machine!

---

<div class="post-metadata">

**Author:** ![jaimonalphons](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jaimonalphons/32/26012_2.png) [@jaimonalphons](https://forums.developer.nvidia.com/u/jaimonalphons)\
**Post date:** [February 4, 2020, 3:18am UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/12 "2020-02-04T03:18:56Z")

</div>

> [@](#):
>
> I don’t think so. You would have to modify the scripts as well.

So if you know which files should I make changes could you list them!

---

<div class="post-metadata">

**Author:** ![mdegans](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mdegans/32/13104_2.png) [@mdegans](https://forums.developer.nvidia.com/u/mdegans)\
**Post date:** [February 4, 2020, 3:23am UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/13 "2020-02-04T03:23:17Z")

</div>

> [@](#):
>
> > [@](#):
> >
> > I don’t think so. You would have to modify the scripts as well.
> 
> So if you know which files should I make changes could list them!

That config looks like the config for a DHCP daemon, so it probably won’t work no matter how you modify it.

If your project is on a deadline and the Amazon seller ran off, in a pinch you can plug your phone into one of the Nano’s A ports directly and it’ll likely provide a connection with USB tethering.

Then you can plug your laptop into the micro-usb port as you are doing right now and it _might_ just work to get internet the other way around, but no guarantees. I haven’t tested it.

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [February 4, 2020, 8:00pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/14 "2020-02-04T20:00:10Z")

</div>

A bit of explanation on the USB virtual ethernet may help…

When the micro-B USB cable is used on the port the Nano looks like a _device_ to the other side of the cable, and not a _host_ (Nano is not wired to be a host on that port; the other Jetsons can work with either a type-B or a type-A cable and switch modes). Those scripts set up the “device” to appear to be a network device, and the host PC does not know this is a Nano. The host PC thinks this is a USB network/ethernet device.

The scripts also set up a DHCP server on the Nano. If the host PC sees the ethernet device, and then (by default) sends a DHCP query to get an address, then the Nano’s DHCP tells the PC to use address ~~“192.168.55.1”~~ “192.168.55.100”, with a netmask of “255.255.255.0”. The Nano side is scripted to always use ~~“192.168.55.100”~~ “192.168.55.1” on the Nano. So the host PC is more or less not allowed to tell the adapter what to set up as. If your host PC can “ping 192.168.55.1” or “ping 192.168.55.100”, then you know the host PC listened to the Nano’s DHCP response.

Any behavior which forwards traffic via the host PC to the outside world over another connection is up to the host PC. Unless a lot of scripting is rewritten to tell the Jetson to _request_ an address/netmask/route combination, versus its current setting to _assign_ that setup, then “forwarding” or “bridging” within Windows would be the only possibility to make it work. This is trivial in Linux, but as @mdegans mentions, this is not so easy in Windows (and I am the wrong guy to suggest how to do that).

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 14, 2021, 8:47pm UTC](https://forums.developer.nvidia.com/t/provide-internet-through-micro-usb-while-doing-ssh/111326/15 "2021-10-14T20:47:22Z")

</div>


