"What I am ultimately trying to do is get say 192.168.1.5 to go via vpn 1 and 192.168.1.6 to go via vpn 2. Easy by simply using policy rules to redirect internet traffic but I cant get the second vpn to connect without disconnecting the first one."
I would like to do this too - and have been trying for years - but keep being confronted by the same issue.
Let's keep it simple: I use Astrill but I can also use TorGuard - both well known - both allow multiple logins.
I want two VPN Clients connected 24x7
Maybe the secret is using Exclusive DNS. For testing purposes, I am willing to limit the test to just one device (per tunnel).
Do I need to use a script or can Merlin 380.68 handle that from the GUI using Policy Routing?
@princi ,
I have a recent story to add on to what
@Martineau posted
here
On my pfSense applicance, I have two OpenVPN clients configured with firewall rules set to route connections from specific clients and domain names thru specific VPN clients.
I recently added a third OpenVPN client and created firewall rules to route certain traffic to this tunnel.
It worked most of the time.
Sometimes though, the second and third OpenVPN clients had the same Virtual Address. This causes my selective routing firewall rules to not work. To fix, I had to bounce either the second or third OpenVPN client until it got a unique Virtual IP Address e.g. 10.8.0.1. My provider is TorGuard.
How can two OpenVPN clients get the same Virtual Address? How to prevent?
If I just have two OpenVPN clients running at a time, everything works fine. Adding the third OpenVPN client causes the issue.
I went back and looked at the VPN providers specs (changed recently for OpenVPN 2.4). I changed the port configuration and the encryption assigned to that port number on each client. From the specs table, this should ensure that each client gets a virtual IP address that is on a different subnet. Snip below
Port Protocol
Subnet DNS Data Encryption Data Authentication (for signing packets) TLS Handshake Diffie-Hellman (session key)
443 UDP
10.9.x.x 10.9.0.1 cipher BF-CBC* cipher AES-128-GCM:AES-256-GCM:AES-256-CBC** HMAC-SHA1 2048 bit RSA 2048 bit
443 TCP
10.8.x.x 10.8.0.1 cipher BF-CBC* cipher AES-128-GCM:AES-256-GCM:AES-256-CBC** HMAC-SHA1 2048 bit RSA 2048 bit
80 UDP
10.22.x.x 10.22.0.1 cipher AES-128-CBC* cipher AES-128-GCM:AES-256-GCM:AES-256-CBC:BF-CBC**
I have had no more issues since making the change!