Jump to content
Not connected, Your IP: 13.59.244.1
steven-seagull

ANSWERED Changing airvpn servers using opnsense and wireguard

Recommended Posts

I am using wireguard in opnsense as my vpn client. I have one instance wg0 configured, and multiple peers for different airvpn servers. Each peer has a different endpoint address.

I was under the impression, that if i change the peer for the wg0 instance and restart wireguard, i would connect to the given peer. This is not happening though, and i continue with the same session before the change.

For example, i am using peer which has endpoint as sarin.airservers.org. I then change to a different peer, with endpoint sg3.vpn.airdns.org. When i restart wireguard, i continue the connection to sarin.

Am i missing something? Any help would be great.

Thanks.

Share this post


Link to post

are you using a region/country or specific servers?

I just did a test, a country vs a specific server in that country and the private and presharekey are not the same neither is the Endpoint.

So I think you have to generate a new config file

Share this post


Link to post

I always thought that private/public key pair and pre-shared key are stored in the "Device". As long as you always choose the same "Device", you get the same keys.

Share this post


Link to post

Yes I think you are right if you use OpenVPN because that’s what I did to move from servers just change the ip. 

I just recently moved over to WireGuard and why my speeds are somewhat slow it’s working pretty good. 

I could be wrong but keep checking maybe staff will reply. 

Share this post


Link to post

Thanks for the replies so far. I just checked by downloading wireguard config from the generator, for a different server, but on the same device. As benfitita mentioned, the only difference is the endpoint. The key pair and preshared key are the same, as are other details.

Hoping for staff to respond. Thank you.

Share this post


Link to post

I figured out a way to do it. I'll leave it here in case someone else wants to do the same:

  • Disable wireguard in opnsense
  • Disconnect the session via airvpn's api explorer
  • Select a different wireguard peer in opnsense
  • Enable wireguard in opnsense

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

×
×
  • Create New...