Deactivate Users from OpenVPN Server

Scripts to manage certificates or generate config files
Post Reply
kaushalshriyan
OpenVpn Newbie
Posts: 11
Joined: Thu Sep 08, 2016 9:43 am

Deactivate Users from OpenVPN Server

Post by kaushalshriyan » Fri Oct 02, 2020 10:46 am

Hi,

I am running openvpn-2.4.9-1.el7.x86_64 on CentOS Linux release 7.8.2003 (Core) server. I have a specific question regarding disabling or deactivating VPN users once they leave the organization. Is there a method to revoke OpenVPN users from the command line?

I will appreciate if someone can pitch in for help. Thanks in Advance.

Best Regards,

Kaushal

300000
OpenVPN Super User
Posts: 289
Joined: Tue May 01, 2012 9:30 pm

Re: Deactivate Users from OpenVPN Server

Post by 300000 » Fri Oct 02, 2020 11:55 am

you need to use authentication on user name and password after than you need to user certificate on all user , everybody have a certificate and use revocation check list to disable or enable user on demand , if user base large it is nightmare to management huge number you need to keep certificates on secure

kaushalshriyan
OpenVpn Newbie
Posts: 11
Joined: Thu Sep 08, 2016 9:43 am

Re: Deactivate Users from OpenVPN Server

Post by kaushalshriyan » Fri Oct 02, 2020 4:45 pm

Thanks for the reply. I will appreciate if you can point me to the document to add username password to the below mentioned configuration.

Server config

server 10.8.0.0 255.255.255.0
verb 3
key /etc/openvpn/server.key
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
dh /etc/openvpn/dh.pem
keepalive 10 120
persist-key
persist-tun
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "route 192.168.0.0 255.255.255.0"
duplicate-cn
user nobody
group nobody
proto tcp
port 1198
dev tun
status /var/log/openvpn-status.log 60
status-version 2
log-append openvpn.log



Client config

dev tun
proto tcp
remote 213.117.215.12 1198
cipher AES-256-GCM
auth SHA1
resolv-retry infinite
nobind
persist-key
persist-tun
client
verb 3
key mukesh.key
cert mukesh.crt
ca ca.crt


Thanks in Advance.

Best Regards,

Kaushal
Last edited by Pippin on Fri Oct 02, 2020 4:52 pm, edited 1 time in total.
Reason: Formatting

300000
OpenVPN Super User
Posts: 289
Joined: Tue May 01, 2012 9:30 pm

Re: Deactivate Users from OpenVPN Server

Post by 300000 » Sat Oct 03, 2020 12:38 pm

your question is quite hard to answer , you need to do it yourself or going here to learn viewforum.php?f=16 after that you must do all of them and if something wrong come back here so people can help you .

when openvpn use more than one person so that is for commercial purport so consider going to openvpn access server is easy for you to management user than community version

Post Reply