Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add - Delete - Update - Ban/Block #28

Open
avernus99 opened this issue Jan 7, 2017 · 3 comments
Open

Add - Delete - Update - Ban/Block #28

avernus99 opened this issue Jan 7, 2017 · 3 comments

Comments

@avernus99
Copy link

I suggest adding CRUD feature on the system will become handy. Ban/Unban button users to prevent from reconnecting to server, client openvpn gui has the feature to auto reconnect after disconnection on few seconds.

example: master list of all clients in row.

[column for client username] [column for update password button] [column for delete button] [column for ban button]

below the row - ADD USER button

anyway your work is awesome.

@furlongm
Copy link
Owner

I don't think the management interface has the ability to ban users.

Given that we currently work with any sort of users configured by the operator (e.g. local linux users, mysql users, ldap users, hosts, etc) , I don't think it would be possible to add users without a) having a separate database to record users and b) reducing the types of users that are currently supported. So I think by adding this functionality, we would reduce the audience that can use the software out of the box.

@jomsky10
Copy link

I think @avernus99 suggestion is quite handy... migrating to mysql database is good choice you can still monitor the clients through that way and it will give a lot more feature like adding connect.sh / disconnect.sh and also account. I think he is referring to database which it can ban the user if the status is 0 or 1 which is true or false.

@TheAmigo
Copy link

It's certainly possible, but requires a bit of work that seems outside the current scope of openvpn-monitor. We built an in-house system that allows for this. The basic idea is fairly straight-forward:

  • Keep an sql database of all users (name, last login time, status, etc).
  • In the openvpn server's config, add two lines:
  • client-connect /path/to/logger_script
  • client-disconnect /path/to/logger_script
  • In the logger_script, if the user is trying to connect, check the database and see if their status is 'locked'. The exit status of logger_script will tell OpenVPN if the user should be allowed in or not.

To make it more robust, I went a few extra steps: I didn't want to trust that the SQL database would always be up (or accessible from all VPN servers). So I actually verify against a local text file with a list of blacklisted users. Whenever that file is updated, it gets rsync'd to all VPN server hosts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants