On 21/02/18 04:39, Stuart Longland wrote: > On 21/02/18 04:37, Stuart Longland wrote: >> On 21/02/18 01:37, [email protected] wrote: >>> I have found hundreds of tutorials over the internet on how to share >>> your own computers internet connection over USB with the beaglebone. >>> However I want to do the reverse. I want to have the Beaglebone >>> connected to the PC with USB and to the router via ethernet. The PC is >>> not connected to the router directly. I would then like the Beaglebone >>> to share the internet it is getting from the router to the PC over USB. >>> >>> So far I am doing the following: >>> >>> |sysctl net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -o eth0 >>> -j MASQUERADE sudo iptables -A FORWARD -m conntrack --ctstate >>> RELATED,ESTABLISHED -j ACCEPT | >>> >>> sudo iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT >>> >>> However I am stuck as to what else I am missing for this to be able to >>> work. >> >> Perhaps try this? > > Gah, never mind, just saw that was the first thing you ran. Chalk one > up for responding to an email whilst half asleep. > > Try checking with tcpdump that the packets are being properly masqueraded. >
Another option that might help debug this: iptables -I FORWARD 1 -j LOG --log-prefix 'IP FORWARD:' Then watch /var/log/syslog; you should see what's being passed through the packet filter. You might also find iptables-restore and iptables-save useful. -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/911afc81-7b9e-befa-9e53-c9c96c4879fc%40longlandclan.id.au. For more options, visit https://groups.google.com/d/optout.
