Closed hidrarga closed 4 days ago
It takes less than 30s on a cube with this method (it was taking more than 60s with DNS resolution issues)
!testme
I've added some improvements for the firewall rules: when the VPN client is connecting, it provides some environmental variables, such as trusted_ip
OR trusted_ip6
variables, but not both at the same time, so I can only create a rule for IPv4 or IPv6... Actually, I don't know if that's a problem?
Otherwise, I could use the variables ifconfig_ipv6_remote
and route_vpn_gateway
but I'm not sure if they are valid for all clients?
What do you think of this PR @zamentur @alexAubin ?
!testme
(Ah yes that's listed in the doc you mention : https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/#environmental-variables )
Problem
Sometimes when the VPN client is restarting, the DNS resolution doesn't work anymore (although it works when the VPN is down). I don't know if that's a bug from OpenVPN or if we are missing something in the firewall rules or network configuration.
Solution
I'm using the environment variables provided by OpenVPN : https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/#environmental-variables
With this solution, we don't need to store IPv6 of the VPN server in a config variable, which makes the client connection much faster.
PR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)