Zxurian 3 Posted ... I'm working with a headless ubuntu server right now, so attempting to set everything up via ssh. I've installed openvpn, configured airvpn using a config file per your docs, downloaded, and run "openvpn AirVPN_America_UDP-443.ovpn", and it appears to have properly setup the vpn, though it didn't return me back to a prompt. I opened a separate shell to the server, and did a curl request to confirm that it was going through airvpn, and the ip return did indicate that. A few questions.1) In my original shell window, how do I get back to a prompt? 2) When I setup the configuration file, I select "America" as server choice. How does the setup determine which server to connect to when I run the connection command? 3) Once the vpn is running, how do I close the vpn if need be? Quote Share this post Link to post
Staff 9972 Posted ... I'm working with a headless ubuntu server right now, so attempting to set everything up via ssh. I've installed openvpn, configured airvpn using a config file per your docs, downloaded, and run "openvpn AirVPN_America_UDP-443.ovpn", and it appears to have properly setup the vpn, though it didn't return me back to a prompt. I opened a separate shell to the server, and did a curl request to confirm that it was going through airvpn, and the ip return did indicate that. A few questions.1) In my original shell window, how do I get back to a prompt? Hello! You can't without interrupting OpenVPN. Install "screen", launch a screen and run OpenVPN from inside the screen. Detach the screen by pressing CTRL+A, then pressing D ("D"etach). You can resume the screen with screen -r You can see the screens list (you can open as many screen as you wish) with screen -ls See "man screen" to get full advantage of this powerful tool. 2) When I setup the configuration file, I select "America" as server choice. How does the setup determine which server to connect to when I run the connection command? Every 300 seconds the control system performs many measurements then inserts observed parameters (such as latency between every node in the designated area, available bandwidth, packet loss, servers status and more) in a formula which returns a score. The higher the score, the "healthier" the server is. The server with the highest score is the "best" server. The domain name record for that zone is then updated, if necessary, to resolve to the entry-IP address of that best server. TTL is 5 minutes. You can anytime see the best server for every area in the right tables of the servers monitor (click "Status" from the upper menu). 3) Once the vpn is running, how do I close the vpn if need be? A graceful kill is recommended. Do not kill the screen in which OpenVPN is running, because in that case OpenVPN would be prevented to notify our servers of the disconnection (causing a 60 seconds delay in account unlocking if the connection is over UDP: being UDP connectionless, the server has no way to acknowledge a disconnection, so it will consider the client disconnected only after the ping timeout). Additionally, a non graceful kill can prevent OpenVPN to restore your system previous routing table. You can gracefully kill OpenVPN with a simple kill command, or by pressing CTRL-C from inside the screen where OpenVPN is running. Kind regards Quote Share this post Link to post
Zxurian 3 Posted ... Thank you for your answers 2) When I setup the configuration file, I select "America" as server choice. How does the setup determine which server to connect to when I run the connection command? Every 300 seconds the control system performs many measurements then inserts observed parameters (such as latency between every node in the designated area, available bandwidth, packet loss, servers status and more) in a formula which returns a score. The higher the score, the "healthier" the server is. The server with the highest score is the "best" server. The domain name record for that zone is then updated, if necessary, to resolve to the entry-IP address of that best server. TTL is 5 minutes. You can anytime see the best server for every area in the right tables of the servers monitor (click "Status" from the upper menu). as I said, I'm running via ssh, so I have no menus that I can click on, but from what I understand you said, while openvpn is running, every 5 minutes it will cycle through the server list and always pick the best one? as a follow up question, is there a way to have openvpn pick a random server from the list upon startup? Quote Share this post Link to post
Staff 9972 Posted ... as I said, I'm running via ssh, so I have no menus that I can click on, but from what I understand you said, Hello! It does not matter at all, just use lynx. Most of our site pages are perfectly readable in text mode. And the menus are perfectly selectable without a mouse and a pointer. Example: lynx https://airvpn.org/status every 5 minutes it will cycle through the server list and always pick the best one? No, it's the DNS record that is updated (if necessary). OpenVPN will not disconnect without a command from you. as a follow up question, is there a way to have openvpn pick a random server from the list upon startup? Yes, please generate a file with the remote-random directive in the following way: - click "Advanced Mode"- tick "Resolved hosts in .ovpn file"- tick "All servers for area or region" In this way a configuration file that will cause OpenVPN to rotate randomly (at each connection) between all the servers of the selected area will be generated (for this operation: yes, you will need a graphical environment - then upload the configuration to your server). Kind regards Quote Share this post Link to post