Documentation

Polfence docs

Polfence speaks the standard dyndns2 remote-access protocol. If your client can update Dyn, No-IP or DuckDNS, it can update Polfence.

Looking to automate the whole platform (zones, networks, access, audit)? See the REST API reference.

Quick start

  1. Create an account and add a hostname.
  2. Copy the update URL (it includes your token) from the hostname page.
  3. Paste it into your router's DDNS settings, or run it from any always-on device.

The update API

Send an HTTP GET (or POST) to:

GET https://update.polfence.net/nic/update?hostname=<FQDN>&myip=<IP>&token=<TOKEN>

Plain http:// works too — the update endpoint never redirects, so routers and embedded clients without modern TLS can still update.

Parameters:

ParameterMeaning
hostnameThe FQDN to update, e.g. myhome.polfence.net. Comma-separate to update several at once.
myipThe IPv4 and/or IPv6 to set (comma-separated). Omit to use the address the request comes from.
tokenYour per-host update secret. Alternatively send it as the HTTP Basic password.

The response is plain text, one line per hostname:

ResponseMeaning
good <ip>The record was updated to the given IP.
nochg <ip>The IP was already current — nothing changed.
nohostNo such hostname, or it isn't yours.
badauthMissing or wrong update token.
notfqdnThe hostname was malformed or no usable IP was supplied.
abuseThe hostname is paused or blocked.

Authentication is either the token query parameter or HTTP Basic auth, where the password is your update token. The username is recorded but not checked, so any value works.

Automatic IP detection

Leave out myip and Polfence uses the source address of the request — ideal when the updating device is the one whose IP you want to publish. To set a specific address (or both families), pass them explicitly:

# IPv4 + IPv6 in one call
curl "https://update.polfence.net/nic/update?hostname=myhome.polfence.net\
&myip=203.0.113.10,2001:db8::10&token=YOUR_TOKEN"

Router setup (dyndns2)

In your router's Dynamic DNS section, pick a Custom / dyndns2 provider and map the fields:

FieldValue
Serverupdate.polfence.net
Update path/nic/update?hostname=<domain>
Hostnamemyhome.polfence.net
Usernameyour account email
Passwordyour update token

ddclient

Run ddclient on any Linux/macOS box that's always on:

# /etc/ddclient.conf
protocol=dyndns2
use=web, web=checkip.amazonaws.com
server=update.polfence.net
ssl=yes
login=you@example.com
password=YOUR_TOKEN
myhome.polfence.net

Let's Encrypt & wildcard certificates (ACME DNS-01)

