[Networking] pbadger:
Unable to ping network once out of root, DNS troubles

I'm trying to follow this tutorial to reverse tether a rooted (twrp system-less root) Samsung galaxy tab A, t350, with firmware XAR-BPE3, to a Lenovo laptop running Ubuntu 14. Ran into a similar situation as many others in which reverse tethering works, but only for the root user. Thus, when I ping google.com*from root, it works, but when I exit into the default user, it errors with "connect: Network is unreachable"

Here are my steps.

On laptop:

ifconfig usb0 10.42.0.1 netmask 255.255.255.0

sudo "echo 1 > /proc/sys/net/ipv4/ip_forward"

iptables -t nat -F

iptables -t nat -A POSTROUTING -j MASQUERADE

adb shell

On tablet:

(netconfig is no longer defined, so using the old calls)

ifconfig rndis0 10.42.0.2 netmask 255.255.255.0

route add default gw 10.42.0.1 dev rndis0

ndc resolver setnetdns 1 "" 10.42.0.1

This seems to work, and I can ping google.com from root user. Unfortunately, when I end the root session I can neither ping 8.8.8.8, nor google.com.

ping 8.8.8.8 fails with connect: Network is unreachable.

I checked the SuperSu app, and it seems like maybe the way I rooted it (system-less root) prevents other users besides the root one from accessing the network. This might make sense, because the "Install SuperSu into /system" button is greyed out, with the message "Not (currently) available in system-less root mode".

Has anyone got past this error/does anyone have thoughts as to next debugging steps. Much appreciated!

UPDATE:

I'm also having trouble getting the DNS to work consistently, EVEN in root mode. When I restart the tablet and laptop and run all the above commands, the install apparently succeeds, but ping google.com fails with "ping: unknown host google.com", and wget google.com fails with "wget: bad address 'google.com'"

For reference, the IP of my tablet is 10.42.0.2 on interface rndis0, and the IP of my laptop is 10.42.0.1 on interface usb0.

To debug this, I ran tcpdump -i usb0 on the host computer. When ping or wget is run, dns lookup seems to fail with the message:

00:35:30.857504 IP 10.42.0.2.41269 > 10.42.0.1.domain: 2+ AAAA? google.com. (28)

00:35:30.857570 IP 10.42.0.1 > 10.42.0.2: ICMP 10.42.0.1 udp port domain unreachable, length 64

00:35:30.858014 IP 10.42.0.2.59536 > 10.42.0.1.domain: 3+ AAAA? google.com. (28)

00:35:30.858073 IP 10.42.0.1 > 10.42.0.2: ICMP 10.42.0.1 udp port domain unreachable, length 64

00:35:30.858497 IP 10.42.0.2.58643 > 10.42.0.1.domain: 4+ AAAA? google.com. (28)

00:35:30.858569 IP 10.42.0.1 > 10.42.0.2: ICMP 10.42.0.1 udp port domain unreachable, length 64

00:35:30.859026 IP 10.42.0.2.38003 > 10.42.0.1.domain: 5+ A? google.com. (28)

00:35:30.859096 IP 10.42.0.1 > 10.42.0.2: ICMP 10.42.0.1 udp port domain unreachable, length 64

00:35:30.859462 IP 10.42.0.2.46749 > 10.42.0.1.domain: 6+ A? google.com. (28)

00:35:30.859540 IP 10.42.0.1 > 10.42.0.2: ICMP 10.42.0.1 udp port domain unreachable, length 64

00:35:30.859837 IP 10.42.0.2.56972 > 10.42.0.1.domain: 7+ A? google.com. (28)

00:35:30.859885 IP 10.42.0.1 > 10.42.0.2: ICMP 10.42.0.1 udp port domain unreachable, length 64

00:35:35.858088 ARP, Request who-has 10.42.0.2 tell 10.42.0.1, length 28

00:35:35.858338 ARP, Reply 10.42.0.2 is-at <Tablet_mac_address> (oui Unknown), length 28

originally my /etc/resolv.conf file was

nameserver 8.8.4.4

nameserver 8.8.8.8

so I changed it to:

nameserver 10.42.0.1

Any advice on these issues is much appreciated!!