Android TUN接口在Linux-Deploy chroot中不起作用。向上但没有任何数据包

问题描述 投票:0回答:1

[我试图在Linux-deploy chroot中打开Android 5.0上的openvpn客户端,并在其中放入Debian Buster(Android内核3.10.65)

该通道已启动并获得ip地址,但未传输任何数据包。没有ping正常工作或任何tcp连接。 Openvpn成功保持活动状态,并且没有掉线,永远保持连接状态。相同的配置可以在我的电脑上使用。与openvpn无关。我试着用socat调出tun

Socat TUN也无法正常工作http://www.dest-unreach.org/socat/doc/socat-tun.html

socat -d -d -d TCP:10.0.9.77:11443 TUN:192.168.255.2/24,up

2019/10/31 20:32:01 socat[29853] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2019/10/31 20:32:01 socat[29853] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2019/10/31 20:32:01 socat[29853] I This product includes software written by Tim Hudson ([email protected])
2019/10/31 20:32:01 socat[29853] N opening connection to AF=2 10.0.9.77:11443
2019/10/31 20:32:01 socat[29853] I starting connect loop
2019/10/31 20:32:01 socat[29853] I socket(2, 1, 6) -> 5
2019/10/31 20:32:01 socat[29853] N successfully connected from local address AF=2 10.0.9.95:52792
2019/10/31 20:32:01 socat[29853] I setting option "iff-up" to 1
2019/10/31 20:32:01 socat[29853] N creating tunnel network interface
2019/10/31 20:32:01 socat[29853] I open("/dev/net/tun", 02, 0666) -> 6
2019/10/31 20:32:01 socat[29853] I socket(2, 2, 0) -> 7
2019/10/31 20:32:01 socat[29853] I resolved and opened all sock addresses
2019/10/31 20:32:01 socat[29853] N starting data transfer loop with FDs [5,5] and [6,6]
2019/10/31 20:32:01 socat[29853] N socket 1 (fd 5) is at EOF
2019/10/31 20:32:02 socat[29853] I poll timed out (no data within 0.500000 seconds)
2019/10/31 20:32:02 socat[29853] I shutdown(5, 2)
2019/10/31 20:32:02 socat[29853] N exiting with status 0

防火墙是完全干净的:

iptables-legacy -X
iptables-legacy -t raw -X
iptables-legacy -t nat -X
iptables-legacy -t mangle -X
iptables-legacy -t raw -F
iptables-legacy -t nat -F
iptables-legacy -t mangle -F
iptables-legacy -F

如果我在android上运行socat-server,并且我的计算机作为客户端-都tun0 up,但没有ping。

我在Google上找到了有关android的信息:只允许NET_ADMIN完全控制TUN接口

是什么意思?也许CONFIG_PARANOID_NETWORK会导致问题?

我尝试使用usermod -a -G 300 {1,2,3,4,5}根但这没有帮助。

请帮助您在tun接口中获取数据包。

android linux-kernel openvpn chroot tun
1个回答
0
投票

我找到了答案。

从所有查找主首选项1中添加IP规则

© www.soinside.com 2019 - 2024. All rights reserved.