Yesterday, I got Internet connection sharing over USB working on my system.
My BeagleBone Black is connected via USB to my Linux laptop (Ubuntu
17.10). The BBB is able to connect to the Internet by my Laptop
laptop forwarding traffic through the WiFi interface.
BBB <-- USB --> Laptop <-- WiFi --> Internet
I got this working 6 months ago but had a really hard time recreating
those steps yesterday. I've noted what I did in this GitHub Gist in
case it helps anyone else (and myself in the future
I agree with using nm-connection-editor on Ubuntu. A confusing point to me was using the setting “Shared to other computers” on the downstream port on the host and setting nothing special on the upstream port. In hindsight, it makes sense, but the instructions didn’t make that clear at all. My thinking when reading the phrase was “this is the upstream connection I want to share to other computers”, but a better interpretation is “this is the downstream port where I want expose my upstream to other computers“.
Thanks for making documentation for this stuff.
I’ve tried step by step of your tutorial but my BBB still cannot connect to the internet.
One step i cannot accomplish is this part :
I have them in this file on my Ubuntu laptop:
/etc/sysctl.d/99-sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
# Uncomment the next line to enable packet forwarding for IPv6
net.ipv6.conf.all.forwarding=1
Hi Drew,
Thank you so much for posting this. Although I have a problem. After following all the steps, I was able to ping 8.8.8.8 , but when I typed "car /etc/resolv.conf " I get a warning - # DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN
And after that “nameserver 127.0.0.1” which is a loopback for the host, I was expecting to see “nameserver 8.8.8.8” instead.
How ever I tried this → echo “nameserver 8.8.8.8” >> /etc/resolv.conf
And this helped to" ping google.com " successfully.
3. But when I restart the beaglebone all the configuration is supposedly lost. And network on beaglebone becomes unreachable again
Am I missing something ?
Any help is appreciated. Also other guys have discussed about using a network manager GUI on ubuntu.Any article or steps if thats easier ?
Hi Drew, after uncommenting those lines and running ‘sysctl -a |fgrep .forwarding |grep ^net |grep ipv4’ those configurations are still disabled. Is there a step I’m missing after uncommenting those lines?
Hi Drew, after uncommenting those lines and running 'sysctl -a |fgrep
.forwarding |grep ^net |grep ipv4' those configurations are still disabled.
Is there a step I'm missing after uncommenting those lines?
that file is automatically (re)generated if you are using dhcp
to autoconfigure the network; if you use a static configuration you're on
your own. as a manual quick fix simply create it (as root):
echo "nameserver 1.0.0.1" > /etc/resolv.conf
at that point you should have working dns, ie.
host one.one.one.one
should spit out something sensible.