Jump to:navigation, search
Wiki































De.png
En.png
Fr.png






Forwarding DNS requests for the domain to the DNS server through the VPN tunnel
Last adaptation to the version: 12.6.1
New:
  • Vereinfachte Regel im DNS-Server Netzwerk für SSL-VPN und WireGuard Verbindungen 04.2024
  • Updated to Redesign of the webinterface
  • Paketfilterregel Quelle und Ziel korregiert
Last updated: 
04.2024
notempty
This article refers to a Resellerpreview

12.3 11.7

Access: UTM-IP:Port or UTM-URL:Port
Port as configured at Network / Appliance Settings / Webserver
Default-Port: 11115
i.e.: https://utm.ttt-point.de:11115
Default: https://192.168.175.1:11115
Applications Nameserver


Introduction

In this scenario, the UTM and clients of a remote site are to be connected to the domain at the main site.

  • All DNS requests for the domain to the DNS server, through the VPN tunnel, are forwarded to the main site.
  • The UTM shall provide DNS for the clients in the remote site.
  • Requests for the domain network shall be forwarded in the VPN tunnel to the DNS server in the main site.




Creating the DNS Relay Zone


Set Firewall as Namesever

Server settings UTMuser@firewall.name.fqdnNetwork UTM v12.6 Nameserver Servereinstellungen-en.pngNameserver IP The first step is to define the UTM itself as the nameserver of the firewall.

  1. Configuration under Network Server settings  Area Server settings section
    DNS Server
  2. Field Primary nameserver set the IP to 127.0.0.1 (localhost) as IP.
  3. Save with
  • If no nameserver is stored, DNS queries are resolved via the root DNS servers and the DNS servers stored there for the top-level domains



  • Create DNS Relay

    Applications Nameserver  Area Zones
    The next step is to create a relay zone.

    Nameserver UTMuser@firewall.name.fqdnApplications UTM v12.6.1 DNS Relay Nameserver Relay-Zone anlegen-en.png
    Step 1
    • Open the Zones tab in the Nameserver window.
    • Click on the Add Relay Zone button to create a new relay zone
    Relay-Zone hinzufügen UTMuser@firewall.name.fqdnApplicationsNameserver UTM v12.6.1 DNS Relay Zone anlegen DNS Relay IP-Adresse-en.png
    Step 2
    • Under Zone name: enter the desired domain name
    • Select as Type: Relay
    • Click on the Add Server button to enter the IP address of the nameserver
    Add server UTMuser@firewall.name.fqdnApplicationsNameserver UTM v12.6.1 DNS Relay Zone anlegen DNS Relay IP Adresse Nameserver-en.png
    Step 3
    • Under IP address: the IP address of the remote nameserver is entered
    Relay-Zone hinzufügen UTMuser@firewall.name.fqdnApplicationsNameserver UTM v12.6.1 DNS Relay Zone anlegen DNS Relay-en.png
    Step 4
    View of the finished relay zone.
    In order to use this, Save and close the dialog Add Relay Zone and the dialog Nameserver.












    After creating the relay zone, the firewall forwards all requests to the DNS server at the main site on the domain network.




    DNS Relay for an IPSec Site-to-Site Tunnel

    In order to forward internal domain requests to a remote nameserver that is on an IPSec network, note that by default, all direct requests addressed to external nameservers are sent from the firewall with the external IP. However, a public IP is not routed into an IPSec tunnel.

    Create network object

    Firewall Network objects
    The packet filter rules in the Implied rules are automatically activated. This means that no network object is yet available for the IPSec network.

    The following objects are preconfigured at delivery: Networkobject associated interface object Network objects UTMuser@firewall.name.fqdnFirewall Update rules UTM v12.6.1 DNS Relay IPSec Netzwerkobjekt Uebersicht-en.pngOverview of network objects
    World.svg Internet Interface.svg external-interface
    Network.svg internal-network Interface.svg internal-interface
    only with min. 3 existing interfaces Network.svg dmz1-network Interface.svg dmz1-interface
    In order to create the appropriate network object, click on the Add object button in the  Network objects  area.
    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.6.1 DNS Relay IPSec Netzwerkobjekt hinzufuegen-en.png
    Name: IPSec-Network Name for the IPSec network
    Type: VPN-Network Choose VPN network
    Address: 192.168.8.0/24 IP address of the IPSec network
    Zone: vpn-ipsec The corresponding VPN IPSec zone
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen

    Regel erstellen

    The last step is to create a firewall rule with a Hide NAT.
    This causes DNS forwarding to also go to the tunnel and not directly to the Internet.

    Caption Value Add rule UTMuser@firewall.name.fqdnFirewallPacketfilter UTM v12.6.1 DNS Relay IPSec Paketfilter erstellen-en.pngCreating the rule
    Active: On
    Quelle: Interface.svg external-interface
    Target: Vpn-network.svg IPSec-Network
    Service: Udp.svg domain-udp
    Action: ACCEPT
    [-] NAT
    Type: HIDENAT
    Networkobject: Interface.svg internal-interface
    Click Save or Save and Close to save this rule.

    Anschließend Regeln aktualisieren

    With this rule, all domain UDP requests made through the firewall to the remote nameserver are natted over the IP of the internal interface and can thus be routed into the IPSec tunnel.

    notempty
    Wenn Multipath Routing konfiguriert ist, muss für jedes externe Interface eine solche Regel angelegt werden.


    DNS Relay for an OpenVPN Site-to-Site Tunnel

    In order to forward internal domain requests to a remote nameserver located in an OpenVPN network, note that by default all direct requests directed to external nameservers are send from the firewall with the external IP. However, a public IP is not routed into an OpenVPN tunnel.

    Zentrale Konfiguration im Netzwerk des DNS-Servers

    Vereinfachte Lösung mit Paketfilter Regel im Netzwerk des DNS-Servers
    Bei mehreren Außenstellen ist es oft die einfachste Variante, das komplette Transfernetz auf der Serverseite freizugeben. Hierzu ist eine Paketfilter Regel auf der UTM im Netzwerk des DNS-Servers erforderlich.

    Anlegen des Netzwerkobjektes für das Transfernetz

    UTM im DNS-Server Netzwerk Firewall Network Objects Kasten  Network objects  Button Objekt hinzufügen

    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.7 Netzwerkobjekt Transfernetz.png Netzwerkobjekt für das Transfernetz
    Name: Transfer Netz Bezeichnung für das Transfernetzwerk
    Type: VPN-Netzwerk Typ des Netzwerkobjektes
    Address: 10.40.40.0/24 Netz-IP, so wie unter VPN SSL-VPN unter Transfer Netzwerk angezeigt
    Zone: vpn-ssl-DNS-Relay-server Zone wird automatisch vorgeschlagen.
    Per Default der Name der SSL-Verbindung mit dem Präfix vpn-ssl-
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen
    Netzwerkobjekt DNS-Server

    Ein Netzwerkobjekt für den DNS-Server (Typ: Host) sollte bereits existieren.
    Andernfalls muss es ebenfalls angelegt werden.

    UTM im DNS-Server Netzwerk Firewall Network Objects Kasten  Network objects  Button Objekt hinzufügen

    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.7 Netzwerkobjekt DNS-Server.png Netzwerkobjekt für den DNS-Server
    Name: DNS-Server Bezeichnung für den DNS-Server
    Type: Host Typ des Netzwerkobjektes
    Address: 192.168.175.10/-- Feste IP-Adresse, unter der der DNS-Server erreichbar ist
    Zone: internal Zone wird automatisch vorgeschlagen
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen


    Regel erstellen

    Firewall Packetfilter  Button Add rule

  • Diese Regel benötigt kein NAT
  • Anschließend Regeln aktualisieren
  • # Quelle Target Service NAT Action Active
    Dragndrop.png 4 Vpn-network.svg Transfer Netzwerk Host.svg DNS-Server Udp.svg domain-udp Accept On

    Diese Paketfilter Regel erlaubt dem SSL-VPN-Transfernetz und damit sämtlichen S2S-Clients auf diesem SSL-VPN-Tunnel den Zugriff auf den DNS-Server


    notempty
    Alternative

    Dezentrale Konfiguration auf jedem S2S Client

    Wenn eine Zentrale Konfiguration im Netzwerk des DNS-Servers nicht gewünscht oder möglich ist, kann eine NAT-Regel auf jedem S2S-Client erstellt werden.

  • Diese Schritte müssen auf jedem S2S-Client ausgeführt werden!
  • Create zone

    UTM im S2S Client Netzwerk Network Zone Configuration
    In order to route the DNS requests into the OpenVPN tunnel, a new interface zone must be created on the UTM.
    A new zone is created with the Add zone button.

    Caption Value Description Add zone UTMuser@firewall.name.fqdnNetworkZone settings UTM v12.6.1 DNS Relay OpenVPN Zone-en.pngDialog Add zone with flag Interface
    Name: Site-to-Site-DNS-Relay Name for the interface zone
    Interface: tun0 Select the corresponding interface tunX
    Interface: On Enable FLAG Interface for this zone
    Dialog Speichern und Schließen


    Create Open-VPN network objects

    UTM im S2S Client Netzwerk Firewall Network Objects
    The packet filter rules in the Implied rules are automatically activated. This means that no network object is yet available for the Open-VPN network.

    The following objects are preconfigured at delivery: Networkobject associated interface object Network objects UTMuser@firewall.name.fqdnFirewall Update rules UTM v12.6.1 DNS Relay IPSec Netzwerkobjekt Uebersicht-en.pngOverview of network objects
    World.svg Internet Interface.svg external-interface
    Network.svg internal-network Interface.svg internal-interface
    only with min. 3 existing interfaces Network.svg dmz1-network Interface.svg dmz1-interface
    In order to create the appropriate network object, click on the Add object button in the  Network objects  area.
    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.6.1 DNS Relay OpenVPN S2S Netzwerkobjekt hinzufuegen OpenVPN Interface-en.png
    Name: DNS-Relay-Interface Name for the Open VPN network
    Type: Dynamic interface Select dynamic interface
    Interface: 0.0.0.0/0 select this interface
    Zone: Site-to-Site-DNS-Relay Select the corresponding Open VPN zone
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen


    Create rule

    UTM im S2S Client Netzwerk Firewall Packetfilter  Button Add rule

    The last step is to create a firewall rule with a Hide NAT.
    This causes DNS forwarding to also go to the tunnel and not directly to the Internet.

    Caption Value Add rule UTMuser@firewall.name.fqdnFirewallPacketfilter UTM v12.6.1 DNS Relay Paketfilterregel DNS Relay Interface-en.pngCreating the rule
    Active: On
    Quelle: Interface.svg DNS-Relay-Interface
    Target: Host.svg Remote-DNS-Server
    Service: Service-group.svg dns
    Action: ACCEPT
    [-] NAT
    Type: HIDENAT
    Optional if domain controller does not want to respond to requests from the transfer network
    Networkobject: Interface.svg internal-interface
    Dialog Speichern und Schließen
    Anschließend Regeln aktualisieren


    DNS Relay for a WireGuard Site-to-Site Tunnel

    The internal domain requests can also be forwarded to a remote nameserver located in a WireGuard network. The configuration of such a scenario requires an existing WireGuard site-to-site VPN (S2S) connection.


    Zentrale Konfiguration im Netzwerk des DNS-Servers

    Vereinfachte Lösung mit Paketfilter Regel im Netzwerk des DNS-Servers
    Bei mehreren Außenstellen ist es oft die einfachste Variante, das komplette Transfernetz auf der Serverseite freizugeben. Hierzu ist eine Paketfilter Regel auf der UTM im Netzwerk des DNS-Servers erforderlich.


    Anlegen des Netzwerkobjektes für das Transfernetz

    UTM im DNS-Server Netzwerk Firewall Network Objects Kasten  Network objects  Button Objekt hinzufügen

    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.7 Netzwerkobjekt WG Transfernetz.png Netzwerkobjekt für das WireGuard Transfernetz
    Name: Transfer Netz Bezeichnung für das Transfernetzwerk
    Type: VPN Netzwerk Typ des Netzwerkobjektes
    Address: 10.0.1.0/24 Netz-IP des Transfernetzes.
    Unter VPN WireGuard WireGuard Verbindung bearbeiten findet sich unter IPv4Adresse bzw. IPv6 Adresse die IP-Adresse und Subnetzmaske der Schnittstelle. Daraus kann entsprechend die Netz-IP abegeleitet werden.
    Aus 10.0.1.2/24 → wird z.B. 10.0.1.0/24
    Aus fd00::2/64 → wird z.B. fd00::0/64
      
    Zone: wireguard-wg0 Zone wird automatisch vorgeschlagen.
    Per Default der Name des WireGuard Tunnels mit dem Präfix wireguard
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen
    Netzwerkobjekt DNS-Server

    Ein Netzwerkobjekt für den DNS-Server (Typ: Host) sollte bereits existieren.
    Andernfalls muss es ebenfalls angelegt werden.

    UTM im DNS-Server Netzwerk Firewall Network Objects Kasten  Network objects  Button Objekt hinzufügen

    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.7 Netzwerkobjekt DNS-Server.png Netzwerkobjekt für den DNS-Server
    Name: DNS-Server Bezeichnung für den DNS-Server
    Type: Host Typ des Netzwerkobjektes
    Address: 192.168.175.10/-- Feste IP-Adresse, unter der der DNS-Server erreichbar ist
    Zone: internal Zone wird automatisch vorgeschlagen
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen


    Regel erstellen

    UTM im DNS-Server Netzwerk Firewall Packetfilter  Button Add rule

  • Diese Regel benötigt kein NAT
  • Anschließend Regeln aktualisieren
  • # Quelle Target Service NAT Action Active
    Dragndrop.png 4 Vpn-network.svg Transfer Netzwerk Host.svg DNS-Server Udp.svg domain-udp Accept On

    Diese Paketfilter Regel erlaubt dem SSL-VPN-Transfernetz und damit sämtlichen S2S-Clients auf diesem SSL-VPN-Tunnel den Zugriff auf den DNS-Server



    notempty
    Alternative

    Dezentrale Konfiguration auf jedem S2S Client

    Wenn eine Zentrale Konfiguration im Netzwerk des DNS-Servers nicht gewünscht oder möglich ist, kann eine NAT-Regel auf jedem S2S-Client erstellt werden.


    Create zone

    UTM im S2S Client Netzwerk Network Zone Configuration  Button Zone hinzufügen
    In order to route the DNS requests into the WireGuard tunnel, a new interface zone must be created on the UTM.

    Caption Value Description Add zone UTMuser@firewall.name.fqdnNetworkZone settings UTM v12.6.1 DNS Relay WireGuard Zone-en.pngDialog Add zone with flag Interface
    Name: WireGuard-S2S-DNS-Relay Name for the interface zone
    Interface: wg0 Select the corresponding WireGuard interface wg0
    Interface: On Enable FLAG Interface for this zone
    Dialog Speichern und Schließen


    Create WireGuard network objects

    UTM im S2S Client Netzwerk Firewall Network Objects
    The packet filter rules in the Implied rules are automatically activated. This means that no network object is yet available for the WireGuard network.

    The following objects are preconfigured at delivery: Networkobject associated interface object Network objects UTMuser@firewall.name.fqdnFirewall Update rules UTM v12.6.1 DNS Relay IPSec Netzwerkobjekt Uebersicht-en.pngOverview of network objects
    World.svg Internet Interface.svg external-interface
    Network.svg internal-network Interface.svg internal-interface
    only with min. 3 existing interfaces Network.svg dmz1-network Interface.svg dmz1-interface
    In order to create the appropriate network object, click on the Add object button in the  Network objects  area.
    Caption Value Description Add network objects UTMuser@firewall.name.fqdnFirewallNetwork objects UTM v12.6.1 DNS Relay WireGuard S2S Netzwerkobjekt hinzufuegen WireGuard Interface-en.png
    Name: WireGuard-DNS-Relay-Interface Name for the WireGuard network
    Type: Dynamic interface Select dynamic interface
    Interface: 0.0.0.0/0 select this interface
    Zone: WireGuard-S2S-DNS-Relay Select the corresponding WireGuard zone
    Groups:     A corresponding group can be entered
    Netzwerkobjekt und Dialog Speichern und Schließen


    Create rule

    UTM im S2S Client Netzwerk Firewall Packetfilter  Button Add rule

    The last step is to create a firewall rule with a Hide NAT.
    This causes DNS forwarding to also go to the tunnel and not directly to the Internet.

    Caption Value Add rule UTMuser@firewall.name.fqdnFirewallPacketfilter UTM v12.6.1 DNS Relay WireGuard S2S Paketfilter erstellen-en.pngCreating the rule
    Active: On
    Quelle: Interface.svg WireGuard-DNS-Relay-Interface
    Target: Host.svg Remote-DNS-Server
    Service: Udp.svg domain-udp
    Action: ACCEPT
    [ - ] NAT
    Type: HIDENAT
    Optional if domain controller does not want to respond to requests from the transfer network
    Networkobject: Interface.svg internal-interface
    Dialog Speichern und Schließen
    Anschließend Regeln aktualisieren