{% load i18n %}{% comment %}Router-Konfiguration (CLAUDE.md 4.13): einmalige Anzeige. Erwartet gw, config, qr_svg, download_href, filename. Anleitung: docs/router-rutos.md{% endcomment %}

{% blocktranslate trimmed %}Important: This configuration contains the secret key of the router and is only shown now. The portal does not store it. The previous configuration is no longer valid from now on.{% endblocktranslate %}

{% blocktranslate trimmed with name=filename %}Download configuration file ({{ name }}){% endblocktranslate %}

{% translate "Show content and QR code" %}
{{ config }}
{{ qr_svg }}

{% translate "Enter in the router (e.g. Teltonika RUT241)" %}

{% translate "Instructions with details: docs/router-rutos.md" %}

  1. {% blocktranslate trimmed %}In the router under Services → VPN → WireGuard create an instance and import the file. Without an import function transfer the values by hand, switching on Route allowed IPs.{% endblocktranslate %}
  2. {% translate "Activate the instance. After a few seconds the gateway shows “Tunnel up”." %}
  3. {% if gw.uplink_mode == "client" %}
  4. {% blocktranslate trimmed with address=gw.uplink_address fqdn=gw.fqdn port=gw.phone_endpoint_port %}Through the tunnel the server only comes as 10.78.0.1. It passes on to {{ address }}: HTTPS for {{ fqdn }} (TCP 443, with PROXY protocol header) and UDP port {{ port }} of the server as UDP 51820. What the router does with it is up to you; Rivet functions (phones, interface, certificate) do not exist without a Rivet gateway.{% endblocktranslate %}
  5. {% else %}
  6. {% blocktranslate trimmed %}Under Network → Firewall → Port forwards forward from the WireGuard zone to the Rivet gateway, only these three, without rewriting the source address:{% endblocktranslate %}
    • {% translate "TCP 443 → Rivet gateway:443" %}
    • {% translate "TCP 80 → Rivet gateway:80" %}
    • {% translate "UDP 51820 → Rivet gateway:51820" %}
  7. {% blocktranslate trimmed %}Allow nothing else from the WireGuard zone into the farm network. The router decides whether the server gets into the farm network.{% endblocktranslate %}
  8. {% blocktranslate trimmed with fqdn=gw.fqdn %}Check: https://{{ fqdn }} shows the login page of the Rivet gateway without a certificate warning.{% endblocktranslate %}
  9. {% endif %}