Created
July 10, 2019 06:01
-
-
Save g3rhard/4e300ba26d3839ffddc210ff9e1c68d6 to your computer and use it in GitHub Desktop.
docker-compose for ipsec vpn + pihole + telegram proxy
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
version: '2' | |
services: | |
pihole: | |
image: pihole/pihole:latest | |
container_name: pihole | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /dev/rtc:/dev/rtc:ro | |
dns: | |
- 1.1.1.1 | |
expose: | |
- "80" | |
- "53" | |
env_file: | |
- pihole-variables.env | |
logging: | |
driver: "none" | |
networks: | |
network_vpn: | |
ipv4_address: 172.20.0.2 | |
restart: always | |
tgdante2: | |
image: schors/tgdante2:latest | |
container_name: tgdante2 | |
dns: | |
- 172.20.0.2 | |
ports: | |
- "1080:1080" | |
volumes: | |
- /var/data/docker/tgdante2/etc:/etc | |
- /etc/localtime:/etc/localtime:ro | |
- /dev/rtc:/dev/rtc:ro | |
logging: | |
driver: "none" | |
networks: | |
network_vpn: | |
ipv4_address: 172.20.0.3 | |
restart: always | |
vpn: | |
image: hwdsl2/ipsec-vpn-server:latest | |
container_name: ipsec-vpn-server | |
dns: | |
- 172.20.0.2 | |
ports: | |
- "500:500/udp" | |
- "4500:4500/udp" | |
privileged: true | |
volumes: | |
- /lib/modules:/lib/modules:ro | |
env_file: | |
- vpn-variables.env | |
cap_add: | |
- NET_ADMIN | |
logging: | |
driver: "none" | |
networks: | |
network_vpn: | |
ipv4_address: 172.20.0.4 | |
restart: always | |
networks: | |
network_vpn: | |
driver: bridge | |
ipam: | |
driver: default | |
config: | |
- subnet: 172.20.0.0/16 |
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
TZ: UTC | |
DNS1: 1.1.1.1 | |
DNS2: 1.0.0.1 | |
ServerIP: 172.20.0.2 | |
VIRTUAL_HOST: pi.hole | |
VIRTUAL_PORT: 80 | |
NETWORK_ACCESS: internal | |
WEBPASSWORD: 'PASSWORD' |
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
# Define your own values for these variables | |
# - DO NOT put "" or '' around values, or add space around = | |
# - DO NOT use these special characters within values: \ " ' | |
VPN_IPSEC_PSK=IPSEC_PSK | |
VPN_USER=MAIN_USER | |
VPN_PASSWORD=MAIN_PASSWORD | |
# (Optional) Define additional VPN users | |
# - Uncomment and replace with your own values | |
# - Usernames and passwords must be separated by spaces | |
VPN_ADDL_USERS=USER1 USER2 USER3 | |
VPN_ADDL_PASSWORDS=PASS1 PASS2 PASS3 | |
# (Optional) Use alternative DNS servers | |
# - By default, clients are set to use Google Public DNS | |
# - Example below shows using Cloudflare's DNS service | |
VPN_DNS_SRV1=172.20.0.2 | |
VPN_DNS_SRV2=1.1.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment