BBB and internet


I received my new BBB in the mail a couple days ago. I’ve spent a ridiculous amount of time to get something as simple as an internet connection and am not having any success. I feel like I’ve been through ever post on the internet and am still not having luck.

Here is my situation:

I’ve plugged my BBB into my usb and am able to ssh to it. However, the device cannot connect to the internet no matter what I do. Now I think its messed up.

How can I revert the following command. I was following directions to setup internet sharing from my mac and ran the below command on the BBB. Now I think its all messed up.
route add default gw

Furthermore, I am not able to use the network cable plug because the BBB just crashes and shuts down whenever I attempt this. Even after I pull the cable out it tends to crash the next several times after I plug it back in. The network cable seems to be performing some sort of black magic on the BBB.

Does anyone have any recommendations on the correct procedure for connecting my BBB to the internet?

Here is what I have:
Default emmc angstrom install.
Mac OSX Mavericks
Both BBB drivers have been installed on my mac

Please help. Thanks.

try this and see what happens:


that worked on my BBB running the latest Angstrom from eMMC. But for the ‘server’ side you need to run those two commands with root privs.


quite right, fixed.


This definitely should _not_ happen!
If you have a DHCP server in your network, usually the router in a
home network, then BBB should simply connect like any computer and you
should be able to search for the BBB e.g. with nmap or in the logfiles
of your DHCP server.
Did you have a look at /var/log/kern.log after reboot?
Did you reboot with eth0 plugged in?

I guess this might be a hardware problem of your BBB.


I thought this a handy thing to do so I put the BBB side commands in an executable script and then created another script for the host side. The host side copies(via scp) the BBB script to the BBB and then executes it(via ssh) and then sets up the host(Linux). Run the host side with sudo or as root.


–BBB side: file name: setup-bbb-ipforwarding-onBBB


enables networking of the BBB over the usb network if

this along with a few commands on the host/server side enable ipforwarding over the usb networking

echo “route add default gw”
/sbin/route add default gw
echo “echo nameserver > /etc/resolv.conf”
echo “nameserver” > /etc/resolv.conf

–HOST side: file name: setup-bbb-ipforwarding


this will enable a BBB connected over usb network to gain internet access through this host computer.

there is a similarly named file which must be copied to the BBB and run as the first 2 commands will attempt to do.

scp setup-bbb-ipforwarding-onBBB root@beaglebone.local:/tmp/
ssh root@beaglebone.local /tmp/setup-bbb-ipforwarding-onBBB

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -t nat -j MASQUERADE

xprompt$ echo 1 > /proc/sys/net/ipv4/ip_forward
-bash: /proc/sys/net/ipv4/ip_forward: No such file or directory
xprompt$ iptables -A POSTROUTING -t nat -j MASQUERADE
-bash: iptables: command not found

Running as root produces the same error.

I tried rebooting with the ethernet plugged in and the lights flash for about 35 seconds and it shuts down. Now when I plug it in after it is running and do ifconfig eth0 for some reason has an external ip. HMMM???

Will look at kern.log now.

Running your script produces the following errors:

Host ‘beaglebone.local’ is not in the trusted hosts file.
(fingerprint md5 f2:40:93:ec:3d:f2:20:ee:53:ae:55:99:e0:f2:f9:5e)
Do you want to continue connecting? (y/n) y
root@beaglebone.local’s password:
setup-bbb-ipforwarding-onBBB: No such file or directory
Warning: Permanently added the RSA host key for IP address ‘’ to the list of known hosts.
root@beaglebone.local’s password:
sh: /tmp/setup-bbb-ipforwarding-onBBB: No such file or directory
iptables v1.4.15: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

kern.log does not exist.

I kinda expected people to look at what the script was doing so I didn’t not explain every aspect of how it works.
Looking at the setup-bbb-ipforwarding script you see the line which starts with scp? that is like “cp” and it copies files so looking at it you should see that it is trying to copy the setup-bbb-ipforwarding-onBBB to the BBB. and there is no path for that file specified so it MUST be in the same directory you are running the host script from.

after the “scp” command you should see the line beginning with “ssh”. that is running a secure shell to the BBB and tries to run the “…-onBBB” script. So if it is not there it can’t execute it.

If you look in the …-onBBB script you will see it is just a list of the 2 things which set the route to the host computer and set the name server in /etc/resolv.conf.


If you can’t run a command someone lists then you need to install the package which provides that command.
You’ll need to lookup how to install iptables on your host system( as in apt-get install iptables for Debian systems )


Installing on the host machine is unfortunately not an option.

I discovered the cat5 cable wasn’t working due to a low power input from the usb cable. I removed the usb hub and it boots fine with the cable plugged in now. Unfortunately the ip address obtained by the device is not coming from my DHCP server and appears to be an external ip.