I have a Jetson nano board that doesn’t have wifi and I want to share my laptop (Ubuntu 18.04) wifi with it over ethernet.
I did below things but I don’t have internet on jetson:
-
On the laptop I created a new wired connection and manually set the IPv4 to 192.168.2.2, Netmask: 255.255.255.0 and Gateway: 192.168.2.2
-
I used sudo nm-connection-editor
and I changed the IPv4 method to “Shared to other computers”
-
On the jetson I set the wired IPv4 to manual and I gave it the IP of to 192.168.2.22 and the gateway of to 192.168.2.2
I am able to connect the jetson from my laptop (both ping and ssh) but the jetson is not able to access the internet and when I ping google.com I get this:
jetson:~$ ping -v google.com
ping: socket: Permission denied, attempting raw socket...
ping: socket: Permission denied, attempting raw socket...
ping: google.com: Name or service not known
But I also see that permission denied when I successfully ping my laptop from jetson:
jetson:~$ ping -v 192.168.2.2
ping: socket: Permission denied, attempting raw socket...
ping: socket: Permission denied, attempting raw socket...
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=1.04 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=1.54 ms
64 bytes from 192.168.2.2: icmp_seq=3 ttl=64 time=1.12 ms
64 bytes from 192.168.2.2: icmp_seq=4 ttl=64 time=1.48 ms
64 bytes from 192.168.2.2: icmp_seq=5 ttl=64 time=1.60 ms
What I am doing wrong?
I looked into this, and found that this is normal to see “Permission denied” at the start of ping, but then it should work correctly after that. Apparently the verbose debug is showing an attempt to use sockets in a way that is not normally allowed. If you adjust so that this is allowed, then even so only root (sudo) will actually succeed without the “Permission denied”. So long as the “non-verbose” ping works, then you can say ping is working as expected.
The clue which is rather important here is “ping: google.com: Name or service not known
”. This implies DNS is not set up. To illustrate, if you go to your host PC, then you should be able to successfully run command “host nvidia.com”, and find one of its addresses is “216.228.121.209”. Then on host…or on Jetson…you should be able to ping the dotted-decimal address, “ping 216.228.121.209”. If this ping works, then it implies basic network is set up, and that DNS is not being forwarded.
Assuming DNS failure, what is the content (you can attach files since copy and paste may not work well) of the Jetson’s “/etc/resolv.conf” file? If addresses there (using dotted-decimal) are not present, then you might try copying your host PC’s “/etc/resolv.conf” there to see if things suddenly start working.
Note that if you get your address by DHCP, then resolv.conf is normally set up for you. If you use a static address assignment, then you may need to add resolv.conf as well. If your host PC uses DHCP and the ISP changes DNS server, then at some point the Jetson may once again fail DNS until updating resolv.conf.
1 Like