Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcphee authored Feb 3, 2022
1 parent 923de49 commit 5be4ddc
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

This is a WireGuard client docker that uses the CyberGhost Cli. It allows routing containers traffic through WireGuard.

[Docker Image](https://hub.docker.com/r/tmcphee/cyberghostvpn)
## What is WireGuard?

WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general-purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances.
Expand All @@ -15,6 +16,10 @@ Start the image using optional environment variables shown below. The end-user m
```
docker run -d --cap-add=NET_ADMIN --dns 1.1.1.1 \
-v /local/path/to/config:/home/root/.cyberghost:rw \
-e ACC=example@gmail.com \
-e PASS=mypasswowrd \
-e NETWORK=192.168.1.0/24 \
-e WHITELISTPORTS=9090,8080 \
cyberghostvpn
```

Expand All @@ -34,19 +39,37 @@ Examples:

See [GyberGhost selecting a country or single server](https://support.cyberghostvpn.com/hc/en-us/articles/360020673194--How-to-select-a-country-or-single-server-with-CyberGhost-on-Linux) for more details

## How to login
Login by providing the ACC and PASS environment variables
```
docker run -d --cap-add=NET_ADMIN --dns 1.1.1.1 \
-v /local/path/to/config:/home/root/.cyberghost:rw \
-e ACC=example@gmail.com \
-e PASS=mypasswowrd \
cyberghostvpn
```

## How to acceess ports locally
Access ports [webUI] by providing the NETWORK and WHITELISTPORTS environment variables. Where NETWORK is the users network and WHITELISTPORTS is the ports the user wants to expose.
```
docker run -d --cap-add=NET_ADMIN --dns 1.1.1.1 \
-v /local/path/to/config:/home/root/.cyberghost:rw \
-e NETWORK=192.168.1.0/24 \
-e WHITELISTPORTS=9090,8080 \
cyberghostvpn
```

## Environment variables

- `NETWORK` - Adds a route to the local network once the VPN is connected. CIDR networks [192.168.1.0/24]
- `WHITELISTPORTS` - Allow access to listed ports when VPN is connected. Delimited by comma [8080,8081,9000]
- `ACC` - CyberGhost username - Used for login
- `PASS` - CyberGhost password - Used for login

## Firewall
This image has a custom built-in firewall. On initial start, all traffic is blocked except CyberGhost API IP and Local DNS for resolve. After VPN is connected Local DNS is blocked on Port 53. For first time use the firewall will go through a setup phase to include whitelisted ports where the firewall will be inactive.

See the firewall section located in start.sh for details.

## Work in progress
- Logging in using enviroement variables
- In the meantime open the image console use `sudo cyberghostvpn --setup` to login then restart the container

## Disclaimer
This project was developed independently for personal use. CyberGhost has no affiliation, nor has control over the content or availability of this project.

0 comments on commit 5be4ddc

Please sign in to comment.