← Back to blog
DOMAIN RESTRICTIONS nodetonet.com

Domain allow- and deny-lists — locking the tunnel to its targets

N Nodetonet Team
April 18, 2026 7 min read

An ordinary Nodetonet tunnel will reach anywhere on the public internet. That is fine for most workflows — you point your scraper at one site and ignore that the proxy could, in principle, reach a million others. But "could" is a problem the moment someone else gets the credentials, the moment a script gets a typo in its target hostname, or the moment a regulator asks where your residential bandwidth has been spent.

TL;DR — domain restrictions let you attach a per-proxy firewall to the destination side of every connection, complementing IP allow- and deny-lists on the source side.

Together, source-IP restrictions (who can connect to your proxy) and domain restrictions (where your proxy is willing to go) give you a two-wall sandbox. Breach one wall and the other limits the damage. This guide explains how the two modes work, what the wildcard syntax means, how blocked requests behave, and which real-world patterns work best.

The two modes

Each proxy carries exactly one domain-restriction mode. There are three choices:

ModeWhat it doesBest for
Off (default) No domain filter. The proxy dials any hostname the client requests. General-purpose tunnels with no target constraint.
Allow-list Only hostnames on the list may be reached. Every other destination is blocked at the proxy before a connection attempt is made. Single-site scrapers, staging sandboxes, compliance-scoped proxies.
Deny-list Every destination is permitted except those on the list, which are refused. Blocking analytics, ad networks, or sensitive internal infrastructure from a shared tunnel.

You cannot combine modes — one tunnel, one mode. Switching modes is instantaneous: new connections respect the updated rule immediately, while existing in-flight connections are not torn down. That means you can tighten a rule mid-job without killing the work that prompted you to tighten it.

Where to configure it

Open the proxy you want to restrict in the panel, click Settings, then switch to the Domain Restrictions tab. You will find a mode dropdown and a textarea for entries, one host per line. Hit Save and the rule is live within a second or two for new connections.

The same surface is available through the API, which matters if you manage dozens of proxies programmatically. See the REST API quickstart and the API section below. If you manage large numbers of proxies at once, see bulk operations for patterns that handle hundreds in one call.

Wildcard syntax and matching rules

Each line in the entry textarea is a hostname pattern. Four forms are accepted:

If you want both the apex and all subdomains, list them on separate lines:

example.com
**.example.com

Matching happens on the hostname the client declared, not on the resolved IP. For HTTP CONNECT and SOCKS5 tunnels, that is whatever host the client put in its request. For HTTPS tunnels, it is the SNI field from the TLS handshake. The system never trusts a destination IP to claim it belongs to an allowed hostname — that direction is trivially spoofable.

How blocked requests look

A client that tries to reach a hostname blocked by the current rule does not get a network-level timeout — it gets an explicit proxy-level refusal:

HTTP/1.1 403 Forbidden
X-Nodetonet-Reason: target-not-allowed

SOCKS5 clients receive a Rule failure reply with code 0x02. This is distinct from a DNS resolution failure or a connect timeout, which would mean the proxy tried and the target did not respond. A clean 403 means "refused on principle — this destination is not on your list."

Every blocked attempt is logged in the proxy's request log as BLOCKED · domain with the requested host, giving you a complete forensic trail. If your scraper reports it is stuck but the panel shows zero blocked attempts and zero allowed attempts, the request never reached the tunnel at all — check the client's proxy configuration, not the domain list.

Practical patterns

Single-site scraper

Set mode to allow-list with one entry:

**.targetsite.com

Even if the credentials are compromised, the attacker can only reach that one domain through the proxy. Combined with IP restrictions on the source side and per-client credentials, this is as locked-down as a single proxy gets.

Staging sandbox

Allow-list with your internal staging hostname:

*.staging.internal

A tester assigned this proxy cannot accidentally hit production through the same endpoint. Pair with thread limits to cap concurrency in the test environment.

Block telemetry and ad networks

Set mode to deny-list and add the usual analytics endpoints:

*.google-analytics.com
*.doubleclick.net
*.facebook.net
*.hotjar.com

Any device paired through this proxy will not phone home to these services, whether the client app requests it or not. This is a lightweight privacy mode for a shared mobile proxy.

Compliance scope

If you operate in a regulated environment where certain content categories must not transit your infrastructure regardless of what downstream clients request, a deny-list of the relevant domains lets the proxy enforce that rule at the network layer — before the request is ever proxied. Log inspection afterwards is still advisable but the rule is structural, not dependent on log review.

API control

Domain restrictions are fully scriptable. To set an allow-list from the command line:

curl -X PATCH -H "Authorization: Bearer $KEY"   -H "Content-Type: application/json"   -d '{"domainMode":"allow","domainEntries":["**.targetsite.com"]}'   https://nodetonet.com/api/v1/proxies/<id>

The domainMode field accepts off, allow, or deny. The domainEntries array uses the same wildcard syntax as the panel. To disable all domain filtering, send {"domainMode":"off","domainEntries":[]}. For provisioning many proxies with matching rules in one pass, see bulk operations and the Python tunnel creation guide.

Domain restrictions vs IP restrictions — which to use

The two restriction types are orthogonal and complement each other:

Apply both simultaneously for maximum containment. Source-IP restrictions stop unauthorized users from connecting at all; domain restrictions limit the blast radius if credentials do leak. Neither replaces the other. See also quota limits and time-limited clients for the remaining per-client controls you can stack on top.

Related features and next steps

Frequently asked questions

What is the difference between an allow-list and a deny-list for domains?
An allow-list permits only the hostnames you explicitly list and blocks everything else. A deny-list blocks only the hostnames you list and permits everything else. Allow-lists are stricter and better for single-purpose proxies; deny-lists are better for broad tunnels where you only need to exclude a few endpoints.
Can I use wildcards in my domain restriction entries?
Yes. Use *.example.com to match one subdomain level, **.example.com to match any depth, or an exact hostname for the apex only. To cover both the apex and all subdomains, add both example.com and **.example.com as separate lines.
Do domain restrictions apply to both HTTP and SOCKS5?
Yes, both protocols are covered. HTTP CONNECT tunnels are filtered by the hostname in the CONNECT request; SOCKS5 tunnels are filtered by the hostname in the SOCKS5 connection request (or the SNI for TLS traffic). In both cases the rule fires before any outbound connection is attempted.
Does changing the domain restriction disconnect existing connections?
No. Existing in-flight connections continue until they naturally close. Only new connections made after the change see the updated rule. This makes it safe to tighten or loosen restrictions during an active job.
How does a client know if its request was blocked by a domain restriction?
HTTP clients receive a 403 response with the header X-Nodetonet-Reason: target-not-allowed. SOCKS5 clients receive a reply code of 0x02 (Rule failure). Both are clearly distinct from network-level errors like timeouts or DNS failures, which mean the proxy tried but the target did not respond.
Can I combine domain restrictions with IP restrictions on the same proxy?
Yes, and doing so is recommended for maximum security. IP restrictions control who may connect to the proxy; domain restrictions control where the proxy is willing to go. Together they form a two-wall sandbox — if one is bypassed, the other still limits damage. See the IP allow- and deny-lists guide for the source-side setup.
N

Nodetonet Team

Building Nodetonet — a prepaid proxy + tunneling platform that replaces ngrok, Cloudflared and a residential proxy provider with a single panel.

Related posts