jamesmcm / vopono

Run applications through VPN tunnels with temporary network namespaces
GNU General Public License v3.0
888 stars 46 forks source link

Vopono hangs and uses 100% cpu #143

Closed lebagvondouche closed 2 years ago

lebagvondouche commented 2 years ago

Hi , trying to use this with my custom OVPN file, the execution hangs and uses 100% CPU and never starts the program it should. Any inputs on this? Thanks!

`"USER@vader:~$ vopono -v exec --custom /etc/openvpn/ovpn.conf --protocol openvpn qbittorrent-nox 2022-03-10T11:12:49.888Z DEBUG vopono::util > Using config dir from $HOME config: /home/USER/.config 2022-03-10T11:12:49.888Z DEBUG vopono > pactl not found, will not set PULSE_SERVER 2022-03-10T11:12:49.888Z INFO vopono::util > Calling sudo for elevated privileges, current user will be used as default user 2022-03-10T11:12:49.888Z DEBUG vopono::util > Args: ["vopono", "-v", "exec", "--custom", "/etc/openvpn/ovpn.conf", "--protocol", "openvpn", "qbittorrent-nox"] 2022-03-10T11:12:50.007Z DEBUG vopono::util > Using config dir from $HOME config: /home/USER/.config 2022-03-10T11:12:50.007Z DEBUG vopono > pactl not found, will not set PULSE_SERVER 2022-03-10T11:12:50.007Z DEBUG vopono::util > Using config dir from $HOME config: /home/USER/.config 2022-03-10T11:12:50.010Z DEBUG vopono::util > Existing namespaces: [] 2022-03-10T11:12:50.010Z DEBUG vopono::util > Using config dir from $HOME config: /home/USER/.config 2022-03-10T11:12:50.011Z DEBUG vopono::util > Using config dir from $HOME config: /home/USER/.config 2022-03-10T11:12:50.011Z DEBUG vopono::exec > vopono config.toml: configuration property "firewall" not found 2022-03-10T11:12:50.011Z DEBUG vopono::exec > vopono config.toml: configuration property "postup" not found 2022-03-10T11:12:50.011Z DEBUG vopono::exec > vopono config.toml: configuration property "predown" not found 2022-03-10T11:12:50.011Z DEBUG vopono::exec > vopono config.toml: configuration property "user" not found 2022-03-10T11:12:50.011Z DEBUG vopono::exec > vopono config.toml: configuration property "dns" not found 2022-03-10T11:12:50.011Z DEBUG vopono::network_interface > ip addr 2022-03-10T11:12:50.015Z DEBUG vopono::exec > Interface: eth0 2022-03-10T11:12:50.019Z DEBUG vopono::util > Existing namespaces: [] 2022-03-10T11:12:50.019Z DEBUG vopono::util > ip netns add vopono_c_Ds76G5MVCxE 2022-03-10T11:12:50.025Z INFO vopono::netns > Created new network namespace: vopono_c_Ds76G5MVCxE 2022-03-10T11:12:50.030Z DEBUG vopono::util > Existing interfaces: 6: vethe2d85ac@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default link/ether 46:2d:64:90:8d:a0 brd ff:ff:ff:ff:ff:ff link-netnsid 1 inet6 fe80::442d:64ff:fe90:8da0/64 scope link valid_lft forever preferred_lft forever 8: vethe3ccd72@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default link/ether 7a:6b:79:39:af:e3 brd ff:ff:ff:ff:ff:ff link-netnsid 2 inet6 fe80::786b:79ff:fe39:afe3/64 scope link valid_lft forever preferred_lft forever 10: vethe4857e9@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default link/ether 4a:16:e2:f1:de:51 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet6 fe80::4816:e2ff:fef1:de51/64 scope link valid_lft forever preferred_lft forever

2022-03-10T11:12:50.032Z DEBUG vopono::util > Assigned IPs: [] 2022-03-10T11:12:50.033Z DEBUG vopono::netns > ip netns exec vopono_c_Ds76G5MVCxE ip addr add 127.0.0.1/8 dev lo 2022-03-10T11:12:50.040Z DEBUG vopono::netns > ip netns exec vopono_c_Ds76G5MVCxE ip link set lo up 2022-03-10T11:12:50.047Z DEBUG vopono::veth_pair > NetworkManager not detected running 2022-03-10T11:12:50.047Z DEBUG vopono::veth_pair > firewalld not detected running 2022-03-10T11:12:50.047Z DEBUG vopono::util > ip link add c_Ds76G5MVCxE_d type veth peer name c_Ds76G5MVCxE_s 2022-03-10T11:12:50.058Z DEBUG vopono::util > ip link set c_Ds76G5MVCxE_d up 2022-03-10T11:12:50.064Z DEBUG vopono::util > ip link set c_Ds76G5MVCxE_s netns vopono_c_Ds76G5MVCxE up 2022-03-10T11:12:50.090Z DEBUG vopono::util > ip addr add 10.200.1.1/24 dev c_Ds76G5MVCxE_d 2022-03-10T11:12:50.100Z DEBUG vopono::netns > ip netns exec vopono_c_Ds76G5MVCxE ip addr add 10.200.1.2/24 dev c_Ds76G5MVCxE_s 2022-03-10T11:12:50.112Z DEBUG vopono::netns > ip netns exec vopono_c_Ds76G5MVCxE ip route add default via 10.200.1.1 dev c_Ds76G5MVCxE_s 2022-03-10T11:12:50.119Z INFO vopono::netns > IP address of namespace as seen from host: 10.200.1.2 2022-03-10T11:12:50.119Z INFO vopono::netns > IP address of host as seen from namespace: 10.200.1.1 2022-03-10T11:12:50.119Z DEBUG vopono::util > iptables -t nat -A POSTROUTING -s 10.200.1.0/24 -o eth0 -j MASQUERADE 2022-03-10T11:12:50.123Z DEBUG vopono::util > iptables -I FORWARD -i c_Ds76G5MVCxE_d -o eth0 -j ACCEPT 2022-03-10T11:12:50.127Z DEBUG vopono::util > iptables -I FORWARD -o c_Ds76G5MVCxE_d -i eth0 -j ACCEPT 2022-03-10T11:12:50.130Z DEBUG vopono::util > sysctl -q net.ipv4.ip_forward=1 2022-03-10T11:12:50.133Z DEBUG vopono::dns_config > Setting namespace vopono_c_Ds76G5MVCxE DNS server to 8.8.8.8 2022-03-10T11:12:50.134Z INFO vopono::openvpn > Launching OpenVPN... 2022-03-10T11:12:50.134Z DEBUG vopono::openvpn > Detected IPv6 enabled in /sys/module/ipv6/parameters/disable 2022-03-10T11:12:50.135Z DEBUG vopono::openvpn > Found remotes: [Remote { host: Hostname("pool-1.prd.se.ovpn.com"), port: 1201, protocol: UDP }, Remote { host: Hostname("pool-1.prd.se.ovpn.com"), port: 1202, protocol: UDP }, Remote { host: Hostname("pool-2.prd.se.ovpn.com"), port: 1201, protocol: UDP }, Remote { host: Hostname("pool-2.prd.se.ovpn.com"), port: 1202, protocol: UDP }, Remote { host: Hostname("pool-3.prd.se.ovpn.com"), port: 1201, protocol: UDP }, Remote { host: Hostname("pool-3.prd.se.ovpn.com"), port: 1202, protocol: UDP }, Remote { host: Hostname("pool-4.prd.se.ovpn.com"), port: 1201, protocol: UDP }, Remote { host: Hostname("pool-4.prd.se.ovpn.com"), port: 1202, protocol: UDP }] 2022-03-10T11:12:50.135Z DEBUG vopono::netns > ip netns exec vopono_c_Ds76G5MVCxE openvpn --config /etc/openvpn/ovpn.conf --machine-readable-output --log /etc/netns/vopono_c_Ds76G5MVCxE/openvpn.log --pull-filter ignore block-outside-dns`

