Tun interface is not forwarding packets to applications ?
Opened this issue · 0 comments
Hi,
Thanks for the code! I am using your code to understand the VPN service. I am running into an issue to get it working on a Samsung Tablet A7 lite (Android 11).
I can see the reverse pkts are written into the tunnel interface (tun0) but cannot be received by the applications. Do we need to set any permissions or policy on the device ?
Debug logs (for ping to 8.8.8.8 going through tunnel) from the VPN client main-loop code:
14:06:55.632 13484-14141/com.example.android.toyvpn V/ToyVpnService: [TX] S: /10.10.20.1, D: /8.8.8.8, Unknown(1), hdr: 20
14:06:55.750 13484-14141/com.example.android.toyvpn V/ToyVpnService: [RX] S: /8.8.8.8, D: /10.10.20.1, Unknown(1), hdr: 20
ifconfig
tun0 Link encap:UNSPEC
inet addr:10.10.20.1 P-t-P:10.10.20.1 Mask:255.255.255.255
inet6 addr: fe80::e1e3:19ae:c25:5178/64 Scope: Link
UP POINTOPOINT RUNNING MTU:1500 Metric:1
RX packets:183 errors:0 dropped:0 overruns:0 frame:0
TX packets:374 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:14124 TX bytes:30135
Appreciate your help. Thank you!