https://github.com/mendhak/docker-openvpn-adblock
Docker containers setup with OpenVPN on TCP and UDP, with adblocking dnsmasq
https://github.com/mendhak/docker-openvpn-adblock
Last synced: 10 months ago
JSON representation
Docker containers setup with OpenVPN on TCP and UDP, with adblocking dnsmasq
- Host: GitHub
- URL: https://github.com/mendhak/docker-openvpn-adblock
- Owner: mendhak
- Created: 2018-01-22T22:54:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T20:00:08.000Z (over 7 years ago)
- Last Synced: 2025-03-16T18:11:55.734Z (10 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Docker Compose setup with OpenVPN and adblocking
Makes use of [docker-openvpn](https://github.com/kylemanna/docker-openvpn/) and [docker-dns-ad-blocker](https://github.com/oznu/docker-dns-ad-blocker).
Sets up the adblocking container, and also includes the local [rules .conf file](dnsmasq-rules/myblacklist.conf). The container automatically updates its blacklist daily, and uses Google's DNS servers. This can be changed in the docker-compose.yml file.
Sets up OpenVPN to listen on both TCP (port 563) and UDP (port 1194). Sets the DNS server to be the above adblocking container. This can be changed int he docker-compose.yml file.
Together, this setup allows for you to connect to this OpenVPN server, with built-in adblocking.
### To run it
sudo ./1.init.sh clientname server.example.com
* clientname - the profile, such as `workpc` - this results in a `workpc.ovpn` for example.
* server.example.com - the server where these containers will be hosted
When the script is run, follow the prompts and enter passwords where necessary. When asked for a Common Name, enter your server's DNS or IP address.
### To generate another .ovpn
sudo ./2.gen.sh myfriend
This will result in a `myfriend.ovpn`
### To start over
Remove the containers
sudo docker-compose stop
sudo docker-compose rm -f
Remove generated files
rm -f openvpn-data/
rm *.ovpn