USER 14093 0.0 0.0 15976 2520 pts/2 Sl+ 12:12 0:00 vopono -v exec --custom /etc/openvpn/ovpn.conf --protocol openvpn qbittorrent-nox root 14098 0.0 0.0 9840 3092 pts/2 S+ 12:12 0:00 sudo -E vopono -v exec --custom /etc/openvpn/ovpn.conf --protocol openvpn qbittorrent-nox root 14099 99.7 0.0 16292 3344 pts/2 Rl+ 12:12 3:23 vopono -v exec --custom /etc/openvpn/ovpn.conf --protocol openvpn qbittorrent-nox root 14132 0.0 0.1 7096 4784 pts/2 S+ 12:12 0:00 openvpn --config /etc/openvpn/ovpn.conf --machine-readable-output --log /etc/netns/vopono_c_Ds76G5MVCxE/openvpn.log --pull-filter ignore block-outside-dns"

jamesmcm commented 2 years ago

Does this still occur? Could you try to read the openvpn.log file - i.e. etc/netns/vopono_c_Ds76G5MVCxE/openvpn.log when the above is running

ejuarezg commented 2 years ago

I'm also running into a similar issue with ProtonVPN and openvpn protocol. Here is my output:

 $ vopono -v exec 'popcorntime'
 2022-09-06T02:48:47.030Z DEBUG vopono_core::util > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:47.032Z DEBUG vopono_core::util > Cleaning dead lock files...
 2022-09-06T02:48:48.040Z DEBUG vopono_core::util::pulseaudio > Setting PULSE_SERVER to /run/user/1000/pulse/native
 2022-09-06T02:48:48.040Z INFO  vopono_core::util             > Calling sudo for elevated privileges, current user will be used as default user
 2022-09-06T02:48:48.040Z DEBUG vopono_core::util             > Args: ["vopono", "-v", "exec", "popcorntime"]
