Sharing WiFi connection with BBB using Debian

313 views
Skip to first unread message

shewhorn

unread,
Sep 19, 2016, 3:05:28 PM9/19/16
to BeagleBoard
I posted something yesterday but it seems to have vanished. I've run into this difficult before where none of the instructions or tutorials for getting internet connectivity via ethernet over USB work. Someone MUST have solved this. I'm running Debian Stretch/testing on my laptop. As far as the network manager goes, I don't think it's much different than Jessie (although I could be wrong). Here's specifically what I'm trying to do...

I have a laptop with a WiFi connection
I have a BeagleBone Black connected via USB.
I can ssh into the BBB no problem. What I can't do (which I'd like to be able to do) is to access the internet using my laptop's connection.

I've tried this:
_________________________________________________________
1. SSH to the BBB:

ssh deb...@192.168.7.1

2. In the BBB console type the following:

sudo ifconfig usb0 192.168.7.2
sudo route add default gw 192.168.7.1

3. In the linux console of host system (Ubuntu) type:

sudo su
#wlan0 is my internet facing interface, eth1 is the BeagleBone USB connection
ifconfig eth1 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

4. Set the DNS server address in the BBB console:

echo "nameserver 8.8.8.8" >> /etc/resolv.conf
_________________________________________________________

It doesn't work.

I've tried this (creating a bridge):

http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html

... and that didn't work either.

Any help would be greatly appreciated.

William Hermans

unread,
Sep 19, 2016, 5:30:06 PM9/19/16
to beagl...@googlegroups.com
On Mon, Sep 19, 2016 at 12:05 PM, shewhorn <jazz...@gmail.com> wrote:
I posted something yesterday but it seems to have vanished. I've run into this difficult before where none of the instructions or tutorials for getting internet connectivity via ethernet over USB work. Someone MUST have solved this. I'm running Debian Stretch/testing on my laptop. As far as the network manager goes, I don't think it's much different than Jessie (although I could be wrong). Here's specifically what I'm trying to do...

I have a laptop with a WiFi connection
I have a BeagleBone Black connected via USB.
I can ssh into the BBB no problem. What I can't do (which I'd like to be able to do) is to access the internet using my laptop's connection.

I've tried this:
_________________________________________________________
1. SSH to the BBB:

ssh deb...@192.168.7.1

2. In the BBB console type the following:

sudo ifconfig usb0 192.168.7.2
sudo route add default gw 192.168.7.1

I do not think this is correct. The laptop should be *.1, and the gateway. So effectively, you're telling the beaglebone to be it's own gateway.  In other words.

Laptop: 192.168.7.1
Beaglebone: 192.168.7.2

So technically it does not matter which device gets what IP, but it looks like you have your system ip addresses confused. Which is why it's usually a good idea to have the "Server" be *.1.

3. In the linux console of host system (Ubuntu) type:

sudo su
#wlan0 is my internet facing interface, eth1 is the BeagleBone USB connection
ifconfig eth1 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

4. Set the DNS server address in the BBB console:

echo "nameserver 8.8.8.8" >> /etc/resolv.conf
_________________________________________________________

It doesn't work.

I've tried this (creating a bridge):

http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html

... and that didn't work either.

Any help would be greatly appreciated.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a3e7801d-df4f-44f3-b6c0-7a5be354c3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shewhorn

unread,
Sep 19, 2016, 6:51:45 PM9/19/16
to BeagleBoard


On Monday, September 19, 2016 at 5:30:06 PM UTC-4, William Hermans wrote:
I do not think this is correct. The laptop should be *.1, and the gateway. So effectively, you're telling the beaglebone to be it's own gateway.  In other words.

Laptop: 192.168.7.1
Beaglebone: 192.168.7.2

You're correct. The .1 was a typo. D'OH. I am indeed ssh-ing into .2 ...

ssh us...@192.168.7.2

That is the BBB's default IP from the factory of course. I have literally been Googling all day and have tried a myriad of GUI and command line methods and none of them work. Everything I find is going in the wrong direction, it wants to share a wired ethernet connection to the internet over WiFi... basically turning the laptop into a hotspot. I just want to share my WiFi connection (which is my connection to the internet) with my BBB which is connected via USB.
Reply all
Reply to author
Forward
0 new messages