Using fx30, internet router

#1

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?
#2

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
nameserver 10.144.148.1
nameserver 10.145.148.5


PC side:

sudo route add default gw 192.168.2.2 usb0
sudo echo -e “nameserver 10.144.148.1\nnameserver 10.145.148.5” | sudo tee /etc/resolv.conf
ping www.google.com

#3

Thank you so much!

It’s working !!

#4

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).

#5

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