[sudo] password for me: 
 2022-09-06T02:48:52.673Z DEBUG vopono_core::util > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:52.673Z DEBUG vopono_core::util > Cleaning dead lock files...
 2022-09-06T02:48:53.680Z DEBUG vopono_core::util::pulseaudio > Setting PULSE_SERVER to /run/user/1000/pulse/native
 2022-09-06T02:48:53.680Z DEBUG vopono_core::util             > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.686Z DEBUG vopono_core::util             > Existing namespaces: []
 2022-09-06T02:48:53.686Z DEBUG vopono_core::util             > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.686Z DEBUG vopono_core::util             > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "custom_config" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "custom_netns_name" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "open_hosts" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "allow_host_access" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "postup" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "predown" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "dns" not found
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: enum Protocol does not have variant constructor OpenVPN
 2022-09-06T02:48:53.686Z DEBUG vopono_core::util             > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.686Z DEBUG vopono::exec                  > vopono config.toml: configuration property "interface" not found
 2022-09-06T02:48:53.686Z DEBUG vopono_core::network::network_interface > ip addr
 2022-09-06T02:48:53.687Z DEBUG vopono::exec                            > Interface: enp3s0
 2022-09-06T02:48:53.687Z DEBUG vopono_core::util                       > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.688Z INFO  vopono_core::util                       > Chosen config: /home/me/.config/vopono/proton/openvpn/united_states-us.ovpn
 2022-09-06T02:48:53.688Z DEBUG vopono_core::util                       > Existing namespaces: []
 2022-09-06T02:48:53.688Z DEBUG vopono_core::util                       > ip netns add vopono_proton_united_states-us
 2022-09-06T02:48:53.689Z INFO  vopono_core::network::netns             > Created new network namespace: vopono_proton_united_states-us
 2022-09-06T02:48:53.690Z DEBUG vopono_core::util                       > Existing interfaces: 
 2022-09-06T02:48:53.690Z DEBUG vopono_core::util                       > Assigned IPs: []
 2022-09-06T02:48:53.690Z DEBUG vopono_core::network::netns             > ip netns exec vopono_proton_united_states-us ip addr add 127.0.0.1/8 dev lo
 2022-09-06T02:48:53.692Z DEBUG vopono_core::network::netns             > ip netns exec vopono_proton_united_states-us ip link set lo up
