Beaglebone via Ubuntu to internet not working

135 views
Skip to first unread message

KenUnix

unread,
Jan 28, 2021, 9:44:44 AM1/28/21
to BeagleBoard

I am able to SSH into the Beaglebone from Ubuntu.

However Beaglebone can not connect to Internet.

Fire wall?

Any ideas? Thanks

Chris Green

unread,
Jan 28, 2021, 10:03:40 AM1/28/21
to beagl...@googlegroups.com
KenUnix <ken.un...@gmail.com> wrote:
> [-- multipart/alternative, encoding 7bit, 47 lines --]
>
> [-- text/plain, encoding 7bit, charset: UTF-8, 16 lines --]
How are you connecting via ssh to the BBB? If you are using the
ethernet over USB connection I don't think that has routing to allow
the BBB to access the internet (the system you're ssh'ing from would
have to have routing set up as well).

If you want the BBB to have direct access to the internet (like the
system you're connecting from) you need to connect the RJ45 port to
your LAN.

... sorry if you know all this already! :-)

--
Chris Green
·

jonnymo

unread,
Jan 28, 2021, 10:04:50 AM1/28/21
to Beagle Board
How do you have your Beaglebone connected for networking; USB to a PC, Ethernet cable, Wi-Fi?

Which Beaglebone do you have?

Have you configured the gateway and such on the BB?

Jon 

--
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/2b0a3425-cf47-479f-8f2a-76f35f9d6b02n%40googlegroups.com.

Kenneth Martin

unread,
Jan 28, 2021, 10:14:35 AM1/28/21
to Beagle Board
Beaglebone Black connected to PC over USB.  PC running Ubuntu. Same setup works with Windows 10.

Beaglebone IP is 192.168.137.2 . I can SSH into it. OK.


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/f3F5U228adA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAG99bkqTZ%2BEbg4ZCiax%2BAjA-8kO8q7kPvy5ugWfYj0VOfz4zNA%40mail.gmail.com.


--
End of line
JOB TERMINATED


Robert Nelson

unread,
Jan 28, 2021, 10:20:36 AM1/28/21
to Beagle Board
On Thu, Jan 28, 2021 at 9:14 AM Kenneth Martin <ken.un...@gmail.com> wrote:
>
> Beaglebone Black connected to PC over USB. PC running Ubuntu. Same setup works with Windows 10.
>
> Beaglebone IP is 192.168.137.2 . I can SSH into it. OK.

In windows this is called internet connection sharing..

In Ubuntu, you need to also configure it on your ubuntu host..

https://github.com/RobertCNelson/boot-scripts/blob/master/network/doc-debian-setup.md

Regards,

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

KenUnix

unread,
Jan 28, 2021, 10:31:40 AM1/28/21
to BeagleBoard
In Ubuntu I tried:  sudo ufw allow in 192.168.137.2

Robert Nelson

unread,
Jan 28, 2021, 10:39:03 AM1/28/21
to Beagle Board
On Thu, Jan 28, 2021 at 9:31 AM KenUnix <ken.un...@gmail.com> wrote:
>
> In Ubuntu I tried: sudo ufw allow in 192.168.137.2

ufw is just the firewall..

so you didn't configure any routing.. fix that. ;)

Chris Green

unread,
Jan 28, 2021, 12:03:27 PM1/28/21
to beagl...@googlegroups.com
Kenneth Martin <ken.un...@gmail.com> wrote:
> [-- text/plain, encoding 7bit, charset: UTF-8, 67 lines --]
>
> Beaglebone Black connected to PC over USB. PC running Ubuntu. Same setup
> works with Windows 10.
>
> Beaglebone IP is 192.168.137.2 . I can SSH into it. OK.
>
Well I don't know how it works with Windows 10.

Anyway, as per my first reply, the easiest way to get the BBB to be
able to access the internet is to connect it direct to your router
with an RJ45 cable. It will then get assigned an IP of it's own on
the LAN (not an IP on the net unique to the USB connection) and will
also get its DNS and such set up so that it works.

--
Chris Green
·

Chris Green

unread,
Jan 28, 2021, 12:05:20 PM1/28/21
to beagl...@googlegroups.com
Robert Nelson <robert...@gmail.com> wrote:
> On Thu, Jan 28, 2021 at 9:31 AM KenUnix <ken.un...@gmail.com>
> wrote:
> >
> > In Ubuntu I tried: sudo ufw allow in 192.168.137.2
>
> ufw is just the firewall..
>
> so you didn't configure any routing.. fix that. ;)
>
... as I keep saying, its *far* easier simply to connect direct from
the BBB to your router with a UTP cable. It then 'just works'.

