DNS and Port Forwarding

For remote access via port forwarding to work, the following must be considered:

  • The router must be administrable by the integrator.
  • The Antcas server has a fixed IP address in the local network.
  • The connection to the visualization is secured using HTTPS.
  • The router must have a public IP address.
  • The router should support hairpin NAT (also known as DNAT or NAT loopback).

Functionality

The server is addressed in the internal network using the same DNS address as in the public network. This allows you to use only one app, regardless of where you are located. Access is therefore always via an address:

https://mein-home-name.dyndns.org:8000/

The address can be resolved differently internally than in the public network. That is, access in your own home is done directly via the server's IP address. This is only possible if a DNS entry can be made in the router. If this is not possible, the DNS Server from Antcas Control can be used.

Setting Up Port Forwarding

Port forwarding is configured on the router. Here, the following TCP ports are forwarded to the internal IP of the server as needed:

TCP Port Function
8'000 The visualization, which might also have a different port if configured differently.
10'000 Antcas Control for configuring the automation.
80 Required if Let's Encrypt is to be used.

Setting Up DynDns

After creating the port forwarding, register a DynDns address. The router may support a free DynDns service. Otherwise, Antcas also offers a DynDns service. You can test the correct function at any time using nslookup in your operating system's console.

Only port forwarding on the firewall and entering the Hostname are then required.

Tip: Antcas itself offers a DynDNS service. The exact procedure is explained further in the chapter DynDNS.

Creating a Certificate

After testing the DNS entry, you can create a certificate. To do this, simply rename the Server to the full DNS name. The certificate will then be generated automatically. If necessary, under Certificates under Network, the origin must be set to "Automatic".

It will take a moment for the certificate to be generated. After that, Antcas Control may need to be reloaded.

Using Multiple Devices with Let's Encrypt

Under Certificates in the SSL Relay tab, multiple internal IP addresses can be entered where the Let's Encrypt service looks for a file. This makes it possible for a NAS or another device to also receive a certificate.

Using a DNS Server

If the router does not support hairpin NAT, there is usually an option to enter the local IP of the server in the DNS server using what is known as an A record. If the router does not support this, Antcas Control can be used for this purpose. To do this, under the DHCP settings on the router, the IP of the DNS server must be changed. The use of the internal DNS Server is explained further in the corresponding chapter.