USB tethering not forwarding traffic
#1
I have USB tethering configured on my PinePhone. It was working well 1-2 month ago.
But now (probably after some update) it doesn't forward any traffic outside.

In details:
I have USB gadget configured. I have usb0 device in place with assigned IP.
When connecting to PC - eth device correctly added and assigned IP.
I can ping and ssh to PinePhone IP (throught USB network).
No other IPs are reachable. Seems like IP packets just dropped.
I have clean iptables with ACCEPT policy for all chains.
Code:
iptables -nvL
Chain INPUT (policy ACCEPT 3577 packets, 323K bytes)
pkts bytes target     prot opt in     out     source               destination        

Chain FORWARD (policy ACCEPT 380 packets, 31059 bytes)
pkts bytes target     prot opt in     out     source               destination        

Chain OUTPUT (policy ACCEPT 3352 packets, 331K bytes)
pkts bytes target     prot opt in     out     source               destination        

Moreover, when I try to route traffic from my laptop through pinephone wifi I have the same problem. Everything seems like is dropped. Thus it might be not USB tethering issue but general network problem?

What else can I look at?
  Reply
#2
Eventually I solved the issue. as expect firewall is the culprit. Basically I was missing masquerading in it. Probably it was removed in recent kernels and I had iptables.service disabled thus it is gone after update.

So, the solution for me was to add
Code:
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables-save -f /etc/iptables/iptables.rules
systemctl enable iptables.service
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)