Assign dynamic IP to clients

Scripts to manage certificates or generate config files

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

Post Reply
brenker
OpenVpn Newbie
Posts: 9
Joined: Sat Nov 10, 2012 8:31 pm

Assign dynamic IP to clients

Post by brenker » Mon Jan 21, 2013 5:32 am

I will try my best to explain. Right now I am testing with two computers.

Computer 1 connects first and is assigned an IP of 10.5.1.6
Computer 2 connects after Computer 1 and is assigned an IP of 10.5.1.10

When I disconnect both computers from VPN, I reconnect Computer 2 first this time and it's being assigned the same IP 10.5.1.10. I am trying to make it so that Computer 2 is assigned 10.5.1.6 since Computer 1 is no longer connected to the VPN.

port 4000
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.5.1.0 255.255.255.0
push "dhcp-option DNS 8.8.8.4"
push "dhcp-option DNS 8.8.8.8"
push "comp-lzo"
push "redirect-gateway def1"
comp-lzo
cipher none
auth none
no-replay
no-iv
tun-mtu 1500
verb 2
status openvpn-status.log
ping 10
ping-exit 60
push "ping 10"
push "ping-exit 60"

Post Reply