Getting internet on BBB via usb (Share internet from your linux machine)
22 Feb 2015Login to your BBB and type
route add default gw 192.168.7.1
Then type the follwing in your linux machine to route the network.
sudo su
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
Note: eth0 is LAN interface which has internet connectivity. eth1 is the usb network connection with BBB. 192.168.7.1 is the ip address that assigned to your PC.
Following part is not needed if internet is working properly.
If you are using network that doesn't allow third party dns server (like google dns 8.8.8.8 or 8.8.4.4), you had to configure /etc/resolv.conf.
First find out what dns server address your internet provider (your college) gives you. If you have a working network type
nm-tool
to find out the dnsaddress. Then delete all the entries in /etc/resolve.conf and replace it with
nameserver <dnsaddr>
eg: nameserver 192.168.0.5