--
Chris Green
·

KenUnix

unread,
Jan 28, 2021, 6:05:25 PM1/28/21
to BeagleBoard
Robert,

The iptables entries on the Ubuntu worked.

However running   sudo apt update    results in failures apparently for port 80?

Example:

debian@beaglebone:~/cronjobs$ sudo apt update
Err:1 http://repos.rcn-ee.com/debian buster InRelease                          
  Cannot initiate the connection to repos.rcn-ee.com:80 (2600:3c00::f03c:91ff:fe37:6ad5). - connect (101: Network is unreachable) Could not connect to repos.rcn-ee.com:80 (45.33.2.10), connection timed out
Err:2 http://deb.debian.org/debian buster InRelease                            
  Cannot initiate the connection to debian.map.fastlydns.net:80 (2a04:4e42:2f::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastlydns.net:80 (151.101.202.132), connection timed out Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:3b::644). - connect (101: Network is unreachable)
Err:3 http://deb.debian.org/debian buster-updates InRelease
  Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:3b::644). - connect (101: Network is unreachable)
Err:4 http://deb.debian.org/debian-security buster/updates InRelease
  Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:3b::644). - connect (101: Network is unreachable)
Reading package lists... Done

I can ping the above.

debian@beaglebone:/etc/apt$ ping repos.rcn-ee.com -c3
PING repos.rcn-ee.com (45.33.2.10) 56(84) bytes of data.
64 bytes from li956-10.members.linode.com (45.33.2.10): icmp_seq=1 ttl=51 time=52.9 ms
64 bytes from li956-10.members.linode.com (45.33.2.10): icmp_seq=2 ttl=51 time=52.4 ms
64 bytes from li956-10.members.linode.com (45.33.2.10): icmp_seq=3 ttl=51 time=52.6 ms

Robert Nelson

unread,
Jan 28, 2021, 9:06:57 PM1/28/21
to Beagle Board
On Thu, Jan 28, 2021 at 5:05 PM KenUnix <ken.un...@gmail.com> wrote:
>
> Robert,
>
> The iptables entries on the Ubuntu worked.
>
> However running sudo apt update results in failures apparently for port 80?
>
> Example:
>
> debian@beaglebone:~/cronjobs$ sudo apt update
> Err:1 http://repos.rcn-ee.com/debian buster InRelease
> Cannot initiate the connection to repos.rcn-ee.com:80 (2600:3c00::f03c:91ff:fe37:6ad5). - connect (101: Network is unreachable) Could not connect to repos.rcn-ee.com:80 (45.33.2.10), connection timed out

Ah Cool, it looks like you have ipv6 too, try the ipv6 version of iptables..

Sorry i'm stuck on a ipv4 provider..

Kenneth Martin

unread,
Jan 29, 2021, 3:34:35 PM1/29/21
to Beagle Board
After implementing Roberts changes to Ubuntu I get the following:

debian@beaglebone:~$ sudo apt update
Err:1 http://deb.debian.org/debian buster InRelease              
  Temporary failure resolving 'deb.debian.org'
Err:2 http://repos.rcn-ee.com/debian buster InRelease            
  Temporary failure resolving 'repos.rcn-ee.com'

Err:3 http://deb.debian.org/debian buster-updates InRelease      
  Temporary failure resolving 'deb.debian.org'

Err:4 http://deb.debian.org/debian-security buster/updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done    
Building dependency tree      
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://repos.rcn-ee.com/debian/dists/buster/InRelease  Temporary failure resolving 'repos.rcn-ee.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
debian@beaglebone:~$




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/f3F5U228adA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Robert Heller

unread,
Jan 29, 2021, 3:48:26 PM1/29/21
to beagl...@googlegroups.com, Beagle Board, Robert Heller
OK, you are missing the DNS. The quick and dirty hack is edit
/etc/resolv.conf to contain just this line:

nameserver 8.8.8.8
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

Chris Green

unread,
Jan 29, 2021, 4:18:32 PM1/29/21
to beagl...@googlegroups.com
KenUnix <ken.un...@gmail.com> wrote:
> [-- multipart/alternative, encoding 7bit, 47 lines --]
>
> [-- text/plain, encoding 7bit, charset: UTF-8, 16 lines --]
>
>
> I am able to SSH into the Beaglebone from Ubuntu.
>
> However Beaglebone can not connect to Internet.
>
Yet again I say.

