mirror of
https://github.com/fosrl/newt.git
synced 2026-05-06 16:09:02 -05:00
[GH-ISSUE #161] ERROR: Failed to bring up WireGuard device: permission denied in termux (rootless Android) #2036
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dpurnam on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/fosrl/newt/issues/161
Describe the Bug
I've almost given up on setting up a newt client inside the termux app on a non-root android phone (because newt claims to be userspace).
For now reverted to using a functional cloudflared tunnel, unwillingly.
I've tried using the newt binary for arm64, which had its own issues with CA certs verification for remote (pangolin) server, DNS issues (unable to ping 127.0.0.1:53) et al.
So i switched to using termux-udocker, which got me over with the issues above except the one below.
Environment
To Reproduce
used a very simple docker compose with udocker:
But simple --env arguments for udocker should also be enough instead of a compose file
Expected Behavior
A working newt client?
@dpurnam commented on GitHub (Nov 20, 2025):
Some info that might help towards a possible resolution to this issue?
WG tunnelis possible in purely user space (which Newt currently claims to but actually cannot)WG tunnelI wish I could have contributed in a more meaningful way than just such.
@oschwartz10612 commented on GitHub (Nov 22, 2025):
This may be something related to the install on the android device but
also likely could be an issue Pangolin install itself.
Usually when the ping fails like that it is because port UDP 51820 is
not open on the VPS. Could you verify if it is open?
When you run newt on something other than the android device does it
connect?
@dpurnam commented on GitHub (Nov 24, 2025):
Thanks for the response.
Yes, Pangolin and all the other Newt clients (on multiple servers) are working fine.
it's just the termux environment, that newt won't work in. i tried termux-chroot as well
@oschwartz10612 commented on GitHub (Nov 25, 2025):
Are you able to do a tcpdump on the server or on the termux session and
see if udp 51820 packets are making it to the server?
@dpurnam commented on GitHub (Nov 27, 2025):
I shall try a tcpdump and share soon.
Thank you
@dpurnam commented on GitHub (Nov 28, 2025):
tcpdump won't work in termux, so i resorted to using PCAPdroid on the rootless android host.
Nothing in the logs indicates any trace of the Termux Terminal IP is attempting a contact with the Pangolin Server on port 41820 that gerbil is configured with. Same for port 51820, in case that's how newt starts.
IMHO, the UDP packets are flowing fine because the client from within the termux session successfully seems to be able to 'DNS resolve' the Pangolin endpoint.
Would you like to create any private link that I can upload the PCAP logs to?
Edit1: I setup a Wireguard Client onthe Android and configured a new site using it and My Apps within the termux terminal are accessible over Pango'ed URL's. But this defeats the purpose in this use case. We need to use Newt as a Service or binary from within termux terminal
Edit2: I successfully setup the termux package sing-box using the WG tunnel info from Pangolin Dashboard inside the termux terminal.
But here's what might interest you.
when i used the profile/config json below, i got the exact same 'permission denied' error as that of newt keeps throwing. I had to change the 'system' value to 'false' to successfully make it work
I strongly believe, by now, that newt is not yet user-space client. unless - we get an argument or something like that in future - to explicitly not create/touch any system/kernel level stuff.