gnirehtet icon indicating copy to clipboard operation
gnirehtet copied to clipboard

No internet connection: "Cannot write: [PermissionDenied] Operation not permitted (os error 1)"

Open somebelly opened this issue 4 years ago • 5 comments

Same error for all my Android devices. Gnirehtet (v2.5), Ubuntu 20.04 (Nothing changes using sudo.)

2021-02-17 17:54:06.283 INFO Main: Checking gnirehtet client...
2021-02-17 17:54:06.283 INFO Main: Starting relay server on port 31416...
2021-02-17 17:54:06.283 INFO Relay: Relay server started
2021-02-17 17:54:06.337 INFO Main: Starting client...
Starting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetActivity }
2021-02-17 17:54:06.434 INFO TunnelServer: Client #0 connected
2021-02-17 17:54:06.531 INFO UdpConnection: 10.0.0.2:54633 -> 8.8.8.8:53 Open
2021-02-17 17:54:06.531 ERROR UdpConnection: 10.0.0.2:54633 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2021-02-17 17:54:06.531 INFO UdpConnection: 10.0.0.2:54633 -> 8.8.8.8:53 Close
2021-02-17 17:54:06.785 INFO TcpConnection: 10.0.0.2:42388 -> 162.62.97.64:8080 Open
2021-02-17 17:54:07.531 INFO UdpConnection: 10.0.0.2:13191 -> 8.8.8.8:53 Open
2021-02-17 17:54:07.531 ERROR UdpConnection: 10.0.0.2:13191 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2021-02-17 17:54:07.532 INFO UdpConnection: 10.0.0.2:13191 -> 8.8.8.8:53 Close
2021-02-17 17:54:08.533 INFO UdpConnection: 10.0.0.2:54633 -> 8.8.8.8:53 Open
2021-02-17 17:54:08.534 ERROR UdpConnection: 10.0.0.2:54633 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2021-02-17 17:54:08.534 INFO UdpConnection: 10.0.0.2:54633 -> 8.8.8.8:53 Close
2021-02-17 17:54:09.535 INFO UdpConnection: 10.0.0.2:13191 -> 8.8.8.8:53 Open
2021-02-17 17:54:09.535 ERROR UdpConnection: 10.0.0.2:13191 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2021-02-17 17:54:09.535 INFO UdpConnection: 10.0.0.2:13191 -> 8.8.8.8:53 Close
2021-02-17 17:54:09.537 INFO UdpConnection: 10.0.0.2:46457 -> 8.8.8.8:53 Open
2021-02-17 17:54:09.538 ERROR UdpConnection: 10.0.0.2:46457 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)

somebelly avatar Feb 17 '21 16:02 somebelly

Same here.

Twilight0 avatar Jul 20 '21 22:07 Twilight0

I have the same issue.

I use devuan beowulf with adb 1.0.41 and gnirehtet 2.5 rust and android 10. My phone has a work profile managed by Insular, a program from f-droid made to let you use the work profile to isolate programs. The work profile has gnirehtet too, but it doesn't activate even during autorun. The vpn connection activates outside of the work profile but has no internet.

Normal run command:

$ ADB=/path/adb ./gnirehtet run [idthing]
2022-02-08 02:23:42.587 INFO Main: Checking gnirehtet client...
2022-02-08 02:23:42.587 INFO Main: Starting relay server on port 31416...
2022-02-08 02:23:42.587 INFO Relay: Relay server started
2022-02-08 02:23:43.062 INFO Main: Starting client...
Starting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetActivity }
2022-02-08 02:23:43.372 INFO TunnelServer: Client #0 connected
2022-02-08 02:23:43.522 INFO UdpConnection: 10.0.0.2:40344 -> 8.8.8.8:53 Open
2022-02-08 02:23:43.522 ERROR UdpConnection: 10.0.0.2:40344 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:23:43.522 INFO UdpConnection: 10.0.0.2:40344 -> 8.8.8.8:53 Close
2022-02-08 02:23:43.546 INFO UdpConnection: 10.0.0.2:1407 -> 8.8.8.8:53 Open
2022-02-08 02:23:43.546 ERROR UdpConnection: 10.0.0.2:1407 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:23:43.546 INFO UdpConnection: 10.0.0.2:1407 -> 8.8.8.8:53 Close
2022-02-08 02:23:48.531 INFO UdpConnection: 10.0.0.2:40344 -> 8.8.8.8:53 Open
2022-02-08 02:23:48.532 ERROR UdpConnection: 10.0.0.2:40344 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:23:48.532 INFO UdpConnection: 10.0.0.2:40344 -> 8.8.8.8:53 Close
2022-02-08 02:23:48.554 INFO UdpConnection: 10.0.0.2:1407 -> 8.8.8.8:53 Open
2022-02-08 02:23:48.554 ERROR UdpConnection: 10.0.0.2:1407 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:23:48.554 INFO UdpConnection: 10.0.0.2:1407 -> 8.8.8.8:53 Close
^C2022-02-08 02:23:49.737 INFO Main: Interrupted
2022-02-08 02:23:49.737 INFO Main: Stopping client...
Starting: Intent { act=com.genymobile.gnirehtet.STOP cmp=com.genymobile.gnirehtet/.GnirehtetActivity }

sudo:

$ sudo ADB=/path/adb ./gnirehtet run [idthing]
2022-02-08 02:24:56.974 INFO Main: Starting relay server on port 31416...
2022-02-08 02:24:56.974 INFO Main: Checking gnirehtet client...
2022-02-08 02:24:56.974 INFO Relay: Relay server started
2022-02-08 02:24:57.055 INFO Main: Starting client...
Starting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetActivity }
2022-02-08 02:24:57.226 INFO TunnelServer: Client #0 connected
2022-02-08 02:24:57.395 INFO UdpConnection: 10.0.0.2:23960 -> 8.8.8.8:53 Open
2022-02-08 02:24:57.395 ERROR UdpConnection: 10.0.0.2:23960 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:24:57.395 INFO UdpConnection: 10.0.0.2:23960 -> 8.8.8.8:53 Close
2022-02-08 02:25:02.403 INFO UdpConnection: 10.0.0.2:23960 -> 8.8.8.8:53 Open
2022-02-08 02:25:02.403 ERROR UdpConnection: 10.0.0.2:23960 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:25:02.403 INFO UdpConnection: 10.0.0.2:23960 -> 8.8.8.8:53 Close
2022-02-08 02:25:07.409 INFO UdpConnection: 10.0.0.2:37708 -> 8.8.8.8:53 Open
2022-02-08 02:25:07.409 ERROR UdpConnection: 10.0.0.2:37708 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:25:07.409 INFO UdpConnection: 10.0.0.2:37708 -> 8.8.8.8:53 Close
2022-02-08 02:25:12.417 INFO UdpConnection: 10.0.0.2:37708 -> 8.8.8.8:53 Open
2022-02-08 02:25:12.417 ERROR UdpConnection: 10.0.0.2:37708 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:25:12.417 INFO UdpConnection: 10.0.0.2:37708 -> 8.8.8.8:53 Close
^C2022-02-08 02:25:13.361 INFO Main: Interrupted
2022-02-08 02:25:13.361 INFO Main: Stopping client...
Starting: Intent { act=com.genymobile.gnirehtet.STOP cmp=com.genymobile.gnirehtet/.GnirehtetActivity }

autorun:

$ ADB=/path/adb ./gnirehtet autorun
2022-02-08 02:27:17.994 INFO Main: Starting relay server on port 31416...
2022-02-08 02:27:17.994 INFO Relay: Relay server started
2022-02-08 02:27:17.995 INFO Main: Checking gnirehtet client...
2022-02-08 02:27:18.076 INFO Main: Starting client...
Starting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetActivity }
2022-02-08 02:27:18.233 INFO TunnelServer: Client #0 connected
2022-02-08 02:27:18.714 INFO UdpConnection: 10.0.0.2:38554 -> 8.8.8.8:53 Open
2022-02-08 02:27:18.714 ERROR UdpConnection: 10.0.0.2:38554 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:27:18.714 INFO UdpConnection: 10.0.0.2:38554 -> 8.8.8.8:53 Close
2022-02-08 02:27:23.722 INFO UdpConnection: 10.0.0.2:38554 -> 8.8.8.8:53 Open
2022-02-08 02:27:23.722 ERROR UdpConnection: 10.0.0.2:38554 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:27:23.722 INFO UdpConnection: 10.0.0.2:38554 -> 8.8.8.8:53 Close
2022-02-08 02:27:28.729 INFO UdpConnection: 10.0.0.2:41917 -> 8.8.8.8:53 Open
2022-02-08 02:27:28.729 ERROR UdpConnection: 10.0.0.2:41917 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:27:28.729 INFO UdpConnection: 10.0.0.2:41917 -> 8.8.8.8:53 Close
2022-02-08 02:27:33.737 INFO UdpConnection: 10.0.0.2:41917 -> 8.8.8.8:53 Open
2022-02-08 02:27:33.737 ERROR UdpConnection: 10.0.0.2:41917 -> 8.8.8.8:53 Cannot write: [PermissionDenied] Operation not permitted (os error 1)
2022-02-08 02:27:33.737 INFO UdpConnection: 10.0.0.2:41917 -> 8.8.8.8:53 Close
^C

ureru avatar Feb 08 '22 07:02 ureru

Opening a UDP socket from your computer to the Google DNS (8.8.8.8:53) is refused for some reason.

Try with another dns (./gnirehtet autorun -d x.x.x.x).

rom1v avatar Feb 09 '22 07:02 rom1v

-d only allowed me to change the dns one time. Also my vpn is blocking custom dns requests.

ureru avatar Feb 09 '22 08:02 ureru

Also my vpn is blocking custom dns requests.

That's the problem. If your device sends a DNS request, it is forwarded by gnirehtet, so the request is emitted from your computer… and your VPN blocks it.

-d only allowed me to change the dns one time.

It is configured when the VPNService is started on the device when you start gnirehtet. Once configured, all DNS requests from the device use this address.

rom1v avatar Feb 09 '22 08:02 rom1v