1

I wanted to install OpenVPN server on rooted Android and found a solution on StackExchange. I rooted my phone, installed Linux Deploy, installed Ubuntu in it and compiled latest OpenVPN server and EasyRSA.

When I start OpenVPN server on my phone and I can connect to it with a client, but I can't ping anything but myself. Below is my server configuration (same configuration works fine if I set it up on real Ubuntu server):

# server 10.10.1.0 255.255.255.0 
# push "redirect-gateway def1 bypass-dhcp" 
# topology subnet 
# push "topology subnet"
# push "dhcp-option DNS 84.200.69.80" 
# push "dhcp-option DNS 84.200.70.40"
# duplicate-cn
# data-ciphers-fallback 'AES-256-CBC'
# keepalive 10 120 
# persist-key 
# persist-tun 
# explicit-exit-notify 1
# log-append /var/log/openvpn.log 
# verb 3

I haven't installed iptables or ufw so that's not a problem. My router LAN ip address is 192.168.2.1 and my telephone ip address is 192.168.2.28 (wlan0). My OpenVPN server is on 10.10.1.1 (tun0) address and my OpenVPN client gets 10.10.1.2.

On the StackExchange link I posted, guy said that Android ignores main table at all, so we should create custom rules and insert routes.

Without adding any routes to server, I can't even ping 10.10.1.1 from my client, but when I add sudo ip route add 10.10.1.0/24 dev tun0 table 5000 ping started working for 10.10.1.1 and 192.168.2.28 and that's it, I can't get to 192.168.2.1 or any further.

I tried adding sudo ip route add 192.168.2.0/24 dev wlan0 table 5000 but nothing changes.

I even tried sudo ip route add default dev wlan0 table 5000, but when I add that, I can't even connect from my client to my server any more.

Anyone have any idea how can I fix this?

0

You must log in to answer this question.

Browse other questions tagged .