0

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.

1 Answer 1

0

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 to server 192.168.56.0 255.255.252.0 so it will span to 192.168.58.0/24 subnet.

sipcalc 192.168.56.0 255.255.252.0
-[ipv4 : 192.168.56.0 255.255.252.0] - 0

[CIDR]
Host address            - 192.168.56.0
Host address (decimal)  - 3232249856
Host address (hex)      - C0A83800
Network address         - 192.168.56.0
Network mask            - 255.255.252.0
Network mask (bits)     - 22
Network mask (hex)      - FFFFFC00
Broadcast address       - 192.168.59.255
Cisco wildcard          - 0.0.3.255
Addresses in network    - 1024
Network range           - 192.168.56.0 - 192.168.59.255
Usable range            - 192.168.56.1 - 192.168.59.254

Also remove option route 192.168.58.0 255.255.255.0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .