Glass index cards represent a DNS lookup beside a firewall that lets cyan packets through and stops a magenta packet.
TechVertu » Blog » Cybersecurity » DNS Filtering vs a Firewall: What Does Each Actually Block?

DNS Filtering vs a Firewall: What Does Each Actually Block?

DNS filtering can stop a laptop finding the address of a known phishing site. A network firewall can stop the laptop connecting to an address, even when DNS has supplied the right one. The difference matters when a supplier’s invoice link fails. A DNS block calls for a review of the hostname. A firewall deny calls for a review of the connection rule. If both allow the request, the invoice can still be fraudulent.

What does each control see?

A DNS filter applies a policy when a device asks a resolver for a name such as files.supplier.example. The UK National Cyber Security Centre explains how protective DNS services check the requested name and, in many cases, the IP address in the answer. A match can produce a DNS error or direct the browser to a block page. The query contains the hostname. It contains neither the invoice filename nor the contents of the file.

A network firewall makes a decision about traffic that reaches it. A rule might allow an office laptop to connect to a particular server on TCP port 443, commonly used for HTTPS. A stateful firewall also tracks the connection so it can recognise the replies. Firewall rules can also refuse unsolicited incoming connections or restrict traffic between two office networks. Its position matters. A firewall at the office boundary can only apply those rules to traffic that crosses it.

One appliance or cloud service can do both jobs. For example, Cloudflare Gateway distinguishes DNS, network and HTTP policies. A product described as a “DNS firewall” may be enforcing a policy on DNS lookups. To find out what it protects, ask which policy made the decision and what traffic reached it.

Follow one invoice link through both controls

An accounts clerk opens https://files.supplier.example/invoices/november.pdf. This is a fictional address. Assume the managed laptop needs a fresh lookup, uses the company’s filtering resolver and makes a new HTTPS connection over TCP through the office firewall. Here is what can happen to that same click under three different policies.

  1. DNS blocks the name. The resolver’s policy flags files.supplier.example. The laptop receives no usable address for the supplier, or receives the address of a block page. Look for the hostname and action in the DNS log. In this example there is no reason to expect a new firewall connection to the original supplier. A connection to the block page would have a different destination.
  2. DNS allows the name and the firewall denies the connection. The laptop receives the supplier server’s IP address from an A or AAAA record. It then tries to connect on TCP 443. The firewall’s outbound rule denies that traffic. The DNS allow and the firewall deny agree about what happened. Each records a different stage.
  3. Both allow the request. The browser can now try to fetch the PDF, subject to the server being available and the user having access. A firewall allow tells the accounts clerk nothing about who approved the invoice. If it requests new bank details, the UK government’s fraud guidance advises businesses to confirm the change with the supplier using established contact details. TechVertu’s business email compromise examples show what such a request can look like.

Coverage and limitations by scenario

The middle column assumes a DNS filtering service and an ordinary stateful firewall with IP, port and protocol rules. The last column identifies the evidence or extra feature that changes the answer.

DNS Filtering and Network Firewall Coverage
What the Business Wants to Stop What DNS and Network Rules Can Do What to Check
A visit to a known phishing hostname DNS can refuse a matching lookup. A network rule can deny a matching destination IP. An ordinary port rule allowing HTTPS has no information about the hostname’s reputation. Check the resolver’s threat policy and block response. Blocking a shared hosting IP can affect other sites at that address.
One unwanted file on an approved supplier portal Both invoice files use the same hostname, server and port. Blocking the hostname or address could take the whole portal away from accounts. Look for a web policy that can match a URL path. For encrypted traffic, check how the product gains visibility of the path.
A visitor reaching the finance printer, or an unsolicited connection from the internet Either connection can be attempted without a new lookup. A firewall can deny it if the traffic crosses a boundary with a matching rule. For the printer, check guest Wi-Fi separation and permitted destinations. For incoming traffic, identify the firewall on the route into the service.
A connection using an address the device already has DNS has no new query to evaluate on that attempt. The firewall can still act on a new connection to that IP and port. A valid local DNS cache entry can supply the address. An empty resolver search at the time of the click can be consistent with normal operation. A cached address can remain usable until its DNS TTL expires.
A harmful download from an allowed site The hostname and connection can both pass. A DNS or port-rule allow gives no verdict on the bytes downloaded. Check whether file inspection is enabled in the web gateway and what protection runs on the device. A Trojan can arrive disguised as an ordinary file.
The same unwanted destination on a laptop at home Office rules apply only if the relevant traffic still travels through them. The DNS policy can follow the laptop if it continues to use the managed resolver. Check the laptop’s managed DNS and routing policy. The NCSC discusses protecting roaming devices, including how users away from the office reach the service.

When can a firewall block one HTTPS page?

Hostname
files.supplier.example
The name sent to the DNS resolver.
Path
/invoices/november.pdf
The file requested inside the HTTPS connection.
Two parts of the same invoice URL. Only the hostname appears in the DNS query.

Suppose the accounts team needs /invoices/november.pdf on the supplier’s site, but a different file under /uploads/ has been reported. A fresh lookup for either file asks for the same hostname. Both can reach the same IP address on port 443. A decision based on either the hostname or the connection would affect both files.

Azure Firewall illustrates the distinction. The Azure Firewall feature comparison lists outbound hostname-based application rules across Basic, Standard and Premium. To match the path inside an HTTPS request, Azure Firewall Premium requires TLS inspection on the applicable rule. That involves decrypting the traffic for inspection and re-encrypting it. Microsoft documents the certificate authority and client trust requirements. Inspection has privacy and application-compatibility implications worth reviewing before deployment.

There is a second dependency even on Premium. Under Azure Firewall’s rule processing order, a matching outbound network rule ends evaluation before an application rule can inspect that request. When an administrator expects one file to be denied, the first question is which rule actually matched. Buying a tier with URL filtering does not establish that the request reached it.

Which log explains a blocked site?

Start with the time and time zone, the device, the hostname and whether the user was in the office or working remotely. Avoid copying a full invoice link into a support ticket if it contains a private sharing token.

A resolver record answers “What name was requested, and what did DNS do?” For example, Cloudflare Gateway’s DNS logs identify the query and policy action. A denied query points to a name-policy decision. An allowed query alone does not establish that a person visited the site, opened the PDF or completed a payment.

A firewall record answers “What connection or application request reached this firewall, and which rule handled it?” Look for the device or its translated source address, the destination, protocol, port and action around the same time. Azure Firewall’s monitoring documentation distinguishes network and application rule logs and explains how to collect them. If the log is empty, check the route, logging settings and time window before drawing a conclusion. For an internal file share, the Windows network sharing guide walks through name resolution, connectivity and host firewall checks.

If both systems allowed the request and the user saw “access denied” inside the supplier portal, start with the portal’s permissions and application logs. Changing a DNS or firewall rule would answer a different question.

Frequently asked questions

Get help reviewing firewall rules

If a business service is being blocked, bring the time of the request, the affected device and the rule that matched. TechVertu can help review firewall configuration and access policies.

Subscribe for Latest Tech Insights & Company News

anything else?

Lets Talk!

If you have additional comments or questions about this article, you can share them in this section.

Your email address will not be published. Required fields are marked *


Scroll to Top