Trying to set use ccd with openvpn 2.
I want some clients to get IP addresses on a separate subnet so their access to systems can be limited.
my server.conf file has these settings:
dev tun0
server 192.168.57.0 255.255.255.0
route 192.168.58.0 255.255.255.0
client-config-dir ccd
in /etc/openvpn/ccd/user1 I have:
ifconfig-push 192.168.58.9 192.168.58.10
I created a cert with common name user1.
I am able to connect but user1 never gets the 192.168.58.9 address.
Always picks up a 192.168.57.x address from the server pool.
What am I doing wrong or missing here?
Thanks.
Best Answer
server 192.168.57.0 255.255.255.0
tells your server that it has to operate on 192.168.57.0/24 subnet so it will never assign addresses from 192.168.58.0/24 subnet. You have to change netmask in server option toserver 192.168.56.0 255.255.252.0
so it will span to 192.168.58.0/24 subnet.Also remove option
route 192.168.58.0 255.255.255.0