-
Notifications
You must be signed in to change notification settings - Fork 0
Implement vpn #4
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
Open
mderasse
wants to merge
1
commit into
master
Choose a base branch
from
vpn
base: master
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
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 hidden or 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 |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
| name: | ||
| - sendmail | ||
| - openssh-server | ||
| - git | ||
| - vim | ||
| state: present | ||
| update_cache: yes | ||
| autoremove: yes | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [bumpversion] | ||
| commit = True | ||
| current_version = 2.4.1 | ||
| tag = True | ||
| tag_name = {new_version} | ||
|
|
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
|
|
||
| language: python | ||
| python: "2.7" | ||
|
|
||
| env: | ||
| - MOLECULE_DISTRO=ubuntu1404 | ||
| - MOLECULE_DISTRO=ubuntu1604 | ||
| # - MOLECULE_DISTRO=ubuntu1804 | ||
| - MOLECULE_DISTRO=debian8 MOLECULE_INIT_CMD=/lib/systemd/systemd | ||
| - MOLECULE_DISTRO=debian9 MOLECULE_INIT_CMD=/lib/systemd/systemd | ||
| # - MOLECULE_DISTRO=centos6 MOLECULE_INIT_CMD=/lib/systemd/systemd | ||
| - MOLECULE_DISTRO=centos7 MOLECULE_INIT_CMD=/lib/systemd/systemd | ||
| install: | ||
| - pip install docker molecule | ||
|
|
||
| script: | ||
| - molecule test |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| Contributors: | ||
|
|
||
| * Adam Kunicki (https://github.com/kunickiaj) | ||
| * Adham Helal (https://github.com/ahelal) | ||
| * Daniel Miranda (https://github.com/danielkza) | ||
| * Elias (https://github.com/viderizer) | ||
| * Federico Capoano (https://github.com/nemesisdesign) | ||
| * JP Viljoen (https://github.com/froztbyte) | ||
| * Jason Bond Pratt (https://github.com/juniorplenty) | ||
| * Kirill Klenov (http://klen.github.io/) | ||
| * Kurt Sussman (https://github.com/neophiliac) | ||
| * Mahmoud Abdelkader (https://github.com/mahmoudimus) | ||
| * Marcelo Anton (https://github.com/mbanton) | ||
| * Maxim Kravets (https://github.com/zeelax) | ||
| * Michael Frister (https://github.com/meeee) | ||
| * Mohammed Naser (https://github.com/mnaser) | ||
| * Roland von Ohlen (https://github.com/RockingRolli) | ||
| * Sebastien Badia (https://github.com/sbadia) | ||
| * Thomas Krille (https://github.com/tkrille) | ||
| * https://github.com/teadur |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) 2014 Stouts | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
|
|
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| .PHONY: release major minor patch | ||
|
|
||
| VERSION?=minor | ||
| release: | ||
| @bumpversion $(VERSION) | ||
| @git checkout master | ||
| @git merge develop | ||
| @git checkout develop | ||
| @git push --all | ||
| @git push --tags | ||
| @git checkout develop | ||
|
|
||
| major: | ||
| make release VERSION=major | ||
|
|
||
| minor: | ||
| make release VERSION=minor | ||
|
|
||
| patch: | ||
| make release VERSION=patch |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Stouts.openvpn | ||
|
|
||
| [](https://travis-ci.org/Stouts/Stouts.openvpn) | ||
| [](https://galaxy.ansible.com/Stouts/openvpn/) | ||
|
|
||
| Ansible role that installs an openvpn server | ||
|
|
||
| * Install and setup OpenVPN server | ||
| * Create/revoke client's configurations and certificates | ||
| * Setup authentication with PAM (System, passwd files) | ||
|
|
||
| ## Requirements | ||
|
|
||
| None. | ||
|
|
||
| ## Supported platforms | ||
|
|
||
| - Ubuntu 14.04 | ||
| - Ubuntu 16.04 | ||
| - Debian 8 | ||
| - Debian 9 | ||
| - Centos 7 | ||
|
|
||
| ## Variables | ||
|
|
||
| For a complete variable reference, see the [`defaults/main.yml`](defaults/main.yml) file. | ||
|
|
||
| ## Example playbook | ||
|
|
||
| ```yaml | ||
|
|
||
| - hosts: all | ||
| vars: | ||
| openvpn_use_pam: true | ||
| openvpn_download_clients: true | ||
| openvpn_download_dir: /home/me/Projects | ||
| openvpn_clients: | ||
| - client1 | ||
| - client2 | ||
| openvpn_use_pam_users: | ||
| - name: user1 | ||
| password: password1 | ||
| - name: user2 | ||
| password: password2 | ||
| roles: | ||
| - Stouts.openvpn | ||
| ``` | ||
|
|
||
| ## License | ||
|
|
||
| Licensed under the MIT License. See the LICENSE file for details. | ||
|
|
||
| ## Feedback, bug-reports, requests, ... | ||
|
|
||
| ...are [welcome](https://github.com/Stouts/Stouts.openvpn/issues)! |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
|
|
||
| # Set to 'false' to completely disable the role | ||
| openvpn_enabled: true | ||
|
|
||
| openvpn_etcdir: /etc/openvpn | ||
| openvpn_keydir: "{{ openvpn_etcdir }}/keys" | ||
|
|
||
| # Set to 'true' to install openvpn from the upstream repo | ||
| openvpn_use_external_repo: false | ||
|
|
||
| # Set to 'true' to install EasyRSA from system packages | ||
| openvpn_use_system_easyrsa: false | ||
|
|
||
| # Set to true to make the vpn server NAT incoming traffic | ||
| openvpn_route_traffic: false | ||
|
|
||
| # The interface that traffic will come in from (WARNING default: any) | ||
| openvpn_interface: '' | ||
|
|
||
| # Default settings (See OpenVPN documentation) | ||
| openvpn_host: "{{ inventory_hostname }}" | ||
|
|
||
| openvpn_port: 1194 | ||
| openvpn_proto: udp | ||
| openvpn_dev: tun | ||
| openvpn_server: 10.8.0.0 255.255.255.0 | ||
| openvpn_bridge: {} | ||
| openvpn_max_clients: 100 | ||
| openvpn_log: /var/log/openvpn.log | ||
| openvpn_keepalive: "10 120" | ||
| openvpn_ifconfig_pool_persist: ipp.txt | ||
| openvpn_comp_lzo: true | ||
| openvpn_cipher: BF-CBC | ||
| openvpn_status: openvpn-status.log | ||
| openvpn_verb: 3 | ||
| openvpn_tls_auth: false | ||
| openvpn_tls_key: "ta.key" | ||
| openvpn_user: nobody | ||
| openvpn_group: nogroup | ||
| openvpn_resolv_retry: infinite | ||
| openvpn_client_to_client: true | ||
|
|
||
|
|
||
| # Network ranges that the connecting clients should try to reach using the VPN | ||
| # connection. Example: | ||
| # openvpn_route_ranges: | ||
| # - 192.168.0.0 255.255.255.0 | ||
| # - 192.168.10.0 255.255.255.0 | ||
| openvpn_route_ranges: [] | ||
|
|
||
| # DNS servers to push to the connecting client to avoid leaks via DNS queries | ||
| openvpn_dns_servers: [] | ||
|
|
||
| openvpn_server_options: [] | ||
| # Additional server options | ||
| # openvpn_server_options: | ||
| # - dev-node MyTap | ||
| # - client-to-client | ||
|
|
||
| openvpn_client_options: [] | ||
| # Additional client options | ||
| # openvpn_client_options: | ||
| # - dev-node MyTap | ||
| # - client-to-client | ||
|
|
||
| openvpn_key_country: US | ||
| openvpn_key_province: CA | ||
| openvpn_key_city: SanFrancisco | ||
| openvpn_key_org: Fort-Funston | ||
| openvpn_key_email: me@myhost.mydomain | ||
| openvpn_key_size: 1024 | ||
|
|
||
| # Make clients certificate | ||
| openvpn_clients: | ||
| - client | ||
|
|
||
| # Revoke clients certificates | ||
| openvpn_clients_revoke: [] | ||
|
|
||
| # Use PAM authentication | ||
| openvpn_use_pam: true | ||
| openvpn_use_pam_users: [] | ||
| # Only for Debian-based, CentOS requires 'pam_pwdfile' from third party repos. | ||
| # If empty use system users | ||
| # otherwise use users from the option | ||
| # openvpn_use_pam_users: | ||
| # - { name: user, password: password } | ||
|
|
||
| # LDAP authentication and configuration (optional) | ||
| openvpn_use_ldap: false | ||
| openvpn_ldap_tlsenable: 'false' | ||
| openvpn_ldap_follow_referrals: 'false' | ||
|
|
||
| # Use simple authentication (default is disabled) | ||
| openvpn_simple_auth: false | ||
| openvpn_simple_auth_password: "" | ||
|
|
||
| # Whether to embed CA, cert, and key info inside client OVPN config file. | ||
| openvpn_unified_client_profiles: false | ||
|
|
||
| # Download the created client credentials to the specified directory | ||
| openvpn_download_clients: false | ||
| openvpn_download_dir: "client_credentials/" |
Binary file not shown.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
|
|
||
| - name: Restart networking (Debian) | ||
| service: | ||
| name: networking | ||
| state: restarted | ||
| listen: restart networking debian | ||
|
|
||
| - name: Restart networking (RedHat) | ||
| service: | ||
| name: network | ||
| state: restarted | ||
| listen: restart networking redhat | ||
|
|
||
| - name: Save iptables rules | ||
| block: | ||
| - name: Save iptable rules (RedHat) | ||
| command: iptables-save | ||
| when: ansible_os_family == "RedHat" | ||
| listen: openvpn save iptables | ||
|
|
||
| - name: Save iptable rules (Ubuntu Trusty) | ||
| command: /etc/init.d/iptables-persistent save | ||
| when: | ||
| - ansible_os_family == "Debian" | ||
| - ansible_lsb.codename == "trusty" | ||
| listen: openvpn save iptables | ||
|
|
||
| - name: Save the rules (Ubuntu) | ||
| command: netfilter-persistent save | ||
| when: | ||
| - ansible_os_family == "Debian" | ||
| - ansible_lsb.codename != "trusty" | ||
| listen: openvpn save iptables | ||
|
|
||
| - name: Restart OpenVPN service | ||
| service: | ||
| name: "{{ openvpn_service }}" | ||
| state: restarted | ||
| listen: openvpn restart |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| galaxy_info: | ||
| author: klen | ||
| company: stouts | ||
| description: Manage OpenVPN server | ||
| min_ansible_version: 2.4 | ||
| license: MIT | ||
| dependencies: [] |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Molecule managed | ||
|
|
||
| {% if item.registry is defined %} | ||
| FROM {{ item.registry.url }}/{{ item.image }} | ||
| {% else %} | ||
| FROM {{ item.image }} | ||
| {% endif %} | ||
|
|
||
| RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ | ||
| elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \ | ||
| elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ | ||
| elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ | ||
| elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ | ||
| elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ******* | ||
| Docker driver installation guide | ||
| ******* | ||
|
|
||
| Requirements | ||
| ============ | ||
|
|
||
| * General molecule dependencies (see https://molecule.readthedocs.io/en/latest/installation.html) | ||
| * Docker Engine | ||
| * docker-py | ||
| * docker | ||
|
|
||
| Install | ||
| ======= | ||
|
|
||
| $ sudo pip install docker-py |
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.
?