Hi,
I have a configuration for VPN tunnel with authentication certificate-based and also username/password-based authentication enabled.
But user can log in with any valid username, and given any valid certificates.
So my question is ....... How do I make sure that client1's certificate can only be used with the username "client1"? How to use the CN from the user cert as the login name (username)?
I looked in the manual but I did not come to a solution. Is there any options for this ?
I attach configuration file
config file server.conf
tls-server
server 10.20.1.0 255.255.255.0
push "route 30.1.0.0 255.255.255.0"
dev tun
proto udp
port 1194
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
comp-lzo
user nobody
group nogroup
persist-tun
persist-key
tls-auth ta.key 0
plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
#username-as-common-name
verb 3
config file client.conf
tls-client
pull
remote 192.168.1.102
nobind
dev tun
proto udp
port 1194
ca ca.crt
cert klient.crt
key klient.key
comp-lzo
user nobody
group nogroup
persist-tun
persist-key
verb 3
#tls-remote server
verify-x509-name server name
remote-cert-tls server
#ns-cert-type server
tls-auth ta.key 1
auth-user-pass
Thank you in advance for reply