Jump to content
Not connected, Your IP: 3.142.12.240
Sign in to follow this  
efreeman

VPN safetly using .bat file (help)

Recommended Posts

route delete -p 0.0.0.0 192.168.67.2

route add -p 85.17.207.151 mask 255.255.255.255 192.168.67.2 metric 1

Using these two commands I understood that I may stop all outgoing traffic and only allow access to 85.17.207.151 (airvpn.org) for my client to be able to establish a connection.

Well it does stop all my traffic and it allows my airvpn client to connect up to the bit where i choose a server. It then sticks on the connecting page. If I then allow all traffic again:

route add 0.0.0.0 mask 0.0.0.0 192.168.67.2 metric 1

it is able to make a full connection then I can close all traffic again. My VPN will work as it should. (Other than this site shows me as offline?) I still have the ip of the server I chose when I check on whatismyip website.

So my question is: Why cant the client make the full connection? can it be fixed?

Share this post


Link to post

route delete -p 0.0.0.0 192.168.67.2

route add -p 85.17.207.151 mask 255.255.255.255 192.168.67.2 metric 1

Using these two commands I understood that I may stop all outgoing traffic and only allow access to 85.17.207.151 (airvpn.org) for my client to be able to establish a connection.

Hello!

That's correct, however please note that you will also lose the ability to communicate with devices in your home network and you will prevent permanently DNS resolution on your computer when not connected to the VPN. Also, be aware that option -p will make the route permanent, so it will survive a reboot. Most importantly, it will prevent any connection to any of our servers.

Well it does stop all my traffic and it allows my airvpn client to connect up to the bit where i choose a server.

It then sticks on the connecting page. If I then allow all traffic again:

route add 0.0.0.0 mask 0.0.0.0 192.168.67.2 metric 1

it is able to make a full connection then I can close all traffic again. My VPN will work as it should. (Other than this site shows me as offline?) I still have the ip of the server I chose when I check on whatismyip website.

That's normal: each Air server has an entry-IP and and an exit-IP address. The servers accept connections from OpenVPN client only on the entry-IP. In your case, you have the routing table with an exit-IP (Leonis'). Leonis entry-IP is 85.17.123.26. The Air client connects to airvpn.org to allow your login and display the list of servers (only if you have set in your hosts file resolution for airvpn.org), then launches OpenVPN which can't establish a connection (not even if you choose Leonis) because of the routing table.

Please check the central bottom box in our web pages (restart the browser if necessary): only if it's green your device is connected.

Kind regards

Share this post


Link to post

Thanks for the reply. I am happy to have the permanent option as I am on a virtual machine which is solely used in conjunction with this VPN. I just want it set up so that when I turn the VM on it will be allowed to ONLY connect to the VPN and make a proper connection without me having to open a .bat file to turn all connections back on and then off again after VPN is connected. I don't want the VM to have any other internet source at any time.

So I'm guessing I need to add a new route to allow openvpn to make the full connection. I tried:

route add -p 85.17.123.26 mask 255.255.255.255 192.168.67.2 metric 1

But it has no effect on the situation. I guess because I need to add a route for Openvpn to connect?

Could you suggest which routes I would need to add so that this method can work for me?

Thanks

Share this post


Link to post

Actually by adding

route add -p 85.17.123.26 mask 255.255.255.255 192.168.67.2 metric 1

It will allow the connection to complete but only on the lenois server. Although I have no internet access even though it is connected......

Share this post


Link to post

Actually by adding

route add -p 85.17.123.26 mask 255.255.255.255 192.168.67.2 metric 1

It will allow the connection to complete but only on the lenois server. Although I have no internet access even though it is connected......

Hello!

Yes, that route addition allows OpenVPN client connection to Leonis but prevents any communication inside the VPN.

Kind regards

Share this post


Link to post

Yes. So how can I allow communication inside also.....?

Hello!

You need to delete "route add -p 85.17.123.26 mask 255.255.255.255 192.168.67.2 metric 1"

To achieve your purpose to prevent leaks in case of unexpected VPN disconnection and prevent any leak while connected, you may set up the appropriate firewall rules in your VM (assuming that it's in bridge mode).

You may also consider to change the approach: connect your host machine to the VPN, connect the guest with NAT (instead of bridging). This will allow you to connect multiple VMs with just one Air account (used by the host). Finally, secure the connection with a firewall only on the host.

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...