SlideShare a Scribd company logo
10
Most read
12
Most read
14
Most read
Creating a DMZ
January 2016 Hangout
Jim Pingle
Creating a DMZ
● Project News
● What is a DMZ?
● DMZ Diagram
● Designing the DMZ
● Protecting Servers
● Preparing for the DMZ
● Creating the DMZ
Interface
● Services for the DMZ
● Firewall Aliases
● NAT Considerations
● Firewall Rules for the
DMZ
● Firewall Rules for LANs
● VPN Concerns
● Q&A
Project News
● 2.2.6 is out
● 2.3 is now BETA!
– Release timeline will roughly parallel FreeBSD
10.3-RELEASE
– Snapshots at https://snapshots.pfsense.org/
– Most popular packages have been
converted/updated for Bootstrap
– Less than 50 open new bugs to go
● Keep an eye on the blog
What is a DMZ?
● Co-opted military term meaning Demilitarized Zone
● Used to house public services, away from sensitive internal systems
● It is considered LESS secure than LANs or internal networks
● It is considered MORE secure than the Internet at-large
● DMZ is protected from the LAN(s), LAN(s) protected from DMZ
● Must be on a separate layer 2, not just a separate subnet
● If a server is compromised in a properly isolated DMZ, the LAN is not at significant
risk
● Examples of items in the DMZ: Web, E-Mail, PBX, Proxy, etc
● Can utilize separate firewalls, but more often is an additional interface
● SOHO gear uses the term “DMZ” incorrectly, typically they mean 1:1 NAT on the
WAN IP address to an internal host, that is not an actual DMZ in the correct sense
and it is not secure
DMZ Diagram
Internet DMZ
WAN
pfSense
Servers
LAN
Clients
Designing the DMZ
●
Public IP addresses or private IP addresses?
– Neither is inherently more secure, both can be made insecure by rules
– Public:
●
Less overhead and headaches!
●
Easier routing and DNS
●
No need for port forwards, 1:1 NAT, or NAT reflection
●
No need for outbound NAT for the subnet
●
Firewall rules only
●
Requires a routed subnet from ISP, different from the WAN subnet
●
Some services such as a PBX do better without NAT involved
– Private:
●
Will still need outbound NAT
●
Will need port forwards, 1:1 NAT, or other means of forwarding in traffic (e.g. proxy or load balancer)
●
More complicated when allowing traffic between LAN and DMZ (NAT reflection or split DNS)
●
Will need to pick a private non-overlapping subnet, preferably one that summarizes w/LAN
●
Can work using VIPs in the WAN subnet, or depending on the services, just the WAN IP address
●
Separate VLAN or switch?
– Separate physical switches are more secure
– VLAN on the switches, vmware vswitch, etc
●
How many separate DMZ interfaces will there be?
Protecting Servers
● The firewall can only protect traffic between networks
● Servers also need protection from other servers
● A few tactics are possible:
– Host-based firewalls on the servers themselves
– Multiple DMZ interfaces (web, client proxy, mail, VoIP, etc)
● DB servers should be in an even more secure style DMZ and
monitored, or isolated behind another system
– Service config, limit # of listening daemons
– Switch port isolation
● Only viable if the servers do not need to reach each other
Preparing for the DMZ
● Create isolated L2 (switch or VLAN)
● Prepare the physical NIC or interface for use by pfSense
– Install a NIC if possible or necessary
– Add VLAN tag if VLANs are required
● Do not multi-home servers in DMZ and LAN!
– Servers should not have NICs in both networks
– Weakens security
– Defeats the point of the DMZ, if the server is compromised it
has access to both networks
– Creates asymmetric routing problems
Creating the DMZ Interface
● In pfSense...
● Interfaces > (assign)
● Choose the interface
● Click + to add it as an OPT interface
● It will show in the list, note its name
● Interfaces > OPTx
● Check Enable
● Give it a name (e.g. DMZ or DMZ_Web)
● Select and configure IPv4 and IPv6 addresses chosen earlier
● Save, Apply
Services for the DMZ
● Optionally enable DHCP Server
– Servers are usually static, but you could use static
mappings or use DHCP for temporary access while
bringing up new systems
– Services > DHCP Server, DMZ tab
– Enable, set a range, save, etc.
● If other local services had strict bindings (e.g.
DNS Resolver, NTP), adjust accordingly
Aliases to Make Things Easier
● Firewall > Aliases
● Make aliases for servers and groups of ports for
services
– Example: web_servers alias with IP addresses of servers
– Example: web_ports alias with 80 and 443
– Similar for mail, db, whatever is needed and requires
public exposure.
● Make an RFC1918 alias with private networks
(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
NAT Considerations
● Private IP Addresses on DMZ:
– Add port forwards or 1:1 NAT as needed to direct traffic inbound
– Port forwards get rules automatically
– 1:1 NAT needs manual firewall rules, use the private IP address as target
– If LAN clients must contact servers by NAME, consider split DNS (local DNS
resolves to local IP address of the server)
– If split DNS is not possible and LAN must reach the DMZ, enable NAT reflection
(System > Advanced, Networking tab)
● Public IP Addresses on DMZ:
– Switch to Hybrid Outbound NAT and add a rule to “not” NAT the public subnet
source
– OR –
– Switch to Manual Outbound NAT and remove rules referencing the subnet
Firewall Rules for the DMZ
● Rules on WAN to allow access to public services inbound
● DMZ hosts should NOT have access to the LAN unless
absolutely necessary
– If unavoidable, it should be heavily restricted
● It is usually OK to allow access from the DMZ to the
Internet, but it could also be restricted
– Example: To allow OS/software updates, remote queries, active
FTP from remote clients, etc
● Utilize the RFC1918 alias to prevent the servers from
reaching local private networks and VPN networks
Firewall Rules for LANs
● The LAN should not have unrestricted access to the DMZ either, but
it is not as important as restrictions in the other direction
– Ideally, only allow access to the same IP addresses and ports accessible
from the WAN, though managing rules for that case can be complex
– Consider rougue or compromised clients on the LAN and what they could do
to servers in the DMZ (e.g. virus infected clients)
● Unsecure LANs, such as guest networks, should be more strictly
isolated from the DMZ
● With Multi-WAN, add rules to pass traffic to DMZ without a gateway
set
● Don't rely on policy routing to isolate, it can be OK at times but not a
perfect means of security.
VPN Concerns
● Consider what systems must communicate across the VPN
● If the servers must reach remote VPN systems, be strict
with rules passing the traffic out that direction
– Could be DR replication, backups, etc
● If remote VPN systems must reach servers in the DMZ, use
rules on the VPN interface tab(s) appropriate for the role of
the VPN
– Example: A remote access admin VPN for ops employees should
have more access than a site-to-site VPN with untrusted clients
Expand from here...
● Add more servers, ports, additional DMZs,
additional LANs, and so on
● Keep the rule styles similar, isolating each
segment from all the others
● Interface groups can help with rules, but be
careful of rule ordering when using them.
● Consider monitoring DMZ traffic with an IDS
(Suricata, Snort, etc)
Conclusion
● Questions?
● Ideas for hangout topics? Post on forum,
comment on the blog posts, Reddit, etc

More Related Content

PDF
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
PDF
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
PDF
Local DNS with pfSense 2.4 - pfSense Hangout April 2018
PDF
Configuring Netgate Appliance Integrated Switches on pfSense 2.4.4 - pfSense ...
PDF
Linux Networking Explained
PPT
Linux Networking Commands
PDF
66 pfsense tutorial
PDF
Open vSwitch Introduction
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Local DNS with pfSense 2.4 - pfSense Hangout April 2018
Configuring Netgate Appliance Integrated Switches on pfSense 2.4.4 - pfSense ...
Linux Networking Explained
Linux Networking Commands
66 pfsense tutorial
Open vSwitch Introduction

What's hot (20)

PDF
netfilter and iptables
PDF
Cilium - BPF & XDP for containers
PDF
Site-to-Site VPNs - pfSense Hangout November 2015
PDF
FreeSWITCH on Docker
PPTX
The TCP/IP Stack in the Linux Kernel
PDF
Disaggregating Ceph using NVMeoF
PDF
Linux Servers
PPTX
DNS Presentation
PDF
The linux networking architecture
PDF
OpenVPN as a WAN - pfSense Hangout October 2016
PDF
Advanced OpenVPN Concepts - pfSense Hangout September 2014
PDF
Iptables Configuration
PDF
Mikrotik Bridge Deep Dive
PDF
LISA2019 Linux Systems Performance
PDF
Let's Encrypt - pfSense Hangout April 2017
PPTX
DHCP Snooping
PDF
Ansible - Introduction
ODP
pfSense presentation
PDF
An Introduction To Linux
PPT
Basic 50 linus command
netfilter and iptables
Cilium - BPF & XDP for containers
Site-to-Site VPNs - pfSense Hangout November 2015
FreeSWITCH on Docker
The TCP/IP Stack in the Linux Kernel
Disaggregating Ceph using NVMeoF
Linux Servers
DNS Presentation
The linux networking architecture
OpenVPN as a WAN - pfSense Hangout October 2016
Advanced OpenVPN Concepts - pfSense Hangout September 2014
Iptables Configuration
Mikrotik Bridge Deep Dive
LISA2019 Linux Systems Performance
Let's Encrypt - pfSense Hangout April 2017
DHCP Snooping
Ansible - Introduction
pfSense presentation
An Introduction To Linux
Basic 50 linus command
Ad

Similar to Creating a DMZ - pfSense Hangout January 2016 (20)

PPTX
Firewall DMZ Zone
PPTX
Demilitarized Zone (DMZ) in computer networking
PPT
Chapter 03
PPTX
Firewall management introduction
PPT
Lecture 6
PDF
Ch18 Internet Security
PDF
IBM zEnterprise System - Network Security
PDF
IBM zEnterprise System - Network Security
PDF
Evaluation the performanc of dmz
PDF
Fire walls
PDF
66 pf sensetutorial
PDF
66_pfSenseTutorial
PDF
66_pfSenseTutorial
PPTX
Details of IT Security Proposal for office .pptx
PPSX
physical and hardware security(http://4knet.ir)
PDF
FortiGate Firewall HOW-TO - DMZ
PPTX
UNIT-4 network information security ID system
PPTX
Linux – routing and firewall for beginners v 1.0
PPT
Tavve Zone Ranger
Firewall DMZ Zone
Demilitarized Zone (DMZ) in computer networking
Chapter 03
Firewall management introduction
Lecture 6
Ch18 Internet Security
IBM zEnterprise System - Network Security
IBM zEnterprise System - Network Security
Evaluation the performanc of dmz
Fire walls
66 pf sensetutorial
66_pfSenseTutorial
66_pfSenseTutorial
Details of IT Security Proposal for office .pptx
physical and hardware security(http://4knet.ir)
FortiGate Firewall HOW-TO - DMZ
UNIT-4 network information security ID system
Linux – routing and firewall for beginners v 1.0
Tavve Zone Ranger
Ad

More from Netgate (20)

PDF
Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
PDF
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
PDF
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
PDF
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
PDF
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
PDF
Dynamic Routing with FRR - pfSense Hangout December 2017
PDF
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
PDF
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
PDF
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
PDF
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
PDF
Advanced Captive Portal - pfSense Hangout June 2017
PDF
High Availability on pfSense 2.4 - pfSense Hangout March 2017
PDF
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
PDF
Console Menu - pfSense Hangout December 2016
PDF
DHCP Server - pfSense Hangout September 2016
PDF
Providing Local DNS with pfSense - pfSense Hangout August 2016
PDF
High Availability Part 2 - pfSense Hangout July 2016
PDF
Connectivity Troubleshooting - pfSense Hangout June 2016
PDF
NAT on pfSense 2.3 - pfSense Hangout May 2016
PDF
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
Dynamic Routing with FRR - pfSense Hangout December 2017
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
Advanced Captive Portal - pfSense Hangout June 2017
High Availability on pfSense 2.4 - pfSense Hangout March 2017
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
Console Menu - pfSense Hangout December 2016
DHCP Server - pfSense Hangout September 2016
Providing Local DNS with pfSense - pfSense Hangout August 2016
High Availability Part 2 - pfSense Hangout July 2016
Connectivity Troubleshooting - pfSense Hangout June 2016
NAT on pfSense 2.3 - pfSense Hangout May 2016
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Modernizing your data center with Dell and AMD
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Monthly Chronicles - July 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I
The AUB Centre for AI in Media Proposal.docx
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Modernizing your data center with Dell and AMD
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Creating a DMZ - pfSense Hangout January 2016

  • 1. Creating a DMZ January 2016 Hangout Jim Pingle
  • 2. Creating a DMZ ● Project News ● What is a DMZ? ● DMZ Diagram ● Designing the DMZ ● Protecting Servers ● Preparing for the DMZ ● Creating the DMZ Interface ● Services for the DMZ ● Firewall Aliases ● NAT Considerations ● Firewall Rules for the DMZ ● Firewall Rules for LANs ● VPN Concerns ● Q&A
  • 3. Project News ● 2.2.6 is out ● 2.3 is now BETA! – Release timeline will roughly parallel FreeBSD 10.3-RELEASE – Snapshots at https://snapshots.pfsense.org/ – Most popular packages have been converted/updated for Bootstrap – Less than 50 open new bugs to go ● Keep an eye on the blog
  • 4. What is a DMZ? ● Co-opted military term meaning Demilitarized Zone ● Used to house public services, away from sensitive internal systems ● It is considered LESS secure than LANs or internal networks ● It is considered MORE secure than the Internet at-large ● DMZ is protected from the LAN(s), LAN(s) protected from DMZ ● Must be on a separate layer 2, not just a separate subnet ● If a server is compromised in a properly isolated DMZ, the LAN is not at significant risk ● Examples of items in the DMZ: Web, E-Mail, PBX, Proxy, etc ● Can utilize separate firewalls, but more often is an additional interface ● SOHO gear uses the term “DMZ” incorrectly, typically they mean 1:1 NAT on the WAN IP address to an internal host, that is not an actual DMZ in the correct sense and it is not secure
  • 6. Designing the DMZ ● Public IP addresses or private IP addresses? – Neither is inherently more secure, both can be made insecure by rules – Public: ● Less overhead and headaches! ● Easier routing and DNS ● No need for port forwards, 1:1 NAT, or NAT reflection ● No need for outbound NAT for the subnet ● Firewall rules only ● Requires a routed subnet from ISP, different from the WAN subnet ● Some services such as a PBX do better without NAT involved – Private: ● Will still need outbound NAT ● Will need port forwards, 1:1 NAT, or other means of forwarding in traffic (e.g. proxy or load balancer) ● More complicated when allowing traffic between LAN and DMZ (NAT reflection or split DNS) ● Will need to pick a private non-overlapping subnet, preferably one that summarizes w/LAN ● Can work using VIPs in the WAN subnet, or depending on the services, just the WAN IP address ● Separate VLAN or switch? – Separate physical switches are more secure – VLAN on the switches, vmware vswitch, etc ● How many separate DMZ interfaces will there be?
  • 7. Protecting Servers ● The firewall can only protect traffic between networks ● Servers also need protection from other servers ● A few tactics are possible: – Host-based firewalls on the servers themselves – Multiple DMZ interfaces (web, client proxy, mail, VoIP, etc) ● DB servers should be in an even more secure style DMZ and monitored, or isolated behind another system – Service config, limit # of listening daemons – Switch port isolation ● Only viable if the servers do not need to reach each other
  • 8. Preparing for the DMZ ● Create isolated L2 (switch or VLAN) ● Prepare the physical NIC or interface for use by pfSense – Install a NIC if possible or necessary – Add VLAN tag if VLANs are required ● Do not multi-home servers in DMZ and LAN! – Servers should not have NICs in both networks – Weakens security – Defeats the point of the DMZ, if the server is compromised it has access to both networks – Creates asymmetric routing problems
  • 9. Creating the DMZ Interface ● In pfSense... ● Interfaces > (assign) ● Choose the interface ● Click + to add it as an OPT interface ● It will show in the list, note its name ● Interfaces > OPTx ● Check Enable ● Give it a name (e.g. DMZ or DMZ_Web) ● Select and configure IPv4 and IPv6 addresses chosen earlier ● Save, Apply
  • 10. Services for the DMZ ● Optionally enable DHCP Server – Servers are usually static, but you could use static mappings or use DHCP for temporary access while bringing up new systems – Services > DHCP Server, DMZ tab – Enable, set a range, save, etc. ● If other local services had strict bindings (e.g. DNS Resolver, NTP), adjust accordingly
  • 11. Aliases to Make Things Easier ● Firewall > Aliases ● Make aliases for servers and groups of ports for services – Example: web_servers alias with IP addresses of servers – Example: web_ports alias with 80 and 443 – Similar for mail, db, whatever is needed and requires public exposure. ● Make an RFC1918 alias with private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
  • 12. NAT Considerations ● Private IP Addresses on DMZ: – Add port forwards or 1:1 NAT as needed to direct traffic inbound – Port forwards get rules automatically – 1:1 NAT needs manual firewall rules, use the private IP address as target – If LAN clients must contact servers by NAME, consider split DNS (local DNS resolves to local IP address of the server) – If split DNS is not possible and LAN must reach the DMZ, enable NAT reflection (System > Advanced, Networking tab) ● Public IP Addresses on DMZ: – Switch to Hybrid Outbound NAT and add a rule to “not” NAT the public subnet source – OR – – Switch to Manual Outbound NAT and remove rules referencing the subnet
  • 13. Firewall Rules for the DMZ ● Rules on WAN to allow access to public services inbound ● DMZ hosts should NOT have access to the LAN unless absolutely necessary – If unavoidable, it should be heavily restricted ● It is usually OK to allow access from the DMZ to the Internet, but it could also be restricted – Example: To allow OS/software updates, remote queries, active FTP from remote clients, etc ● Utilize the RFC1918 alias to prevent the servers from reaching local private networks and VPN networks
  • 14. Firewall Rules for LANs ● The LAN should not have unrestricted access to the DMZ either, but it is not as important as restrictions in the other direction – Ideally, only allow access to the same IP addresses and ports accessible from the WAN, though managing rules for that case can be complex – Consider rougue or compromised clients on the LAN and what they could do to servers in the DMZ (e.g. virus infected clients) ● Unsecure LANs, such as guest networks, should be more strictly isolated from the DMZ ● With Multi-WAN, add rules to pass traffic to DMZ without a gateway set ● Don't rely on policy routing to isolate, it can be OK at times but not a perfect means of security.
  • 15. VPN Concerns ● Consider what systems must communicate across the VPN ● If the servers must reach remote VPN systems, be strict with rules passing the traffic out that direction – Could be DR replication, backups, etc ● If remote VPN systems must reach servers in the DMZ, use rules on the VPN interface tab(s) appropriate for the role of the VPN – Example: A remote access admin VPN for ops employees should have more access than a site-to-site VPN with untrusted clients
  • 16. Expand from here... ● Add more servers, ports, additional DMZs, additional LANs, and so on ● Keep the rule styles similar, isolating each segment from all the others ● Interface groups can help with rules, but be careful of rule ordering when using them. ● Consider monitoring DMZ traffic with an IDS (Suricata, Snort, etc)
  • 17. Conclusion ● Questions? ● Ideas for hangout topics? Post on forum, comment on the blog posts, Reddit, etc