Jump to content
Not connected, Your IP: 18.189.157.124
Sign in to follow this  
Zxurian

configuring and using AirVPN via ssh

Recommended Posts

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?

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...