Last active
August 29, 2015 13:56
-
-
Save bunsenmcdubbs/8888980 to your computer and use it in GitHub Desktop.
Forwarding network access through a usb tether to the Beaglebone Black. Adapted from http://robotic-controls.com/learn/beaglebone/beaglebone-internet-over-usb-only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run this on the computer first | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run this on the beaglebone after running the "server" side script | |
ifconfig usb0 192.168.7.2 | |
route add default gw 192.168.7.1 | |
echo "nameserver 8.8.8.8" >> /etc/resolv.conf | |
# getting the time | |
ntpdate -b -s -u pool.ntp.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment