Screened subnets, proxies and content delivery networks

7 min 4 sections 4 practice questions 6 sources citedISC2 objective 4.1

Some servers have to be reachable by strangers: a website, a mail server. They cannot sit beside the payroll system, and they cannot sit unprotected on the internet. Networks solve this with a guarded middle zone, with stand-in servers called proxies, and with content delivery networks that keep copies of a site near its visitors. No background is assumed. A security professional needs this to say where a public service belongs and what should stand in front of it.

By the end of this unit you will be able to:

  • Tell apart a bastion host, a dual-homed host, a screened host and a screened subnet
  • Explain which traffic a screened subnet allows and which it blocks
  • Tell apart forward, reverse and transparent proxies
  • Explain what a content delivery network adds, what its provider can see and how the origin server is protected

The ticket site beside the collection records

An illustrative example

A museum sells tickets through a web server. The server sits on the same network as the database that records every object in the collection, who lent it and what it is insured for.

A flaw in the ticket site lets an intruder take control of the web server. From there the collection database is one step away, because nothing stands between the two machines. The museum's firewall faces the internet and never sees traffic that passes from one inside machine to another.

Where should the ticket server have been placed, and what should have stood on each side of it?

Where servers that face the public belong

A network that offers services to the public has three zones. Outside is the internet, which is not trusted. Inside is the internal network, or intranet: the network an organisation keeps for its own use and closes to outsiders. Between them is a small network with a on each side, called a screened subnet. Its older name is the demilitarised zone (DMZ). Servers that the public must reach are placed there.

What a screened subnet lets through
FromToRule
InternetScreened subnetAllowed, to named services only, such as the website on 443
Screened subnetInternal networkOnly the few named connections a public server needs, such as one database port
Internal networkScreened subnetAllowed for staff who manage the servers
InternetInternal networkNever directly

Public servers sit between two firewalls

Public servers sit between two firewallsThe internet outside, then the outer firewall, the screened subnet holding the web server, the inner firewall and the internal network holding the database. A dashed line from the internet to the internal network reads never directly.Internetnot trustedOuterfirewallnamedservicesInnerfirewallnamedports onlyScreenedsubnetonce the DMZWeb serverbastion host,hardenedInternalnetworkthe intranetDatabasestaff systemsand datanever directlyPublic servers sit between two firewallsThe internet outside, then the outer firewall, the screened subnet holding the web server, the inner firewall and the internal network holding the database. A dashed line from the internet to the internal network reads never directly.Internetnot trustedOuterfirewallnamedservicesInnerfirewallnamedports onlyScreenedsubnetonce the DMZWeb serverbastion host,hardenedInternalnetworkthe intranetDatabasestaff systemsand data
Read this figure as text

A network that offers services to the public has three zones: the internet outside, the internal network inside, and between them a small network with a firewall on each side, the screened subnet. Its older name is the demilitarised zone, or DMZ.

  1. The internet is not trusted. Its traffic first meets the outer firewall.
  2. The outer firewall allows traffic into the screened subnet to named services only, such as the website on TCP 443. The web server there is a bastion host: exposed, expected to be attacked, and hardened to run only its own service.
  3. From the screened subnet the inner firewall allows only the few named connections a public server needs.
  4. One example is a single database port to the internal network, the intranet, which holds staff systems and data. Staff who manage the servers are allowed the other way, from the internal network into the screened subnet.
  5. The internet never reaches the internal network directly. An intruder who takes over the web server is in the screened subnet and still faces the inner firewall.

The point of the middle zone is what happens after a break-in. An intruder who takes over a public server is in the screened subnet and still faces the inner firewall.

A bastion host is a computer that is exposed to the outside and expected to be attacked. It is hardened for that role: it runs only the service it exists for, and it is patched and watched closely. An extranet is a network that an organisation opens to named business partners. It is kept in a zone of its own and is often reached through a VPN.

Four firewall architectures

The screened subnet is the last of four classic ways to arrange firewalls, each adding a layer to the one before.

Firewall architectures from simplest to most layered
ArchitectureHow it is builtIf its exposed part is taken over
Screening routerOne router that filters between the internet and the internal networkNothing else stands in the way
Dual-homed hostOne computer with an interface in each network and routing between them switched off. Traffic crosses only through proxies on itThe attacker holds the only crossing point
Screened hostA filtering router sends all outside traffic to one bastion host, which sits on the internal networkThe attacker is already on the internal network
Screened subnetTwo filters with a small network between them that holds the bastion hostsThe attacker still faces the inner filter

Dual-homed means having two network interfaces, and multi-homed means having more than two. A three-legged firewall is a single multi-homed firewall with one interface for the internet, one for the internal network and one for the screened subnet. It costs less than two firewalls. Its weakness is that one device, and one set of rules, protects everything.

Screened host: the exposed server is inside. Screened subnet: the exposed server is between two filters.

Proxies stand in for one side of a conversation

A proxy is a server that makes requests on behalf of someone else, so that the two real ends never connect to each other directly.

Three kinds of proxy
KindActs forTypical use
Forward proxyClients inside, going outStaff browsers send requests to the proxy, which fetches the pages. It can block sites, scan downloads and keep a record
Reverse proxyServers, receiving visitorsVisitors connect to the proxy, which passes requests to the servers behind it. It hides them and can share load between them
Transparent proxyEitherThe network sends traffic through it without the client being set up to use it or knowing it is there

A reverse proxy that spreads requests across several identical servers is a load balancer. A reverse proxy often ends the visitor's TLS session as well, which lets it inspect the request before passing it on.

Network address translation (NAT) is often met at the same place. It rewrites the private addresses of inside devices to a public address as their packets leave. It hides the inside addresses, but it inspects nothing and applies no .

Common misconception

“Address translation protects a network, so a firewall behind it is optional.”

Translation changes addresses. It does not examine traffic, apply rules or stop an inside machine connecting out to an attacker. Filtering is the firewall's job.

A content delivery network: copies of a site near its visitors

A content delivery network (CDN), also called a , is a provider's network of servers in many places. These edge servers hold copies of a site's content. A visitor is sent to the nearest one. It answers from its cache, which is its stored copy, or fetches the content from the site's own server, the origin. A CDN is in effect a very large reverse proxy run by another company.

  • Speed: the content travels a shorter distance.
  • : the site is served from many places, so the loss of one does not take it down.
  • Absorbing floods: a distributed denial of service is spread across the provider's capacity and does not reach the origin.
  • Inspection at the edge: the provider can run a web application firewall in front of every customer's site.

The protection has conditions. The edge server ends the visitor's TLS session, so the provider holds a for the customer's name and sees the traffic unencrypted. There are two legs to the journey, visitor to edge and edge to origin, and each has to be .

An attacker who learns the origin's real address can go round the edge. The origin's firewall should therefore accept connections from the provider's edge servers and from nowhere else.

In cache poisoning an attacker tricks the cache into storing a harmful response, which is then served to every visitor until it expires. Pages that hold are marked so that they are never cached.

Common misconception

“A site behind a content delivery network cannot be attacked directly.”

The edge protects only the traffic that passes through it. If the origin server accepts connections from any address, an attacker who finds that address reaches it directly.

A question, worked through

An online ticket seller moved its website behind a content delivery network so that it could withstand floods of traffic. During the next attack the site went down all the same. The logs show the flood arriving at the web server's own IP address and not through the provider's edge servers.

What should the security manager recommend FIRST?

  1. Restrict the origin server to accept connections only from the edge servers
  2. Ask the provider to raise the capacity of the edge servers nearest the attack
  3. Move the origin server from the screened subnet onto the internal network
  4. Add a second delivery network so that one provider can cover for the other
Decide on your answer, then open the reasoning
  1. The question asks for the first step after an attack that reached the web server without passing the provider. The deciding fact is that the flood went round the edge.
  2. Rule out b and d: both add capacity at the edge. The attack did not touch the edge, so more of it changes nothing.
  3. Between a and c: moving a public server onto the internal network puts an exposed machine beside internal systems, which is the arrangement a screened subnet exists to avoid. It also does not hide the server's address.
  4. Option a closes the path the attack used. Once the origin accepts traffic only from the edge servers, a flood sent to its address is dropped.

Answer: A. Restrict the origin server to accept connections only from the edge servers

Choosing between good answers

A question asks where to place a server the public must reach
choose the screened subnet, with one filter towards the internet and one towards the internal network.
Two answers both protect a public server and one leaves it on the internal network
choose the one that keeps it between two filters. A screened host is weaker than a screened subnet.
Staff web browsing must be filtered and recorded
choose a forward proxy. When servers must be hidden or share load, choose a reverse proxy.
A site behind a content delivery network is attacked at its own address
restrict the origin to the provider's edge servers.
A question asks who can read traffic that passes through a content delivery network
the provider can, because the edge server ends the TLS session.

Try it

Follow a visitor's request through the outer zone to the servers behind the inner firewall, and note which rule admits each step.

Loading the preview.

Check your understanding

4 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.

These questions are drafts that no named reviewer has approved yet.

Question 1 of 4

A school must filter the websites its staff visit and keep a record of their browsing.

Which component meets this need?

What to remember

  • A screened subnet, formerly called a DMZ, is a small network between two filters that holds the servers the public must reach.
  • A bastion host is a hardened computer exposed to attack. A dual-homed host has an interface in each of two networks.
  • In a screened host design the exposed server sits on the internal network. In a screened subnet it does not.
  • A forward proxy acts for inside clients. A reverse proxy acts for servers. A transparent proxy needs no client setup.
  • A content delivery network caches a site at edge servers, which improves speed and availability and absorbs floods.
  • The provider of a content delivery network sees the traffic, and the origin must accept connections only from the edge.

Say it from memory

  1. What is a content delivery network, what does it add for security, and what must its customer still protect?

    A CDN, also called a content distribution network, is a provider's network of edge servers that hold cached copies of a site near its visitors. It improves speed and availability and absorbs denial-of-service floods. The provider ends the visitor's TLS session and sees the traffic. So both legs are encrypted, the origin accepts connections only from the edge, and personal pages are kept out of the cache.

    Read this part again

  2. What is a screened subnet, and what is a bastion host?

    A screened subnet, formerly the demilitarised zone (DMZ), is a small network with a firewall on each side, between the internet and the internal network, where servers the public must reach are placed. An intruder who takes over a public server still faces the inner firewall. A bastion host is a computer exposed to the outside, hardened to run only its service.

    Read this part again

  3. How does a screened host differ from a screened subnet, and what is the weakness of a three-legged firewall?

    In a screened host the exposed bastion host sits on the internal network, so an attacker who takes it over is already inside. In a screened subnet the exposed server sits between two filters, so the attacker still faces the inner filter. A three-legged firewall is one multi-homed firewall, so one device and one set of rules protects everything.

    Read this part again

  4. How does a forward proxy differ from a reverse proxy, and what is a transparent proxy?

    A forward proxy acts for clients inside going out: it fetches pages for staff browsers and can block sites, scan downloads and keep a record. A reverse proxy acts for servers, receiving visitors and passing requests to the servers behind it. A transparent proxy handles traffic without the client being set up to use it or knowing it is there.

    Read this part again

Sources