Guide

Isolate a test network

A machine used for security testing should reach the internet and nothing inside the school. Give it its own switch and interface, with rules that block every internal network.

15 minutesOptional
What improves

A security testing machine cannot touch the school network.

Why it matters

Testing tools on the main network can disrupt or expose real systems.

How you do it

Give it its own switch and interface, with rules that allow the internet and block every internal network.

Every name, address and value in this guide is an example. Replace them with your own.

Add a private switch and a third card

Hyper-V host
New-VMSwitch -Name "CON-TEST" -SwitchType Private
Add-VMNetworkAdapter -VMName "CON-FW-01" -SwitchName "CON-TEST"

A Private switch has no connection to the host. In pfSense, assign the new card (hn2) as an interface called CON_TEST with address 10.0.66.1/24, and give it a DHCP range.

Add the rules

The source for every rule is CON_TEST subnets.

#ActionProtocolDestinationPortDescription
1PassTCP/UDPCON_TEST address53CON-FW-Test-DNS-Local
2PassUDPCON_TEST address123CON-FW-Test-NTP-Local
3BlockanyThis FirewallanyCON-FW-Test-BlockFirewall
4BlockanyCON_InternalanyCON-FW-Test-BlockInternal
5PassanyanyanyCON-FW-Test-Internet-Outbound

This network uses the firewall for DNS, because it is not part of the domain. Add the WAN-side network to CON_Internal if the firewall sits behind another private network.

Prove the isolation

The test machine
ping -c 2 1.1.1.1                 # works: internet
nc -zv -w 3 10.0.20.10 389        # fails: a domain controller
nc -zv -w 3 10.0.50.100 445       # fails: a client
nc -zv -w 3 10.0.66.1 443         # fails: the admin page

The machine cannot ping its own gateway. Rule 3 blocks it, and that is the intended result.

Leave private-network blocking off on this interface

"Block private networks" belongs on WAN only. On an internal interface it blocks every client on it.

Your progress is kept in this browser only.