Skip to content

Instantly share code, notes, and snippets.

@TGion
Last active February 5, 2023 19:48
Show Gist options
  • Save TGion/7315b127a6b27c65d24e0bf6dac0e9c4 to your computer and use it in GitHub Desktop.
Save TGion/7315b127a6b27c65d24e0bf6dac0e9c4 to your computer and use it in GitHub Desktop.
AdGuard Home custom DNS rewrite for internal (vpn) access to the VPS
# The idea is to use the internal VPN host IP address of the server once we are connected to VPN.
# Domain name stays the same and should also be accessible, even when not connected to the VPN.
#
# Rewrite DNS of gion.io and every subdomain to the internal VPN host IP for every client with IP 192.168.100.*
||gion.io^$dnsrewrite=NOERROR;A;192.168.100.1,client='192.168.100.1/24'
# Exception for sub domain somedomain.gion.io - which is on another server
@@||somedomain.gion.io^$dnsrewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment