Help needed on toxvpn

Help needed on toxvpn …

I thought that my problems would be fixed with upgrading from 19.09 to 20.03. Unfortunately that’s not the case. Both boxes I want to connect are on the same LAN currently.

doing it interactively is working fine

toxvpn -i 10.123.123.2

from configuration.nix

 ## toxvpn
 ##
 services.toxvpn.enable = true;
 services.toxvpn.localip = "10.123.123.2";

… and status of the service

root@nixos:/etc/nixos]# systemctl status toxvpn.service
● toxvpn.service - toxvpn daemon
   Loaded: loaded (/nix/store/miirxdfilv8bzkcxsiplvwchvrs7hjw6-unit-toxvpn.service/toxvpn.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sun 2020-05-10 11:03:50 CEST; 2h 55min ago
  Process: 837 ExecStartPre=/nix/store/wqcz04iqnrjf1d1kprq7q8ja9ad6jphc-unit-script-toxvpn-pre-start (code=exited, status=0/SUCCESS)
  Process: 841 ExecStart=/nix/store/p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start (code=killed, signal=TERM)
 Main PID: 841 (code=killed, signal=TERM)
       IP: 0B in, 11.3K out
      CPU: 84ms

Mai 10 11:02:50 nixos p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start[841]: 51 / 64
Mai 10 11:03:00 nixos p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start[841]: 17 / 64
Mai 10 11:03:10 nixos p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start[841]: 63 / 64
Mai 10 11:03:20 nixos p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start[841]: 10 / 64
Mai 10 11:03:31 nixos p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start[841]: 44 / 64
Mai 10 11:03:41 nixos p3v792r3g8w7s5bbbrggyksv6nkb3aly-unit-script-toxvpn-start[841]: 41 / 64
Mai 10 11:03:50 nixos systemd[1]: toxvpn.service: start operation timed out. Terminating.
Mai 10 11:03:50 nixos systemd[1]: toxvpn.service: Failed with result 'timeout'.
Mai 10 11:03:50 nixos systemd[1]: Failed to start toxvpn daemon.
Mai 10 11:03:50 nixos systemd[1]: toxvpn.service: Consumed 84ms CPU time, received 0B IP traffic, sent 11.3K IP traffic.
[root@nixos:/etc/nixos]# 

one example for the manual start of the service:

[root@nixos:/etc/nixos]# systemctl start toxvpn
Job for toxvpn.service failed because a timeout was exceeded.
See "systemctl status toxvpn.service" and "journalctl -xe" for details.

[root@nixos:/etc/nixos]# echo $?
1

p.s. I hope that placing this request here is fine; if not please forgive my newbieness

Not familiar with this specific module. Do you know if it opens the necessary firewall ports?

I’m not sure and didn’t check; it’s most likely as you can see from the options

services.toxvpn.port
Description: 		

udp port for toxcore, port-forward to help with connectivity if you run many nodes behind one NAT
Default value: 		33445
Type: 		signed integer
Example value: 		Not given
Declared in: 		nixos/modules/services/networking/toxvpn.nix

I didn’t set it in configuration.nix.

It doesn’t seem to matter in “interactive” mode aka “toxvpn -i …”

setting the port explicitly in configuration.nix doesn’t help either

Somehow the problems have gone - thx to whomever did something in the background!

I’d like to mention that socat package is needed to control the socket for the service.

socat stdin /run/toxvpn/control

Perhaps it’s possible to setup a relationship between the packages.