-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
83 additions
and
41 deletions.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ubuntu | ||
USER root | ||
WORKDIR /tmp | ||
RUN apt install -y curl git | ||
RUN curl -L http://git.io/pdTu | sh |
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
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 |
---|---|---|
|
@@ -133,3 +133,4 @@ DEPENDENCIES | |
kitchen-vagrant | ||
ohai | ||
serverspec | ||
test-kitchen |
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 |
---|---|---|
@@ -1,41 +1,47 @@ | ||
# oh-my-vpn! | ||
Setup your own OpenVPN server in 30 seconds! and secure your naked internet connections before it is too late. | ||
Setup your own OpenVPN server in ~30 seconds! and secure your naked internet connections before it is too late. | ||
|
||
### Server Setup | ||
Pick a new cheap server, CPU and Memory does not really matter | ||
Install the required dependencies | ||
Pull down the repository to your server | ||
run chef-solo | ||
|
||
### Install the dependencies first: | ||
The following one-liner script installs Chef and related depedencies and provision openvpn-server and generates the client configuration file. | ||
|
||
### Use the one-liner script (Server): | ||
``` | ||
sudo aptitude update | ||
sudo aptitude safe-upgrade -y -f | ||
sudo aptitude install -y ruby ruby-dev build-essential wget git | ||
sudo gem install ohai chef --no-rdoc --no-ri | ||
curl -L https://git.io/pdTu | sh | ||
``` | ||
A generated file for openvpn-client should exist at ```/root/client.conf``` | ||
|
||
### Pull-down the code and run chef-solo | ||
|
||
``` | ||
cd /tmp/ && git clone https://github.com/alaa/oh-my-vpn.git | ||
sudo chef-solo -c /tmp/oh-my-vpn/solo.rb | ||
``` | ||
### Post-Installation (Client): | ||
|
||
### Post-Installation | ||
After your run chef-solo, your OpenVPN server will be ready: | ||
- Copy the generated config ```/root/client.conf``` and place it in your laptop at ```/etc/openvpn``` | ||
- Install OpenVPN on your machine. | ||
- Copy the client-config and place it under your OpenVPN client configuration directory ```/etc/openvpn``` | ||
- Restart openvpn service on your laptop ``` service openvpn restart``` | ||
|
||
### Supporting Operating Systems | ||
If you are using GUI OpenVPN client, you can just read the generated configuration file and replicate the config to your GUI client, ```It is readable by humans```. Also you will find the SSL certificates embded into the file. | ||
|
||
``` Ubuntu 14.10 ``` | ||
``` Ubuntu 13.10 ``` | ||
### Supported Operating Systems (Tested): | ||
|
||
- ``` Ubuntu 14.10 ``` | ||
- ``` Ubuntu 14.04 ``` | ||
- ``` Ubuntu 13.10 ``` | ||
- ``` Debian 7.0 ``` | ||
- ``` Debian 7.4 ``` | ||
- ``` Debian 7.6 ``` | ||
- ``` Debian 7.8 ``` | ||
|
||
### TODO | ||
- Email the client certificates to the user email | ||
- Make one-liner command for installation | ||
- Add recipe to configure the client machine | ||
- Build Docker image for Server | ||
- Build Docker image for client and route client connections through the container | ||
- Pipe-line the project to Travis-ci for continous testing | ||
- Add Support Ubuntu [14.04, 13.04, 12.10, 12.04] and Debian [7.4, 7.0] | ||
- Add Support for other platforms: Centos, Fedora, OpenSUSE, Archlinux, Gentoo | ||
- Add Multi-Client support | ||
- Improve the README | ||
|
||
#### Contribute | ||
- Fork and submit pull requests | ||
- For new features or refactoring make sure all kitchen tests pass on all platforms | ||
- You can run the tests: | ||
``` | ||
cd cookbooks/openvpn/ | ||
kitchen verify -c 6 | ||
``` |
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
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Chef::Recipe::Filter | ||
def self.provisioned? | ||
::File.exists?('/etc/openvpn/provisioned.lock') | ||
end | ||
end |
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
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