Page 1 of 1

Fixed IP with multiple openvpn instances (load balancing) ?

Posted: Mon Sep 12, 2011 5:48 pm
by danny70437
Hi,

because of about 150 VPN connections, we have to run 4 instances of openvpn
on one 4-core server. Each instance listen to a separate UDP port and works with
a separate IP-range like described in http://openvpn.net/index.php/open-sourc ... oadbalance

But how can I defined a fix IP with this setup ? Inside the ccd (client-config-dir) I'm able
to create certificate dependent files - but dependent on the port the client connects to
(my client.ovpn uses the remote-random option !), the IP range changes ... and the
fixed predefined IP doesn't work anymore.

server-instance1.conf: server 10.8.0.0 255.255.240.0
server-instance2.conf: server 10.8.16.0 255.255.240.0
server-instance3.conf: server 10.8.32.0 255.255.240.0
server-instance4.conf: server 10.8.48.0 255.255.240.0

ccd/myclient_name
# this matches only, if the client connects to instance1
ifconfig-push 10.8.1.1 10.8.1.2

Is there a way to run the 4 instances on the SAME IP-Range ?
I would not like to define 4 IP-Adresses vor ONE client.

Kind regards
Danny

Re: Fixed IP with multiple openvpn instances (load balancing

Posted: Tue Sep 13, 2011 9:35 am
by maikcat
>Is there a way to run the 4 instances on the SAME IP-Range ?

i dont think so...

your problem is mostly routing problem not openvpn one...

what is your problem when your client gets a different ip?

also

if you use 4 instances of openvpn server you can create 4 different ccd files(in different locations)..

Michael.

Re: Fixed IP with multiple openvpn instances (load balancing

Posted: Tue Sep 13, 2011 9:45 am
by danny70437
> what is your problem when your client gets a different ip?

I would like to create client dependent firewall configuration.
So, i would be nice, if i could create a 1:1 relation between
client and the IP.

Also, we have a squid proxy running - dependent on the client (means
client IP address), we have some policies (allow/deny) in the squid-proxy.

Kind regards
Danny