Skip to content

Instantly share code, notes, and snippets.

@abdrehma
Last active October 8, 2019 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdrehma/a7c536d505d65af1589834631526d44f to your computer and use it in GitHub Desktop.
Save abdrehma/a7c536d505d65af1589834631526d44f to your computer and use it in GitHub Desktop.
GCP Private Zone DNS BIND Config with OpenVPN
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"
.:53 {
forward . 169.254.169.254
log
}
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; };
};
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