top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to list openvpn clients?

+1 vote
951 views

I'm running an openvpn server on a CentOS machine and I'm wondering if there is some way of finding
all the clients (not just those connected at this moment) who have been registered as clients of the openvpn server?

posted Oct 8, 2013 by Deepak Dasgupta

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Did you configure ifconfig-pool-persist...?
Thank you very much. I did actually set this in server.conf, and the list I am seeking is in fact in the place specified.
This list will only include the usernames of those who have logged in as openvpn clients. There may be others who can log in but have not as yet.

1 Answer

+1 vote

All users should have a key in /etc/openvpn/easy-rsa/2.0/keys So that might be one source of usernames.

Also look through /etc/openvpn/server.conf . There might be a line which verifies usernames, for example, from the OpenVPN 2 Cookbook: tls-verify /etc/openvpn/cookbook/example6-5-tls-verify.sh
so you'd need to look at that file and example6-5-tls-verfiy.sh.allowed

There are other possibilities that list all allowed users. See the Cookbook.

answer Oct 8, 2013 by Kumar Mitrasen
Similar Questions
+1 vote

How to install openvpn on centos 5.7 32 bit and client will be used windows xp, 7, 8 and ubuntu desktop.
Please help me any one on this.

+1 vote

In order to make the same installation on two servers where all was installed via yum/rpm, I want to dump a list of all installed packages on the first server.

My problem is if I just "yum list installed", some weird formatting prints packages information on 2 lines...
I have to

 # yum list installed | awk '{print $1}' 
 | grep -v '@' | grep -vE '^[0-9]'

Is there a cleaner way?

 # rpm -aq

Is not OK because it includes version in a way it's more hard to parse just the package name.

0 votes

I installed CentOS 6.4 on a partition on my computer a few days ago, and I'm trying to equip it with the software i think i need.

For example, i need, or i think i need, a couple of gnustep programs for uploading images from my digital camera (the programs being openapp and Camera.app).

I imagine that these are old enough that they must surely exist in rpms somewhere.

But i apparently don't know how to google around sufficiently well to locate a repository that contains them, or even that contains packages that i know exist as rpms. For example: i'm certain that an rpm exists for
a package called gnustep-make, because its name popped up on http://forums.fedoraforum.org/showthread.php?t=279655 But if i try 'sudo yum install gnustep-make' i get 'No package gnustep-make available.'
So that clearly means that i don't have enough repositories configured for use.

So, i'd be grateful for any pointers to a list of CentOS-compatible repositories that i can put in the yum configuration (/etc/yum.repos.d or elsewhere).

+1 vote

I encountered a problem when creating a VLAN interface according to the Red_Hat_Enterprise_Linux-7-Networking_Guide. I configured the parent interface ifcfg-eno1 as follows:

DEVICE=eno1
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes

And I created a new file named ifcfg-eno1.5, the content is:

DEVICE=eno1.5
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.81.3
PREFIX=24
NETWORK=192.168.81.0
VLAN=yes

Then I restarted the network:

 systemctl restart network 

After that I found that I couldn't connect to the Internet, even couldn't ping the gateway. I thought it might be I didn't set the GATEWAY in ifcfg-eno1.5, so I added the GATEWAY=192.168.81.254(My local area network gateway), it didn't work.

Could anybody teach me how to create a VLAN interface in CentOS7, or tell me what' s wrong with my configuration, more detailed more better.

+1 vote

We can permanently set hostname using hostnamectl set-hostname. How can we permanently set domain name in CentOS 7?
I found an article (http://unix.stackexchange.com/questions/239920/how-to-set-the-fully-qualified-hostname-on-centos-7-0 ) that recommended setting FQDN using hostnamectl. Is that the right way to set hostname and domainname at the same time using hostnamectl set-hostname command?

Running hostnamectl set-hostname will set the hostname in /etc/hostname but it doesn't change /etc/hosts. What's the proper way of adding hostname and FQDN to /etc/hosts in CentOS 7?

...