Every hostname can publish TXT records, so you can issue real certificates — including wildcards like *.myhome.polfence.net — via the ACME DNS-01 challenge. Manage records on the hostname page, or let your ACME client publish them itself through our lego-compatible endpoint (httpreq provider, authenticated with the hostname's update token):

export HTTPREQ_ENDPOINT=https://www.polfence.com/api/acme
export HTTPREQ_USERNAME=polfence
export HTTPREQ_PASSWORD=YOUR_TOKEN

lego --email you@example.com --dns httpreq \
  -d 'myhome.polfence.net' -d '*.myhome.polfence.net' run

The same works from Traefik (certificatesresolvers.…​.acme.dnschallenge.provider=httpreq) and anything else built on lego. Enable Wildcard records on the hostname to also resolve every subdomain to your IP.

Polfence Shield — filtering DNS (DoH)

Shield is a filtering DNS resolver: every device you point at it gets malware, phishing, ads, trackers and any category you choose blocked at the DNS layer, before a connection is ever made. Queries are answered over DNS-over-HTTPS, resolved through EU upstreams (Quad9, Mullvad) and logged, if you want them logged, in the EU only. Each profile in the dashboard gets its own private endpoint:

https://www.polfence.com/dns-query/<TOKEN>

The token is the credential. Anyone holding the URL resolves through your policy and shows up in your log, so rotate it from the profile page if it leaks.

Shield: the DoH endpoint (RFC 8484)

The endpoint speaks standard wire-format DNS-over-HTTPS, so every OS, browser and router that supports a custom DoH template works unchanged:

RequestMeaning
GET /dns-query/<TOKEN>?dns=<base64url>The DNS message, base64url-encoded without padding.
POST /dns-query/<TOKEN>Body is the raw DNS message, Content-Type application/dns-message.
GET /dns-query/<TOKEN>/json?name=&type=DoH-JSON, same shape as Google / Cloudflare, plus a polfence object explaining the verdict.

Responses:

StatusMeaning
200 application/dns-messageThe answer. Cache-Control: max-age follows the lowest TTL in the response.
400Not a parseable DNS query with exactly one question, or a missing dns parameter.
404Unknown or disabled token. Deliberately indistinguishable so tokens can't be probed.
413 / 415Message larger than 4096 bytes / POST without application/dns-message.

A quick check from any shell:

curl -H 'accept: application/dns-json' \
  'https://www.polfence.com/dns-query/<TOKEN>/json?name=example.com'

# A blocked name — NXDOMAIN plus the reason:
curl 'https://www.polfence.com/dns-query/<TOKEN>/json?name=malware.testing.google.test'
# → {"Status":3, …, "polfence":{"action":"blocked","reason":"malware", …}}

Shield: how a query is decided

  1. Allow list — an entry on your allow list always wins, even over a category block. Use it to un-break a site.
  2. Deny list — your own blocks, regardless of category.
  3. Categories — malware, phishing, cryptomining, newly registered, ads, trackers, adult, gambling, social. Security categories are evaluated first so the log attributes a block to the most serious reason.
  4. Safe search — when enabled, google.*, bing.com, duckduckgo.com and youtube.com are answered with their enforced-safe endpoints.
  5. Everything else is forwarded upstream and cached for its TTL (at most 5 minutes).

Matching walks up the name: a query for a.b.example.com checks b.example.com, example.com and finally com, so a single list entry covers every subdomain. In your own lists, example.com matches the domain and all subdomains while *.example.com matches subdomains only.

Blocked names get NXDOMAIN with a 10-second negative-cache SOA, which every stub resolver handles cleanly (apps see “host not found” instead of hanging on 0.0.0.0). Each profile can switch to 0.0.0.0/:: answers under Protection → Blocked answer (some smart-TV and IoT firmware prefers it); SHIELD_BLOCK_MODE=zero changes the deployment default.

Two more sources sit between your deny list and the categories:

  • Sentinel threat list — domains Polfence Sentinel flagged in real traffic (beaconing, DGA, phishing infrastructure) plus admin additions. On by default per profile; a hit is logged with reason sentinel and raises shield.threat. Entries expire on their own.
  • Schedules — extra categories that apply only inside time windows, see below. A scheduled block is logged with its category and the JSON endpoint adds "scheduled": true.

Shield: per-device URLs

One profile can serve a whole office. Add named devices on the profile page and each gets its own URL under the same token:

https://www.polfence.com/dns-query/<TOKEN>/<DEVICE>
https://www.polfence.com/dns-query/<TOKEN>/<DEVICE>/json?name=example.com

<DEVICE> is the device’s URL name (letters, digits, dashes — e.g. reception-pc). The policy is identical; only attribution changes: the query log gets a device column, analytics and the weekly report break down per device, and the device’s “last seen” and client IP update. An unknown device name answers 404 like an unknown token. Queries on the plain profile URL are logged without a device.

Each device has its own .mobileconfig download for Apple platforms; every other platform takes the per-device URL wherever it takes the profile URL. Rotating the token rotates all device URLs at once.

Shield: schedules

A schedule adds categories during time windows — social networks 09:00–17:00 on weekdays, gambling overnight. Windows are evaluated on a wall clock in the profile’s IANA time zone (Settings → Time zone), so daylight-saving changes are handled for you. The stored form is JSON:

[
  { "days": [1,2,3,4,5], "from": "09:00", "to": "17:00", "categories": ["social"] },
  { "days": [0,1,2,3,4,5,6], "from": "22:00", "to": "06:00", "categories": ["gambling"] }
]
FieldMeaning
daysWeekdays the window starts on: 0 = Sunday … 6 = Saturday.
from / toHH:MM on that wall clock. to before from = overnight, belonging to the day it starts on. from = to = the whole day.
categoriesCategory keys added while the window is open. The profile's permanent categories always apply.

The profile page shows “Active now: +Social networks” while a window is open and “Test a domain” evaluates the current moment. Up to 12 windows per profile.

Shield: pointing devices at it

PlatformWhere
Windows 11netsh dns add encryption server=<IP> dohtemplate=<URL>, then set the adapter's DNS to <IP> with DoH On (manual template).
macOS / iOS / iPadOSDownload the .mobileconfig from the profile page (com.apple.dnsSettings.managed payload) or push it via MDM.
Chrome / Edge / BraveSettings → Security → Use secure DNS → Custom → paste the URL.
FirefoxSettings → Privacy & Security → DNS over HTTPS → Max Protection → Custom.
Routers, Pi-hole, AdGuard HomeUse the URL as the DoH upstream (AdGuard Home natively; Pi-hole via cloudflared proxy-dns; OpenWrt via https-dns-proxy).
AndroidPrivate DNS only speaks DNS-over-TLS; Shield is DoH-only today. Use a DoH client app (Intra, RethinkDNS) or Chrome's secure-DNS setting until DoT ships.

Every profile page has copy-paste instructions for each platform with your token already filled in.

Shield: logging, retention and limits

With logging on, each query stores the domain, record type, verdict, client IP, GeoIP country and resolver latency. Retention is per profile (1 day to 1 year) and enforced by the resolver itself; “Clear” on the profile page wipes the log immediately. Turn logging off for a strict no-logs resolver — filtering and the threat alerts keep working, only the log and analytics stop.

Custom lists can be imported and exported as text (one domain per line, hosts format, adblock ||domain^ and @@||domain^, or the exported allow|deny domain form) — handy when moving from Pi-hole or NextDNS. With the weekly report on, the profile owner gets queries, block rate, top blocked domains, threats and a per-device breakdown by email every 7 days.

LimitValue
ProfilesFree 1 · Pro 5 · Business unlimited
Custom entries per profile500
Devices per profile200
Schedule windows per profile12
Query size4096 bytes (RFC 8484 maximum)
UpstreamQuad9 (Switzerland), fallback Mullvad (Sweden) — both DNSSEC-validating, no-logs operators
Threat alertsA malware / phishing / cryptomining block raises a shield.threat event (webhooks, alert rules), at most once per domain per hour

Ready to try it?

Your first three hostnames are free and resolve immediately.

Create a hostname
Documentation · Polfence