BBB: sharing Internet connection from Linux laptop with USB

132 views
Skip to first unread message

Drew Fustini

unread,
Oct 8, 2018, 3:34:09 PM10/8/18
to Beagle Board
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 :)

https://gist.github.com/pdp7/d2711b5ff1fbb000240bd8337b859412

Also, if you are having issues yourself, then please reply here and I
can try to make suggestions.

Thanks,
Drew
internet-sharing-usb-linux_md.txt

Robert Nelson

unread,
Oct 8, 2018, 3:40:50 PM10/8/18
to Beagle Board, dp7...@gmail.com
@Drew, you should check out the fancy "helpers" under:

/opt/scripts/network/

(they are relatively new (about a month))

Regards,

--
Robert Nelson
https://rcn-ee.com/

Drew Fustini

unread,
Oct 8, 2018, 3:55:16 PM10/8/18
to Beagle Board, dp7...@gmail.com
Thanks! I'll check it out!

debian@beaglebone:/opt/scripts$ git pull
<snip>
11 files changed, 180 insertions(+), 61 deletions(-)
create mode 100644 network/doc-debian-setup.md
create mode 100755 network/usb_linux_usb0_ics.sh
create mode 100755 network/usb_linux_usb1_ics.sh
create mode 100755 network/usb_mac_ics.sh
create mode 100755 network/usb_windows_ics.sh
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYgULpafYJH%2B4MevyCKwmYm5cc4DSiiZjXHxsJ5qDCO1kg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Jason Kridner

unread,
Oct 8, 2018, 10:45:34 PM10/8/18
to beagl...@googlegroups.com, dp7...@gmail.com


> On Oct 8, 2018, at 3:54 PM, Drew Fustini <pdp7...@gmail.com> wrote:
>
> Thanks! I'll check it out!
>
> debian@beaglebone:/opt/scripts$ git pull
> <snip>
> 11 files changed, 180 insertions(+), 61 deletions(-)
> create mode 100644 network/doc-debian-setup.md
> create mode 100755 network/usb_linux_usb0_ics.sh
> create mode 100755 network/usb_linux_usb1_ics.sh
> create mode 100755 network/usb_mac_ics.sh
> create mode 100755 network/usb_windows_ics.sh

Shall we put any scripts meant for hosts into getting-started-guide?
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAEf4M_DBGJvcvC4YLzAauO2N6EN8e0B9W8qUXZpSNYbdqaUDYg%40mail.gmail.com.

David Lechner

unread,
Oct 9, 2018, 5:45:26 PM10/9/18
to beagl...@googlegroups.com, Drew Fustini
Why go through all of that when you can just enable Internet connection sharing via NetworkManager?

Jason Kridner

unread,
Oct 9, 2018, 8:02:48 PM10/9/18
to beagl...@googlegroups.com, Drew Fustini
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“.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

aston

unread,
Jun 12, 2019, 5:07:20 AM6/12/19
to beagl...@googlegroups.com
Hi Drew,

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 :

root@sp3:~# sysctl -a |fgrep .forwarding |grep ^net |grep ipv4
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.enx1cba8c9bbeb5.forwarding = 1
net.ipv4.conf.enx1cba8c9bbeb8.forwarding = 1
net.ipv4.conf.lo.forwarding = 1
net.ipv4.conf.wlxe0b94db737c9.forwarding = 1


Where can i find the file to set all those parameters value to "1" ?
I am using Ubuntu 16.04, Mobile WiFi, and beaglebone black Rev C.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Rgds,

Aston

"If you are working on something exciting that you really care about, you don't have to be pushed. The vision pulls you."
(Steve Jobs)

   

Drew Fustini

unread,
Jun 12, 2019, 5:15:15 PM6/12/19
to Beagle Board
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

-drew
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CA%2B9kmzy6b%3DJeevALeA%3Dt1Sw%3D5uzB2L%2B-L7yDvxtiz_yHZY5_6w%40mail.gmail.com.

rajkul...@gmail.com

unread,
May 3, 2020, 12:08:10 AM5/3/20
to BeagleBoard
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

2. 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 ?

Thank you 
Raj

KenUnix

unread,
May 3, 2020, 11:29:00 AM5/3/20
to BeagleBoard

Jason,

I sent you a message a few weeks ago was wondering if you received my e-mail regarding web pages?

Ken

tonyponye...@gmail.com

unread,
Sep 23, 2020, 1:23:07 PM9/23/20
to BeagleBoard
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?
>> To unsubscribe from this group and stop receiving emails from it, send an email to beagl...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAEf4M_A0Wjx2E8Lf%2BUQS4f%3DP6a0yjZ104e5v6XeYv_J0OOOJ5A%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Rgds,
>
> Aston
> Blog | Twitter | LinkedIn
>
> "If you are working on something exciting that you really care about, you don't have to be pushed. The vision pulls you."
> (Steve Jobs)
>
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagl...@googlegroups.com.

Robert Heller

unread,
Sep 23, 2020, 1:45:42 PM9/23/20
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
At Wed, 23 Sep 2020 10:18:44 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> 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?

Did you reboot?

>
>
> On Wednesday, June 12, 2019 at 4:15:15 PM UTC-5, Drew Fustini wrote:
> >
> > 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
> >
> > -drew
> >
> > On Wed, Jun 12, 2019 at 4:07 AM aston <ast...@gmail.com <javascript:>>
> > an email to beagl...@googlegroups.com <javascript:>.
> > >> To view this discussion on the web visit
> > https://groups.google.com/d/msgid/beagleboard/CAEf4M_A0Wjx2E8Lf%2BUQS4f%3DP6a0yjZ104e5v6XeYv_J0OOOJ5A%40mail.gmail.com.
> >
> > >> For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> > >
> > > --
> > > Rgds,
> > >
> > > Aston
> > > Blog | Twitter | LinkedIn
> > >
> > > "If you are working on something exciting that you really care about,
> > you don't have to be pushed. The vision pulls you."
> > > (Steve Jobs)
> > >
> > >
> > >
> > > --
> > > For more options, visit http://beagleboard.org/discuss
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups "BeagleBoard" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to beagl...@googlegroups.com <javascript:>.
--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Message has been deleted

Alexander Zangerl

unread,
Sep 23, 2020, 5:17:40 PM9/23/20
to beagl...@googlegroups.com
On Wed, 23 Sep 2020 11:44:20 -0700, tonyponye...@gmail.com writes:
>I was able to execute 'ping 8.8.8.8' successfully but when I try to execute
>'cat /etc/resolv.conf' I get a message stating that the file doesn't exist

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.


--
Best Regards,
Alexander Zangerl
IT Engineer

BREATHE-SAFE intelligent cabin air filtration
Keeps your lungs and cabin dust free!
Head Office: 37 Argon Street, Carole Park QLD 4300 Australia
Western Australia: 169 Chisholm Crescent, Kewdale WA 6105
Tel: +61 7 3276 7833 M. +61 415 482 341 E. a...@breathe-safe.com
Reply all
Reply to author
Forward
0 new messages