Fixed IP with multiple openvpn instances (load balancing) ?

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
danny70437
OpenVpn Newbie
Posts: 3
Joined: Fri Sep 09, 2011 5:25 pm

Fixed IP with multiple openvpn instances (load balancing) ?

Post by danny70437 » Mon Sep 12, 2011 5:48 pm

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

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Fixed IP with multiple openvpn instances (load balancing

Post by maikcat » Tue Sep 13, 2011 9:35 am

>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.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

danny70437
OpenVpn Newbie
Posts: 3
Joined: Fri Sep 09, 2011 5:25 pm

Re: Fixed IP with multiple openvpn instances (load balancing

Post by danny70437 » Tue Sep 13, 2011 9:45 am

> 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

Post Reply