Search code examples
iptablesbeagleboneblack

Connect BeagleBone Black to Internet


I am trying to use this tutorial to connect to the internet from the BeagleBone Black: https://elementztechblog.wordpress.com/2014/12/22/sharing-internet-using-network-over-usb-in-beaglebone-black/

The IpTables steps do not seem to yield the correct configuration. For example:

iptables --table nat -A POSTROUTING -o wlp2s0 -j MASQUERADE

creates the following configuration:

Chain POSTROUTING (policy ACCEPT) target prot opt source destination
MASQUERADE all -- localhost/16 anywhere
MASQUERADE all -- anywhere anywhere

Why do I have anywhere as destination when I clearly specify wlp2s0 ? Can anyone please help ?


Solution

  • iptables -t nat -L doesn't seem to show additional information like interfaces.

    While it's meant to be for save/restore and machine-readable, I much prefer the output of iptables-save due to its completeness.

    In your case this should show you the complete configuration for the "nat" table:

    iptables-save -t nat