Page 1 of 1

Multiple clients with redirect-gateway

Posted: Thu Jun 02, 2011 8:02 pm
by Raven813
Used Bepop's config(thanks) from, topic7806.html, on server 2008 R2 and Windows 7 client. Worked perfectly in one machine, but,
I would like to add another connection, on the same LAN. I have created a second key, but it gives out the same Internal IP address to both client machines. It then "kills" the connection. Technically, it is still connected, but both machines will not work at the same time.

Not particularly picky as far as a solution goes, giving individual static IPs or DCHP, as long as it works!

Quick rundown on setup.
OpenVPN 2.2 on Windows Server 2008 R2 - In a colocation with 5 public IPs. I made sure and asked the service provider if VPN's are ok
Client on Windows 7 64 bit

Here are my configs, It looks a little different from Bebop's config because I was searching through solutions, but I couldn't put the two together. Right now, this config is working. If I might have butchered it, sorry.

Server

Code: Select all

## server.ovpn ##

port 1194
proto udp
dev tun

ca ca.crt
cert server.crt
key server.key
dh dh1024.pem

server 10.8.0.0 255.255.255.0

ifconfig-pool-persist ipp.txt
client-config-dir ccd

push "route XXX.XXX.XXX.8 255.255.248.0"
push "dhcp-option WINS XXX.XXX.XXX.10"
push "dhcp-option DNS 76.73.0.2"
push "dhcp-option DOMAIN server.local"
push "redirect-gateway def1"

keepalive 10 120
client-to-client
comp-lzo

persist-key
persist-tun

status openvpn-status.log
verb 4

Client

Code: Select all

## client.ovpn ##
client
proto udp
dev tun
remote XXX.XXX.XXX.10 1194

resolv-retry infinite
nobind
persist-key
persist-tun

ca ca.crt
cert client.crt
key client.key
ns-cert-type server

comp-lzo
verb 4
explicit-exit-notify 2
ping 10
ping-restart 60

route method exe
route delay 2

#register-dns
Any help would be much appreciated.
Thank you,
Ryan

Re: Multiple clients with redirect-gateway

Posted: Thu Jun 02, 2011 8:59 pm
by janjust
make sure each client has their separate client.crt and client.key files (I'd suggest renaming them to client1.{crt,key} and client2.{crt,key}.

also, for debugging purposes, comment out
ifconfig-pool-persist
as it sometimes has unintended side-effects.

Re: Multiple clients with redirect-gateway

Posted: Thu Jun 02, 2011 10:34 pm
by Raven813
I got it to work. It was a dumb mistake. I was creating the clients with the same credential.

Stepping away and not thinking about OpenVPN, suddenly things just click. :)