I am newbie of openvpn, I just follow the "howto" of the document to create PKI key, server config & client config.
I created a key named common.crt and common.key. I can connect to server properly and tunnel perfect. However, If I copy this key files and the configuration of the client to another PC, then both of the two PC can connect properly.
My question is how can I let a key can only used by one PC per time. i.e. If client A use key common and it is online then at the same time client B use key common can not be connected or just force client A offline then client B online.
Thanks.
My Server Config
Code: Select all
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.1.108 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.1.1"
keepalive 10 120
comp-lzo
status openvpn-status.log
verb 4
My Client Config
Code: Select all
client
dev tun
proto udp
#remote 58.182.197.226 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert common.crt
key common.key
ns-cert-type server
comp-lzo
verb 3