Get a UTP patch lead and simply connect the BBB direct to your router,
job done.

--
Chris Green
·

Kenneth Martin

unread,
Jan 29, 2021, 4:18:57 PM1/29/21
to Beagle Board
It is that. 

The problem is getting thru the Ubuntu host machine.

Beglebone ---> Ubuntu Machine ---> Internet




Kenneth Martin

unread,
Jan 29, 2021, 4:20:35 PM1/29/21
to Beagle Board
I do not have a router. I have WiFi.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/f3F5U228adA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Robert Heller

unread,
Jan 29, 2021, 4:33:30 PM1/29/21
to beagl...@googlegroups.com, Beagle Board, Robert Heller
You have to have a router. The public Internet is not Wireless. Somewhere
there is a wire and a router. Unless you are doing this from a park bench or
an Internet Cafe... Or "stealing" your neighbor's WiFi.

What do you have for an ISP? Cable? FIOS? DSL? Municipal Fiber? Or something
else?

*Every* WiFi router *I* have *ever* seen includes a 4-port Etherswitch,

Yes, it is *possible* to use your Ubuntu laptop as a router, but getting it
ALL setup properly is not trivial. Some of it requires some Linux admin
magic. It appears you are not quite there.

Note: the USB Internet provided by the BBB is not really intended for much
more than basic setup.

If it really is impossible to get a hard network connection, you might have to
get a USB wireless dongle. The BBB does have a USB A connector that is a USB
host.

At Fri, 29 Jan 2021 16:20:03 -0500 beagl...@googlegroups.com wrote:

>
> I do not have a router. I have WiFi.
>
>
> On Fri, Jan 29, 2021 at 4:18 PM Chris Green <c...@isbd.net> wrote:
>
> > KenUnix <ken.un...@gmail.com> wrote:
> > > [-- multipart/alternative, encoding 7bit, 47 lines --]
> > >
> > > [-- text/plain, encoding 7bit, charset: UTF-8, 16 lines --]
> > >
> > >
> > > I am able to SSH into the Beaglebone from Ubuntu.
> > >
> > > However Beaglebone can not connect to Internet.
> > >
> > Yet again I say.
> >
> > Get a UTP patch lead and simply connect the BBB direct to your router,
> > job done.
> >
> > --
> > Chris Green
> > ·
> >
> > --
> > For more options, visit http://beagleboard.org/discuss
> > ---
> > You received this message because you are subscribed to a topic in the
> > Google Groups "BeagleBoard" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/beagleboard/f3F5U228adA/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > beagleboard...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/beagleboard/k9aeeh-imu6.ln1%40esprimo.zbmc.eu

Kenneth Martin

unread,
Jan 29, 2021, 5:10:56 PM1/29/21
to Beagle Board
Robert,

This worked under Windows 10. The Bone could access the internet fine.

P.C. Now running Ubuntu 20.04.

Same WiFi. I live in an assisted living center and they have WiFi. No router for me.



Chris Green

unread,
Jan 29, 2021, 5:18:25 PM1/29/21
to beagl...@googlegroups.com
Kenneth Martin <ken.un...@gmail.com> wrote:
> [-- text/plain, encoding quoted-printable, charset: UTF-8, 55 lines --]
>
> I do not have a router. I have WiFi.
>
You have a router somewhere! :-)

--
Chris Green
·

KenUnix

unread,
Jan 30, 2021, 10:34:50 AM1/30/21
to BeagleBoard
Apply the following to Ubuntu and   sudo apt xxx   and other functions work fine from Beaglebone

# Invoke after reboot.  01-28-2021 KM / ChipMaster
sudo sysctl net.ipv4.ip_forward=1
#                                                    WiFi device   ||   from route command
#                                                                        /----\
sudo iptables -t nat -A POSTROUTING -o wlp3s0 -j MASQUERADE
#




Dennis Lee Bieber

unread,
Jan 30, 2021, 1:06:53 PM1/30/21
to Beagleboard
On Fri, 29 Jan 2021 17:10:23 -0500, in gmane.comp.hardware.beagleboard.user
Kenneth Martin <ken.unix.guy-Re5J...@public.gmane.org>
wrote:

>
>This worked under Windows 10. The Bone could access the internet fine.
>

