1

I have successfully chrooted Fedora among other distros in my Android but I've run in a problem I cannot overcome.

I am trying to use openvpn on a .ovpn file, however I am unable to open /dev/net/tun as I do not have permissions; presumably since my Android is not rooted, as I do not have this problem on my rooted phone.

Here is what I thought:

mknod /home/user/tun c 10 200

With this I could create a node as chroot and then use shoot openvpn --dev to use that one, however running the aforementioned command creates no node. I am not getting any errors, it just doesn't create a node. I cannot run mknod outside the chroot system as my Android is not rooted.

Are there any workarounds? Sorry if this is a trivial question, I am not very familiar with nodes. I tried other distros just for the sake of it but same error happens.

Thanks a million in advance.

4
  • I don't think you can just create another device node to make use of the tun driver. Neither is /dev/net/tun a tun interface. --dev is a way to specify the name that OpenVPN should create the tun (or tap) interface with. Commented Nov 22, 2023 at 15:29
  • Thanks a lot @TomYan for the answer. I tried openvpn --dev tun0 ./myfile.ovpn Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: dev (2.4.11) Use --help for more information.. If you have any other ideas let me know, otherwise I guess it may be slightly impossible. Commented Nov 22, 2023 at 15:42
  • I think you are required to use --config path/to/ovpn, because path/to/ovpn is now not the only argument. Either way, --dev tun0 is not gonna help if openvpn can't open the "real" /dev/net/tun (that is, a device node that is actually bind to the tun kernel driver). (I'm not even sure if your mknod actually made a real character file at all, since it shouldn't be possible when the device is not rooted.) TL;DR, don't bother, it won't work. Use a proper Android OpenVPN client. Commented Nov 22, 2023 at 15:58
  • Android OpenVPN client works fine, wanted to see if I could only tunnel the distro though. Anyways, thanks. Commented Nov 22, 2023 at 16:32

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.