Comments (15)
I would like to add this functionality, but it looks like the source port will be removed from the management interface. See https://community.openvpn.net/openvpn/ticket/664 for more details.
from openvpn-monitor.
Thanks for for trying. That really sucks. I wonder if they will come up with an alternative way to find unique connections. I guess I'll fork and use my crappy work around since I don't use ipv6
from openvpn-monitor.
Currently the port is there for ipv4 addresses in openvpn < 2.4, but according to that bug report, the port will disappear in 2.4, for both ipv4 and ipv6.
from openvpn-monitor.
Yeah, I get it If you enable this feature with 2.4 or ipv6 You run the risk of nuking all users. :( Bummer. I'm not mad
from openvpn-monitor.
Can you see if 9c5969f gives you the functionality you are looking for?
from openvpn-monitor.
Well.... It looks good but doesn't work :)
Additionally, semantic_version isn't available from epel on RHEL/CentOS 6.x. I had to install from pip.
pip install semantic_version
I'll do some debugging this evening and get you more feedback.
from openvpn-monitor.
Ok here's what I can observe. Sorry I'm a network dude not a developer. :)
When I hit the disconnect button, the Form Data is being set in the request:
vpn_id:VPN1
ip:***.***.***.***
port:35827
However this conditional is never true:
if 'vpn_id' in kwargs:
from openvpn-monitor.
I've tried to reproduce this on CentOS 6 but it works fine for me. Are you using the latest commit? If not, can you try it?
If it still doesn't work, can you print kwargs to see what is in it?
from openvpn-monitor.
I threw in some additional logging but I'm not sure how to debug any further.
--- openvpn-monitor/openvpn-monitor.py 2017-01-05 11:21:13.196328443 +0000
+++ monitor/openvpn-monitor.py 2017-01-05 11:40:16.486459071 +0000
@@ -146,8 +146,10 @@
def __init__(self, cfg, **kwargs):
self.vpns = cfg.vpns
+ info('Initialize OpenvpnMgmtInterface class')
if 'vpn_id' in kwargs:
+ info('vpn_id is in kwargs')
self._socket_connect(self.vpns[kwargs['vpn_id']])
if self.s:
version = self.send_command('version\n')
tried to post data with curl
curl -u username 'https://localhost/monitor/openvpn-monitor.py' --data 'vpn_id=VPN1&ip=***.***.***.***.&port=41630'
With the log results
[Thu Jan 05 11:54:28 2017] [error] [client ***.***.***.***] INFO: Using config file: ./openvpn-monitor.conf, referer: https://localhost/monitor/openvpn-monitor.py
[Thu Jan 05 11:54:28 2017] [error] [client ***.***.***.***] INFO: Initialize OpenvpnMgmtInterface class, referer: https://localhost/monitor/openvpn-monitor.py
Thoughts?
from openvpn-monitor.
Yes, I pulled down a fresh copy of the code just before I ran my test.
from openvpn-monitor.
Try info(kwargs)
from openvpn-monitor.
def __init__(self, cfg, **kwargs):
self.vpns = cfg.vpns
+ info('Initialize OpenvpnMgmtInterface class')
+ info(kwargs)
+ info('End')
if 'vpn_id' in kwargs:
+ info('vpn_id is in kwargs')
self._socket_connect(self.vpns[kwargs['vpn_id']])
if self.s:
version = self.send_command('version\n')
yup Definitely not seeing the post data. hmmm
[Thu Jan 05 12:36:46 2017] [error] [client **.***.***.***] INFO: Initialize OpenvpnMgmtInterface class, referer: https://localhost/monitor
[Thu Jan 05 12:36:46 2017] [error] [client **.***.***.***] INFO: {}, referer: https://localhost/monitor
[Thu Jan 05 12:36:46 2017] [error] [client **.***.***.***] INFO: End, referer: https://localhost/monitor
The only thing I can think of is I use LINOTP which is also a WSGI app. There might be some interference.
I'll have to really dig to see why the post data isn't being passed.
from openvpn-monitor.
Could you insert info(kwargs)
into main() and render() ?
That way we can see at what point it gets lost.
from openvpn-monitor.
@kidmock any luck debugging this issue?
from openvpn-monitor.
I'm going to close this issue for now, as I can't reproduce. If you can reproduce, please re-open and add further details.
from openvpn-monitor.
Related Issues (20)
- Support url for logo HOT 1
- disconnect button is not working HOT 4
- Error: 500 Internal Server Error HOT 5
- Flag doesn't load, doesn't load location! HOT 1
- Getting 403 Forbidden Error
- Purpose of Map? HOT 1
- Flag images broken on Docker HOT 1
- Stop during installation HOT 2
- Need updated instructions for Ubuntu 20.04 HOT 2
- How to load the tool on Ubuntu 14.04 HOT 1
- flags wont load and the city is double HOT 2
- Still support for this tool?
- [Q+A] Monitoring 100 isolated groups
- Apache opening with contents of openvpn-monitor.py file HOT 2
- geoip-database-extra HOT 3
- The map cannot be displayed HOT 1
- Unknown location HOT 2
- docker to docker python errors after connect HOT 1
- Set favicon
- is this project still supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openvpn-monitor.