THE DEPLOYMENT HANDBOOK / Linux and NGINX

Set up a private HTTPS feed relay.

Fetch Critical Pro on a Linux relay and give a URL-only firewall a private HTTPS feed. The device token stays on the relay.

IPV4 ONLY
STANDARD + CRITICAL

Choose your relay operating system

Open the installation guide for the Linux server that will host the relay. Each guide uses the package manager, NGINX layout and scheduler of that distribution.

Installation guideSoftware
AlmaLinuxDNF · systemd · SELinux
Rocky LinuxDNF · systemd · SELinux
Alpine Linuxapk · OpenRC · crond
DebianAPT · systemd · NGINX
Ubuntu ServerAPT · systemd · NGINX

Choose where the relay runs

Use a relay when the firewall accepts a feed URL but has no field for HTTP credentials. The Linux host downloads Critical Pro using its own Device ID and token. Your firewall periodically reads a verified text file from the relay over your private network. On FortiGate, you can also configure the authenticated feed directly.

ExampleReplace with
feed-relay.example.invalidAn internal DNS name that resolves to the relay and appears in its TLS certificate.
192.0.2.10The IPv4 address of the relay's private interface. NGINX listens here.
192.0.2.20/32The firewall's source address as seen by the relay. Add individual addresses for an approved HA pair.

Use a dedicated private host with an accurate clock, DNS and outbound HTTPS access to the feed origin and package sources. Restrict inbound TCP 443 to the authorized appliances before installing NGINX. Keep administrative access on your management network.

Get the reference files

The Python updater validates one generation at a time and publishes the complete IPv4 list and its splits. The NGINX example serves these files over HTTPS. The systemd service and timer are used on AlmaLinux, Rocky Linux, Debian and Ubuntu. The Alpine guide supplies its launcher and crond schedule.

On a systemd host, download the four files into a temporary work directory after installing curl and the CA certificates. Review the files and continue from this same directory.

Linux / download the reference files
work=$(mktemp -d) && cd "$work" && (
  set -eu
  for file in refresh.py data-shield-relay.service data-shield-relay.timer nginx.conf.example; do
    curl --proto '=https' --fail --show-error --silent --output "$file" \
      "https://data-shield.eu/downloads/feed-relay/$file"
  done
)
ls -l

Save the relay credential

Use the Device ID and token issued for this relay, or the credentials shown after demo activation. Open a root shell in a private terminal on the relay, run the following command and leave the root shell when finished. The prompts hide both values and atomically replace the root-only credential file. The relay retrieves its private manifest from the same origin as this complete feed URL.

Critical Pro / upstream full file
https://feeds.data-shield.eu/feeds/critical/prod_critical_data-shield_ipv4_blocklist.txt
Root shell / Device ID and token
install -d -m 0700 /etc/data-shield-relay
python3 - <<'PYTHON'
import getpass
import os
from pathlib import Path
import re
import tempfile
import warnings

if os.geteuid() != 0:
    raise SystemExit("Run this command in a root shell.")
warnings.simplefilter("error", getpass.GetPassWarning)
device = getpass.getpass("Data-Shield Device ID: ")
token = getpass.getpass("Data-Shield device token: ")
if not re.fullmatch(r"[0-9a-f]{32}", device) or not re.fullmatch(r"[A-Za-z0-9_-]{20,128}", token):
    raise SystemExit("Check the Device ID and token, then try again.")
path = Path("/etc/data-shield-relay/device")
with tempfile.NamedTemporaryFile(dir=path.parent, mode="w", delete=False) as stream:
    temporary = Path(stream.name)
    try:
        stream.write(device + "\n" + token + "\n")
        stream.flush()
        os.fsync(stream.fileno())
        os.replace(temporary, path)
    finally:
        temporary.unlink(missing_ok=True)
PYTHON

Prepare the private TLS endpoint

Ask your organization’s certificate authority for a certificate covering the private DNS name of this relay in its Subject Alternative Name. Install the leaf certificate followed by intermediate certificates as /etc/nginx/tls/feed-relay.crt, and the matching private key as /etc/nginx/tls/feed-relay.key readable only by root. Use a root-only TLS directory. Trust the issuing CA on the firewall. In the NGINX example, replace the listening address, the DNS name in both locations and the client source address. Keep the allowlist followed by deny all.

After renewing or updating the certificate, run the appropriate NGINX configuration test and reload from your OS guide.

Understand verified updates

The updater authenticates over HTTPS, fetches the private manifest and downloads the splits for its generation. It validates IPv4 entries, record counts, sizes and SHA-256 digests, then publishes the complete list and all splits together. A failed download keeps the previous verified snapshot. Confirm the first successful run before enabling access on the network.

Connect the firewall and verify delivery

Replace the example hostname in the URLs below. In the firewall's IP feed or URL-table field, enter the internal URL of the complete file. If the appliance has a per-list limit, create a separate feed for every split shown in /var/lib/data-shield-relay/current/. Each split contains up to 30,000 IPv4 addresses. Use the same policy scope for all splits. The firewall needs no Data-Shield credentials when reading these restricted LAN URLs.

Firewall / complete IPv4 file
https://feed-relay.example.invalid/critical.txt
Firewall / first split example
https://feed-relay.example.invalid/critical-aa.txt

Run this check from the firewall or an authorized source address. A successful first download returns HTTP 200 with a nonzero byte count. For a private CA not yet in the test client's trust store, add --cacert /path/to/issuer-ca.pem. From a different LAN address, the access rule should reject the request with HTTP 403, or your network firewall should prevent the connection.

Authorized client / verify the complete download
curl --fail --show-error --silent --output /dev/null \
  --write-out 'HTTP %{http_code} | %{size_download} bytes\n' \
  https://feed-relay.example.invalid/critical.txt

Refresh the connector in the firewall, check its latest successful update and inspect the imported IPv4 entries before applying a blocking policy. If using splits, verify each connector. The updater picks up new splits automatically. A firewall configured with individual URLs needs a new connector for each new file. Enable optional split alerts to track additions.

Recover a failed refresh or retire the relay

  • Upstream HTTP 401. Check that the device is active and that its Device ID and token match. After replacing the token in the portal, repeat the credential prompts and run the update command in your OS guide.
  • TLS error, HTTP 403 or HTTP 404 on the firewall. Check the certificate chain, private DNS name, the firewall’s actual source address and the exact filename in current/.
  • Stale feed. Check the last successful updater run, scheduler and logs on the relay. Compare them with the last import and entry count shown by the firewall.
  • Retire the relay. Turn off its refresh schedule, remove the private HTTPS endpoint and reload NGINX. Revoke that device and remove its credential and cached files according to your retention policy. Revocation stops upstream downloads. Your internal HTTPS endpoint controls access to existing copies.

BETTER DATA. TOGETHER.

Need a correction?

Report a documentation issue or request a review of an address. Keep credentials and private configuration out of public issues.

Report an issue ↗Block request ↗Whitelist request ↗