STATE      CONNECTIVITY  WIFI-HW  WIFI      WWAN-HW  WWAN    
connected  full          missing  disabled  missing  enabled 
 2022-09-06T02:48:53.703Z DEBUG vopono_core::network::veth_pair         > Detected NetworkManager running
 2022-09-06T02:48:53.703Z DEBUG vopono_core::network::veth_pair         > NetworkManager detected, adding ted_states-us_d to unmanaged devices
 2022-09-06T02:48:53.703Z DEBUG vopono_core::network::veth_pair         > Appending to existing NetworkManager config file: /etc/NetworkManager/conf.d/unmanaged.conf
 2022-09-06T02:48:53.703Z DEBUG vopono_core::util                       > nmcli connection reload
 2022-09-06T02:48:53.710Z DEBUG vopono_core::network::veth_pair         > firewalld not detected running
 2022-09-06T02:48:53.710Z DEBUG vopono_core::util                       > ip link add ted_states-us_d type veth peer name ted_states-us_s
 2022-09-06T02:48:53.718Z DEBUG vopono_core::util                       > ip link set ted_states-us_d up
 2022-09-06T02:48:53.720Z DEBUG vopono_core::util                       > ip link set ted_states-us_s netns vopono_proton_united_states-us up
 2022-09-06T02:48:53.752Z DEBUG vopono_core::util                       > ip addr add 10.200.1.1/24 dev ted_states-us_d
 2022-09-06T02:48:53.754Z DEBUG vopono_core::network::netns             > ip netns exec vopono_proton_united_states-us ip addr add 10.200.1.2/24 dev ted_states-us_s
 2022-09-06T02:48:53.755Z DEBUG vopono_core::network::netns             > ip netns exec vopono_proton_united_states-us ip route add default via 10.200.1.1 dev ted_states-us_s
 2022-09-06T02:48:53.757Z INFO  vopono_core::network::netns             > IP address of namespace as seen from host: 10.200.1.2
 2022-09-06T02:48:53.757Z INFO  vopono_core::network::netns             > IP address of host as seen from namespace: 10.200.1.1
 2022-09-06T02:48:53.757Z DEBUG vopono_core::util                       > nft add table inet vopono_nat
 2022-09-06T02:48:53.786Z DEBUG vopono_core::util                       > nft add chain inet vopono_nat postrouting { type nat hook postrouting priority 100 ; }
 2022-09-06T02:48:53.840Z DEBUG vopono_core::util                       > nft add rule inet vopono_nat postrouting oifname enp3s0 ip saddr 10.200.1.0/24 counter masquerade
 2022-09-06T02:48:53.898Z DEBUG vopono_core::util                       > nft add table inet vopono_bridge
 2022-09-06T02:48:53.899Z DEBUG vopono_core::util                       > nft add chain inet vopono_bridge forward { type filter hook forward priority -10 ; }
 2022-09-06T02:48:53.901Z DEBUG vopono_core::util                       > nft add rule inet vopono_bridge forward iifname ted_states-us_d oifname enp3s0 counter accept
 2022-09-06T02:48:53.902Z DEBUG vopono_core::util                       > nft add rule inet vopono_bridge forward oifname ted_states-us_d iifname enp3s0 counter accept
 2022-09-06T02:48:53.904Z DEBUG vopono_core::util                       > sysctl -q net.ipv4.ip_forward=1
 2022-09-06T02:48:53.904Z DEBUG vopono_core::util                       > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.904Z DEBUG vopono_core::config::vpn                > Read auth file: /home/me/.config/vopono/proton/openvpn/auth.txt
 2022-09-06T02:48:53.904Z DEBUG vopono_core::network::dns_config        > Setting namespace vopono_proton_united_states-us DNS server to 8.8.8.8
 2022-09-06T02:48:53.905Z DEBUG vopono_core::util                       > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.905Z DEBUG vopono_core::util                       > Using config dir from $HOME config: /home/me/.config
 2022-09-06T02:48:53.905Z INFO  vopono_core::network::openvpn           > Launching OpenVPN...
 2022-09-06T02:48:53.905Z DEBUG vopono_core::network::openvpn           > Detected IPv6 enabled in /sys/module/ipv6/parameters/disable
 2022-09-06T02:48:53.906Z DEBUG vopono_core::network::openvpn           > Found remotes: [Remote { host: IPv4(143.244.44.186), port: 51820, protocol: UDP }, Remote { host: IPv4(146.70.72.162), port: 4569, protocol: UDP }, Remote { host: IPv4(89.187.180.27), port: 1194, protocol: UDP }, Remote { host: IPv4(89.187.175.129), port: 51820, protocol: UDP }, Remote { host: IPv4(107.181.245.74), port: 5060, protocol: UDP }, Remote { host: IPv4(212.102.44.161), port: 4569, protocol: UDP }, Remote { host: IPv4(45.87.214.210), port: 5060, protocol: UDP }, Remote { host: IPv4(37.120.215.242), port: 80, protocol: UDP }, Remote { host: IPv4(89.187.164.246), port: 1194, protocol: UDP }, Remote { host: IPv4(156.146.51.78), port: 4569, protocol: UDP }, Remote { host: IPv4(84.17.63.8), port: 51820, protocol: UDP }, Remote { host: IPv4(45.134.140.33), port: 51820, protocol: UDP }, Remote { host: IPv4(193.37.254.66), port: 1194, protocol: UDP }, Remote { host: IPv4(138.199.35.97), port: 5060, protocol: UDP }, Remote { host: IPv4(45.134.140.33), port: 51820, protocol: UDP }, Remote { host: IPv4(37.120.244.50), port: 1194, protocol: UDP }, Remote { host: IPv4(89.187.178.173), port: 80, protocol: UDP }, Remote { host: IPv4(138.199.35.97), port: 1194, protocol: UDP }, Remote { host: IPv4(89.187.180.14), port: 4569, protocol: UDP }, Remote { host: IPv4(45.87.214.210), port: 5060, protocol: UDP }, Remote { host: IPv4(89.187.170.135), port: 4569, protocol: UDP }, Remote { host: IPv4(193.37.254.66), port: 4569, protocol: UDP }, Remote { host: IPv4(193.148.18.66), port: 51820, protocol: UDP }, Remote { host: IPv4(156.146.54.97), port: 5060, protocol: UDP }, Remote { host: IPv4(156.146.51.78), port: 4569, protocol: UDP }, Remote { host: IPv4(45.87.214.210), port: 5060, protocol: UDP }, Remote { host: IPv4(185.230.126.18), port: 80, protocol: UDP }, Remote { host: IPv4(84.17.63.8), port: 4569, protocol: UDP }, Remote { host: IPv4(91.219.212.226), port: 4569, protocol: UDP }, Remote { host: IPv4(185.247.68.50), port: 80, protocol: UDP }, Remote { host: IPv4(45.152.182.130), port: 5060, protocol: UDP }, Remote { host: IPv4(91.219.212.194), port: 80, protocol: UDP }, Remote { host: IPv4(89.187.170.135), port: 51820, protocol: UDP }, Remote { host: IPv4(45.152.182.130), port: 51820, protocol: UDP }, Remote { host: IPv4(146.70.72.130), port: 51820, protocol: UDP }, Remote { host: IPv4(89.38.227.138), port: 4569, protocol: UDP }, Remote { host: IPv4(193.148.18.82), port: 1194, protocol: UDP }, Remote { host: IPv4(89.187.180.40), port: 51820, protocol: UDP }, Remote { host: IPv4(89.187.170.135), port: 51820, protocol: UDP }, Remote { host: IPv4(91.219.212.218), port: 1194, protocol: UDP }, Remote { host: IPv4(45.134.140.33), port: 4569, protocol: UDP }, Remote { host: IPv4(89.187.178.173), port: 51820, protocol: UDP }, Remote { host: IPv4(89.187.175.129), port: 5060, protocol: UDP }, Remote { host: IPv4(107.181.245.74), port: 4569, protocol: UDP }, Remote { host: IPv4(156.146.51.65), port: 1194, protocol: UDP }, Remote { host: IPv4(212.102.44.166), port: 5060, protocol: UDP }, Remote { host: IPv4(89.187.180.14), port: 5060, protocol: UDP }, Remote { host: IPv4(91.219.212.210), port: 5060, protocol: UDP }, Remote { host: IPv4(45.134.140.33), port: 5060, protocol: UDP }, Remote { host: IPv4(193.148.18.98), port: 1194, protocol: UDP }, Remote { host: IPv4(45.152.182.146), port: 1194, protocol: UDP }, Remote { host: IPv4(45.87.214.194), port: 1194, protocol: UDP }, Remote { host: IPv4(69.10.63.242), port: 4569, protocol: UDP }, Remote { host: IPv4(193.148.18.34), port: 51820, protocol: UDP }, Remote { host: IPv4(146.70.72.162), port: 80, protocol: UDP }, Remote { host: IPv4(146.70.58.130), port: 51820, protocol: UDP }, Remote { host: IPv4(91.219.212.226), port: 51820, protocol: UDP }, Remote { host: IPv4(89.187.175.132), port: 5060, protocol: UDP }, Remote { host: IPv4(143.244.44.186), port: 1194, protocol: UDP }, Remote { host: IPv4(209.95.56.120), port: 51820, protocol: UDP }, Remote { host: IPv4(185.247.68.50), port: 80, protocol: UDP }, Remote { host: IPv4(89.38.227.138), port: 80, protocol: UDP }, Remote { host: IPv4(89.187.180.40), port: 1194, protocol: UDP }, Remote { host: IPv4(89.187.180.14), port: 80, protocol: UDP }]
 2022-09-06T02:48:53.906Z DEBUG vopono_core::network::netns             > ip netns exec vopono_proton_united_states-us openvpn --config /home/me/.config/vopono/proton/openvpn/united_states-us.ovpn --machine-readable-output --log /home/me/.config/vopono/logs/vopono_proton_united_states-us_openvpn.log --auth-user-pass /home/me/.config/vopono/proton/openvpn/auth.txt --pull-filter ignore block-outside-dns
 2022-09-06T02:48:53.913Z DEBUG vopono_core::network::openvpn           > 1662432533.913713 40 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-256-CBC' to --data-ciphers or change --cipher 'AES-256-CBC' to --data-ciphers-fallback 'AES-256-CBC' to silence this warning.
 2022-09-06T02:48:53.913Z DEBUG vopono_core::network::openvpn           > 1662432533.913853 40 WARNING: file '/home/me/.config/vopono/proton/openvpn/auth.txt' is group or others accessible
 2022-09-06T02:48:53.913Z DEBUG vopono_core::network::openvpn           > 1662432533.913865 1 OpenVPN 2.5.7 [git:makepkg/a0f9a3e9404c8321+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 31 2022
 2022-09-06T02:48:53.913Z DEBUG vopono_core::network::openvpn           > 1662432533.913881 1 library versions: OpenSSL 1.1.1q  5 Jul 2022, LZO 2.10
 2022-09-06T02:48:53.914Z DEBUG vopono_core::network::openvpn           > 1662432533.914603 14000002 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:48:53.914Z DEBUG vopono_core::network::openvpn           > 1662432533.914611 14000002 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:48:53.914Z DEBUG vopono_core::network::openvpn           > 1662432533.914704 1 TCP/UDP: Preserving recently used remote address: [AF_INET]84.17.63.8:4569
 2022-09-06T02:48:53.914Z DEBUG vopono_core::network::openvpn           > 1662432533.914725 2b000003 Socket Buffers: R=[212992->212992] S=[212992->212992]
 2022-09-06T02:48:53.914Z DEBUG vopono_core::network::openvpn           > 1662432533.914729 1 UDP link local: (not bound)
 2022-09-06T02:48:53.914Z DEBUG vopono_core::network::openvpn           > 1662432533.914732 1 UDP link remote: [AF_INET]84.17.63.8:4569
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291458 1 Server poll timeout, restarting
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291547 1 SIGUSR1[soft,server_poll] received, process restarting
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291748 14000002 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291753 14000002 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291830 1 TCP/UDP: Preserving recently used remote address: [AF_INET]89.187.180.14:4569
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291853 2b000003 Socket Buffers: R=[212992->212992] S=[212992->212992]
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291857 1 UDP link local: (not bound)
 2022-09-06T02:49:13.291Z DEBUG vopono_core::network::openvpn           > 1662432553.291860 1 UDP link remote: [AF_INET]89.187.180.14:4569
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821314 1 Server poll timeout, restarting
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821409 1 SIGUSR1[soft,server_poll] received, process restarting
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821594 14000002 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821599 14000002 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821669 1 TCP/UDP: Preserving recently used remote address: [AF_INET]193.148.18.82:1194
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821701 2b000003 Socket Buffers: R=[212992->212992] S=[212992->212992]
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821705 1 UDP link local: (not bound)
 2022-09-06T02:49:33.821Z DEBUG vopono_core::network::openvpn           > 1662432573.821708 1 UDP link remote: [AF_INET]193.148.18.82:1194
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506157 1 Server poll timeout, restarting
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506259 1 SIGUSR1[soft,server_poll] received, process restarting
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506460 14000002 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506465 14000002 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506541 1 TCP/UDP: Preserving recently used remote address: [AF_INET]37.120.215.242:80
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506564 2b000003 Socket Buffers: R=[212992->212992] S=[212992->212992]
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506569 1 UDP link local: (not bound)
 2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn           > 1662432593.506582 1 UDP link remote: [AF_INET]37.120.215.242:80
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777477 1 Server poll timeout, restarting
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777558 1 SIGUSR1[soft,server_poll] received, process restarting
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777767 14000002 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777773 14000002 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777844 1 TCP/UDP: Preserving recently used remote address: [AF_INET]146.70.72.162:4569
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777874 2b000003 Socket Buffers: R=[212992->212992] S=[212992->212992]
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777879 1 UDP link local: (not bound)
 2022-09-06T02:50:13.777Z DEBUG vopono_core::network::openvpn           > 1662432613.777882 1 UDP link remote: [AF_INET]146.70.72.162:4569
jamesmcm commented 2 years ago

The hanging is due to OpenVPN not connecting to the remote server:

2022-09-06T02:49:53.506Z DEBUG vopono_core::network::openvpn > 1662432593.506157 1 Server poll timeout, restarting

Could you please try to look at the log in ~/.config/vopono/logs whilst it is running?

I just tested the US free ProtonVPN free server and it works for me.

Also check that you use the OpenVPN username and password, not your ProtonVPN one when running vopono sync. i.e. the OpenVPN username will be something like vpkLH2v7njIZr70T88h9FsIa

ejuarezg commented 2 years ago

I apologize for the trouble. It looks like ufw was the culprit. Disabling it before using vopono fixed my issue.

Do you by any chance know how I would automate it so that ufw is disabled when using vopono and enabled after I'm done?

jamesmcm commented 2 years ago

You could add it to a bash script, unfortunately atm vopono only has support for a post-up script, not a pre-up one which would help here.

I'll try to take a look if we can add a temporary exception for the network interface like we do for NetworkManager interface management, but I definitely wouldn't want vopono to disable the entire firewall (even temporarily) by default.

ejuarezg commented 2 years ago

Yes, I starting using a short bash script. Regardless, thank you for your work.

jamesmcm commented 2 years ago

No problem!