More likely -- "this worked under Windows 10" INTERNET CONNECTION
SHARING (ICS). A feature which has to be enabled/configured in Windows, it
is not automatic. When configured properly -- meaning the local and wide
area network NICs have been defined, and the firewall has had stuff opened
up to allow pass-through traffic, the Windows machine becomes an Internet
Gateway Router.

>P.C. Now running Ubuntu 20.04.
>

There is no "all in one" configuration. You have to adjust the Linux
routing tables, defining gateway ports, the NICs to route between, along
with setting up firewall rules. All actions that require some knowledge of
Linux and networking.

Might be better to run a network cable connection from the BBB to the
(laptop? I presume it has an RJ45 jack somewhere) and try to configure
Linux to route a proper Ethernet connection to the WiFi rather than trying
to use the pseudo-device created over the USB connection. As has been
mentioned, that USB-gadget is really meant just to allow direct (SSH)
connection to the BBB for purposes of configuring it (if needed) with the
Ethernet connection being the primary networking link.



--
Dennis L Bieber

Kenneth Martin

unread,
Jan 30, 2021, 1:24:59 PM1/30/21
to Beagle Board

Did you read my post using iptables entry?? Problem solved.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/f3F5U228adA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Robert Heller

unread,
Jan 30, 2021, 1:47:18 PM1/30/21
to beagl...@googlegroups.com, Beagleboard, Robert Heller
At Sat, 30 Jan 2021 13:06:38 -0500 beagl...@googlegroups.com wrote:

>
> On Fri, 29 Jan 2021 17:10:23 -0500, in gmane.comp.hardware.beagleboard.user
> Kenneth Martin <ken.unix.guy-Re5J...@public.gmane.org>
> wrote:
>
> >
> >This worked under Windows 10. The Bone could access the internet fine.
> >
>
> More likely -- "this worked under Windows 10" INTERNET CONNECTION
> SHARING (ICS). A feature which has to be enabled/configured in Windows, it
> is not automatic. When configured properly -- meaning the local and wide
> area network NICs have been defined, and the firewall has had stuff opened
> up to allow pass-through traffic, the Windows machine becomes an Internet
> Gateway Router.
>
> >P.C. Now running Ubuntu 20.04.
> >
>
> There is no "all in one" configuration. You have to adjust the Linux
> routing tables, defining gateway ports, the NICs to route between, along
> with setting up firewall rules. All actions that require some knowledge of
> Linux and networking.

And *every* step must be followed and to make the setup *persistent*, some
steps need to be added to startup files *and* be done manually. Missing any
one step will cause things to stop working or not work at all.

>
> Might be better to run a network cable connection from the BBB to the
> (laptop? I presume it has an RJ45 jack somewhere) and try to configure
> Linux to route a proper Ethernet connection to the WiFi rather than trying
> to use the pseudo-device created over the USB connection. As has been
> mentioned, that USB-gadget is really meant just to allow direct (SSH)
> connection to the BBB for purposes of configuring it (if needed) with the
> Ethernet connection being the primary networking link.

Actually, setting up a Linux machine to act as a router via its Ethernet is a
little MORE involved. For starters, you will have to install the DHCPD server
and then configure the DHCPD server, plus *ALL* of the "INTERNET CONNECTION
SHARING (ICS)" stuff. Oh, unless he also gets an Ethernet Switch, he would
want to get a Ethernet cross-over cable.

Given that the OP has no access to his router (and yes there is a router
somewhere in his living center) and is not really an expert Linux admin, his
best option is to just get a USB WiFi dongle and plug that into the USB A host
port on the BBB. Also, the BBB will actually run better when powered from the
5V DC coax power jack.

Dennis Lee Bieber

unread,
Jan 30, 2021, 2:28:03 PM1/30/21
to Beagleboard
On Sat, 30 Jan 2021 13:47:07 -0500 (EST), in
gmane.comp.hardware.beagleboard.user Robert Heller
<heller-2/ccJrXdU8tWk0Htik3J/w...@public.gmane.org> wrote:

>SHARING (ICS)" stuff. Oh, unless he also gets an Ethernet Switch, he would
>want to get a Ethernet cross-over cable.
>

According to the BBB SRM, no cross-over cable would be needed.

"""
The PHY supports AutoMDX which means either a straight or a swap cable can
be used
"""

Odds are good that any modern laptop with an RJ45 jack would also
support that mode.


--
Dennis L Bieber

Reply all
Reply to author
Forward
0 new messages