Skip to content

Instantly share code, notes, and snippets.

@jonathanwork
Created October 15, 2017 20:01
Show Gist options
  • Select an option

  • Save jonathanwork/4e04092c4db0e4235e0628eb5260c21e to your computer and use it in GitHub Desktop.

Select an option

Save jonathanwork/4e04092c4db0e4235e0628eb5260c21e to your computer and use it in GitHub Desktop.
beaglebone linux connection hack
BeagleBone Black:
ifconfig usb0 192.168.7.2
route add default gw 192.168.7.1
Host PC:
sudo su
#eth0 is my internet facing interface, eth3 is the BeagleBone USB connection
ifconfig eth2 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth2 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment