-
Notifications
You must be signed in to change notification settings - Fork 301
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
OpenVPN Monitor Enhancements #41
Open
kingy444
wants to merge
5
commits into
furlongm:main
Choose a base branch
from
kingy444:master
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,10 +45,22 @@ Read the [docker installation instructions](https://github.com/ruimarinho/docker | |
|
||
### Install dependencies and configure apache | ||
|
||
|
||
##### raspberryPi | ||
raspberryPi follows instructions set out in Debian / Ubuntu below, with the exception of the python-semantic-version. | ||
You will need to install this manually from PIP using the below command. | ||
When following the Debian / Ubuntu instructions remember to remove the python-semantic-version item from the apt-get command | ||
|
||
```shell | ||
pip install semantic_version | ||
``` | ||
|
||
#### Debian / Ubuntu | ||
The below will install and configure the web application, applying relative Alias commands to access local resources | ||
|
||
```shell | ||
apt-get -y install python-geoip python-ipaddr python-humanize python-bottle python-semantic-version apache2 libapache2-mod-wsgi git wget geoip-database-extra | ||
echo "Alias /images/ /var/www/html/openvpn-monitor/images/" > /etc/apache2/conf-available/openvpn-monitor.conf | ||
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" > /etc/apache2/conf-available/openvpn-monitor.conf | ||
a2enconf openvpn-monitor | ||
systemctl restart apache2 | ||
|
@@ -63,7 +75,6 @@ echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-mon | |
systemctl restart httpd | ||
``` | ||
|
||
|
||
### Checkout OpenVPN-Monitor | ||
|
||
```shell | ||
|
@@ -75,7 +86,7 @@ git clone https://github.com/furlongm/openvpn-monitor.git | |
### Configure OpenVPN | ||
|
||
Add the following line to your OpenVPN server configuration to run the | ||
management console on 127.0.0.1 port 5555: | ||
management console on 127.0.0.1 port 5555: (This port is arbitary, you may choose any) | ||
|
||
``` | ||
management 127.0.0.1 5555 | ||
|
@@ -87,13 +98,52 @@ access to the management interface. | |
|
||
### Configure OpenVPN-Monitor | ||
|
||
The example configuration file `/var/www/html/openvpn-monitor/openvpn-monitor.conf` | ||
The provided configuration file `/var/www/html/openvpn-monitor/openvpn-monitor.conf` | ||
should give some indication of how to set site name, add a logo, etc. You can | ||
also set a default location (latitude and longitude) for the embedded maps. | ||
If not set, the default location is New York, USA. | ||
|
||
Edit `/var/www/html/openvpn-monitor/openvpn-monitor.conf` to match your site. | ||
|
||
Complete the following by editing `/var/www/html/openvpn-monitor/openvpn-monitor.conf` to match your site. | ||
|
||
#### OpenVPN-Monitor | ||
The below should help you quickly configure your vpn monitor with relevant settings | ||
|
||
| Option | Default | Description | | ||
| --- | --- | --- | | ||
| site | Example | The name of the monitoring box - Free text, can be anything | | ||
| logo | None | Optional logo. This will be displayed in the top right. No default provided | | ||
| latitude | -37.8067 | Latitude location for the centre of map and marker icon to be set. Requires longitude or no action is taken. | | ||
| longitude | 144.9635 | Longitude location for the centre of map and marker icon to be set. Requires latitude or no action is taken. | | ||
| Maps | False | Will the site display the map| | ||
| geoip_data | /usr/share/GeoIP/GeoIPCity.dat | GeoLocation data location. Unless you are making locational changes this should not need to be changed. | | ||
| datetime_format | %a %b %d %H:%M:%S %Y | DateTime format for server display | | ||
| marker | False | Display a marker on the map for the OpenVPN-Monitor Box | | ||
| externalip | 0.0.0.0 | External IP of the OpenVPN-Monitor box. If latitude and longitude not specified then this is used to locate the Monitor box | | ||
| pervpn_control | False | Display a layer control to turn of element markers per vpn | | ||
| itemtype_control | False | Display a layer control to turn off element markers per connection type | | ||
| allowFullscreen | False | Allow the map to be displayed in FullScreen mode | | ||
|
||
Note: If latitude, longitude and externalip all cannot be validated then Melbourne, Australia becomes the default centre and marker location. | ||
|
||
#### Per VPN Settings | ||
The below should help you quickly configure connections to vpns | ||
|
||
| Option | Default | Description | | ||
| --- | --- | --- | | ||
| host | localhost | Specifies the IP or DNS name of the VPN management interface to connect. | | ||
| port | 5555 | Specifies the Port of the management internace to connect. | | ||
| name | default | Free Text. The name of the VPN Connection | | ||
| show_disconnect | False | Show a button to disconnect clients | | ||
| externalip | 0.0.0.0 | External IP of the VPN Server. If latitude and longitude not specified then this is used to locate the VPN | | ||
| latitude | -35.308065 | Latitude location for the vpn marker icon. Requires longitude or no action is taken. | | ||
| longitude | 149.124521 | Longitude location for the vpn marker icon. Requires Latitude or no action is taken. | | ||
| marker | False | Display a marker on the map for the VPN Server | | ||
| connection_lines | False | Display connection lines between the Server and the Clients. Requires marker to be on for VPN. | | ||
|
||
Note: If latitude, longitude and externalip all cannot be validated then Canberra, Australia becomes the default marker location. | ||
|
||
### Your Done | ||
You should now be able to navigate to `http://myipaddress/openvpn-monitor/` | ||
|
||
Note the trailing slash, the images may not appear without it. | ||
|
@@ -127,3 +177,5 @@ the COPYING file. | |
Flags are created by Matthias Slovig ([email protected]) and are licensed under | ||
Creative Commons License Deed Attribution-ShareAlike 3.0 Unported | ||
(CC BY-SA 3.0). See http://flags.blogpotato.de/ for more details. | ||
Fullscreen control provided by https://github.com/brunob/leaflet.fullscreen | ||
Spiderfy (Closeby Marker control) provided by https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.