maschwar77
I am using OpenVPN with the topology subnet option and I have two clients and one server. One of the clients, Meow, is supposed to get a static IP address. The other client, Lynx, should get a dynamic one. Here is the server configuration:
Server.conf:
port 1194
proto udp
dev tun
ca ca.crt
cert bast.crt
key bast.key
dh dh1024.pem
server 10.40.65.0 255.255.255.0
route 10.40.65.0 255.255.255.0 10.40.65.1
topology subnet
ifconfig-pool-persist ipp.txt
client-config-dir ccd
push "route 10.40.60.0 255.255.255.0 10.40.65.1"
client-to-client
float
keepalive 3 10
cipher AES-128-CBC
comp-lzo
max-clients 5
persist-key
persist-tun
status openvpn-status.log
verb 3
ccd/meow:
ifconfig-push 10.40.65.2 255.255.255.0
I've started fresh by deleting the ipp.txt file from ifconfig-pool-persist. When I test with Lynx, I get the address 10.40.65.2 and that is not a desired behavior. Meow is actually another server so it needs to get 10.40.65.2. Please tell me what I have missed or what I am doing wrong. I think that I might have to add an ifconfig-pool to set a range that starts higher than 10.40.65.2, like ifconfig-pool 10.40.65.10 10.40.65.253 for example. Thanks in advance.
janjust
if 'lynx' connects first it will get the first available IP address from the pool, which in your case is the .2 address; if you want to reserve an address for server 'Meow' then it is best to give it an address outside of the pool range.
thus your suggestion to move the pool range is indeed the best (if not only) option.