Last active
October 8, 2019 22:38
-
-
Save abdrehma/a7c536d505d65af1589834631526d44f to your computer and use it in GitHub Desktop.
GCP Private Zone DNS BIND Config with OpenVPN
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
1. Setup Openvpn server with server.conf. | |
2. Choose your DNS server: | |
Bind: | |
Use named.conf.options in /etc/bind/ | |
CoreDNS | |
Use Corefile | |
-- For use with Tunnelblick -- | |
On Tunnelblick's "Advanced" settings page: | |
- Please tick "Allow changes to manually-set network settings" |
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
.:53 { | |
forward . 169.254.169.254 | |
log | |
} |
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
options { | |
directory "/var/cache/bind"; | |
recursion yes; | |
allow-query { 10.0.0.0/0; }; | |
forwarders { | |
169.254.169.254; | |
}; | |
forward only; | |
dnssec-enable no; | |
dnssec-validation no; | |
dnssec-lookaside auto; | |
auth-nxdomain no; | |
listen-on-v6 { any; }; | |
}; |
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
port 1194 | |
proto tcp | |
dev tun | |
sndbuf 0 | |
rcvbuf 0 | |
ca ca.crt | |
cert server.crt | |
key server.key | |
dh dh.pem | |
auth SHA512 | |
tls-auth ta.key 0 | |
topology subnet | |
server 10.8.0.0 255.255.255.0 | |
ifconfig-pool-persist ipp.txt | |
push "dhcp-option DNS 10.8.0.1" | |
push "dhcp-option DNS 8.8.8.8" | |
push "route 10.0.0.0 255.0.0.0" | |
keepalive 10 120 | |
cipher AES-256-CBC | |
user nobody | |
group nogroup | |
persist-key | |
persist-tun | |
status openvpn-status.log | |
verb 3 | |
crl-verify crl.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment