- Add VPN client connection to server
- Add firewall forwarding rule for VPN traffic
- Verify the 172.30.0.0/24 is in route table for VPN tun interface
- Add DNS forwarding rule to dnsmasq
/ZONE.jeffheidel.com/172.30.0.254
Created
March 26, 2022 04:23
-
-
Save jheidel/1ca0ccddd1078ddb246ade41ac10b67a to your computer and use it in GitHub Desktop.
Docker bridged network over openvpn tunnel with DNS - hello world example
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
version: "3.7" | |
services: | |
dnsmasq: | |
image: strm/dnsmasq | |
networks: | |
vpn: | |
ipv4_address: 172.30.0.254 | |
cap_add: | |
- NET_ADMIN | |
hello-world: | |
image: strm/helloworld-http | |
container_name: hello.ZONE.jeffheidel.com | |
networks: | |
- vpn | |
networks: | |
vpn: | |
driver: bridge | |
ipam: | |
driver: default | |
config: | |
- subnet: 172.30.0.0/24 |
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
# Add this so that clients become aware of the route available through this machine | |
push "route 172.30.0.0 255.255.255.0" | |
# NOTE: clients may need to ignore redirect-gateway and dhcp-option if that's configured server-side |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment