Using fx30, internet router


Hello ALL.

Using fx30, internet connection is OK, just itself, but I don’t know how can I set up router.

I want to beaglebone black connect internet using fx30 with RJ45 wired cable or usb modem.

Connecting to internet ... as modem or as ecm?

You can share the data connection with USB ECM interface:

Fx30 side:

echo > /etc/resolv.conf
cm data connect &
iptables --flush
iptables -t nat -A POSTROUTING --out-interface rmnet0 -j MASQUERADE
iptables -A FORWARD -o usb0 -i rmnet0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i usb0 -o rmnet0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
cat /etc/resolv.conf

PC side:

sudo route add default gw usb0
sudo echo -e “nameserver\nnameserver” | sudo tee /etc/resolv.conf


Thank you so much!

It’s working !!


one more question
manual setup is OK.
but I want when power on, internet connect by automatically.

PC side setup is easy, but fx30 is difficult for me(new user).


you can modify the init script /etc/init.d/