SlideShare a Scribd company logo
1 of 28
Download to read offline
Advanced OpenVPN Concepts
September 2014 Hangout
Jim Pingle
What will be covered?
● This is a shorter talk with Q&A, not a complete walkthrough
– Many of these concepts are useful with Multi-WAN, but also in Remote
Access setups or with VPN providers for Internet access
● Project Notes
● OpenVPN Improvements in 2.2
● Tunnel Network Behavior
● Routing Methods
● Assigning OpenVPN Interfaces
● Several Multi-WAN/Redundancy tactics
Project Notes
● Bash CVE aka “Shell Shock” - pfSense-SA-14_18.packages
– Base system not vulnerable
– FreeRADIUS2 and mailscanner packages are affected, fixes posted
– FreeSWITCH packages affected, removed as unmaintained
● 2.1.5 is out – Security release, OpenSSL and other fixes
– Menu issue on Linux, caused by CSS+Fonts, several workarounds posted on
forum already.
● 2.2 Moved to BETA, already getting lots of useful feedback
– Help test tickets in Feedback state for fast release!
● OpenVPN client export update coming soon with new -I60x installers
which include a new tap driver
● Hackathon next month, Oct 17-20 in Austin, TX
OpenVPN Improvements in 2.2
● Clients can now specify user/pass
– These clients can also opt to not use a cert
● Authentication Digest Algorithm can now be selected in GUI
– Default is SHA1 to match implied default on <=2.1.x
● Client-Specific Override screen has many new fields
– Local (pushed), and remote (iroute) networks, lots of others.
● Additional compression settings (unset, on, off, adaptive) in
<=2.1 it was unset or adaptive
● Byte counts on the status page are human readable
● Option to disable IPv6 on some instances if it is not used
● Verbosity level
OpenVPN Tunnel Networks
● Shared Key
● SSL/TLS - /30 Tunnel Network
● SSL/TLS in tun mode, /24 or similar
● SSL/TLS in tap mode or tun with topology subnet
Shared Key Tunnel Networks
● Shared Key always uses two IP addresses,
regardless of the specified subnet size
● Creates a point-to-point interface in the OS
● Both client and server use the same interface
and IP addresses to reach each other
● Only one client per server can connect
● SSL/TLS with a /30 tunnel network behaves the
same as Shared Key.
SSL/TLS in tun Mode
● SSL/TLS w/tun setup and a larger subnet (/24)
● Allows multiple clients
● P2P links to clients each get their own /30
network (four IP addresses used per client)
● Client subnets handled inside OpenVPN and
not exposed to the OS the same
– Prevents broadcast and multicast from working
SSL/TLS Subnet Style
● SSL/TLS in tap mode and tun with topology subnet
behave similarly.
– Tap mode also passes layer 2 info, tun does not
● Both group clients into one large actual subnet rather
than sets of separate networks.
● More efficient use of IP address space, one per client
● Broadcast and Multicast can cross the VPN
● Can have quirks with some clients
VPN Routing
● Three different types:
– Static Routing – What most people are used to
– Policy Routing – Handled via firewall rules
– Dynamic – Handled by a routing Daemon
VPN Routing - Static
● Most common kind, used by nearly everyone
● Routes are present in the system routing table
● Routes are managed by individual OpenVPN instances
● Networks specified in “Remote IPv4 Networks”,
“Remote IPv6 Networks” or if using an SSL/TLS multi-
site network, pushed via the Local network boxes
● For SSL/TLS in tun mode for multiple sites, iroute is
used in Client Specific Overrides to route back to the
proper client
VPN Routing – Policy Routing
● Routes are not present in the routing table
● Routes managed by pf in firewall rules
(outbound)
● Inbound/return traffic handled via reply-to
VPN Routing - Dynamic
● Routes are present in the routing table
● Routes are managed by an add-on package
daemon such as Quagga for OSPF
Assigning OpenVPN Interfaces
● Allows more configuration possibilities for
handling traffic to/from the VPN
● Assignment automatically adds gateway
● Adds firewall rule tab
● Allows the interface to be selected for use
elsewhere in the GUI
● Outbound NAT, port forwards (VPN providers)
Assigning OpenVPN Interfaces
● Perform the assignment action from LAN or WAN,
not over this VPN
● Assign from Interfaces > (assign), creating a new
OPTx interface
– This disrupts the VPN, must restart VPN after the next
step
● Interfaces > OPTx
– Enable, change name, IP type of None! Save/Apply
– Edit/save VPN after applying these settings
Assigning OpenVPN Interfaces
● Gateway added by the assignment action can:
– Be used for policy routing, for example:
● Send client X over VPN, but not others
● Send all HTTP traffic over VPN, but nothing else
– Be used in gateway groups
● Failover between multiple VPNs or between VPN and
WAN, or a mix.
– Automatically add reply-to on interface tab rules
– Do NOT use for static routes!
Assigning OpenVPN Interfaces
● Firewall tab added by assignment allows more fine-grained
control of traffic and the use of reply-to
● reply-to in pf specifies a gateway for return routing: Return traffic
for connections entering an interface exits the same interface
● With reply-to in place you can route public subnets, use Port
forwards, or use 1:1 NAT across VPN
● For reply-to to work, traffic must NOT match OpenVPN tab rules!
– Traffic must only match rules on the assigned interface tab, no others
– Do not block, alter sources so they do not match
– Or assign all OpenVPN instances and use no rules on the OpenVPN tab
– Rules are processed Floating -> Groups (OpenVPN tab) -> Interface tab
rules
Multi-WAN Tactics
●
Using multiple remote statements (built into OpenVPN)
– VPN is down for 60+ seconds before switch
– Any VPN disconnect will try the next remote
– Will not fail back automatically
●
Gateway failover
– Time to change depends on gateway monitoring, could be 10-60+ seconds
– Will fail back, but VPN will be disrupted
● Policy Routing
– Can do connection-based Load Balancing or Failover (not aggregation)
– Time to change depends on gateway settings, as above
– When the first WAN recovers, new connections will go back that way, existing connections
left alone
● Dynamic Routing with OSPF
– Very low time to change, could be only a few seconds.
– Fails back automatically with little or no loss of connectivity
Single server, multiple WANs
Server
WAN1 x.x.x.x - Port 1194 to Localhost:1194
WAN2 y.y.y.y - Port 1194 to Localhost:1194
OpenVPN Server #1
Localhost:1194
Tunnel Network: 10.0.8.0/24
Remote Network: 192.168.2.0/24
Client
OpenVPN Client #1
Server IP x.x.x.x:1194
Tunnel Network: 10.0.8.0/24
Remote Network: 192.168.1.0/24
Advanced: remote y.y.y.y 1194;
Single server, multiple WANs
● Bind VPN instance to Localhost
● Port forward from WANs to Localhost
● Remote access VPNs
– OpenVPN client export package supports it automatically. Select one of the
automatic options in the “Host Name Resolution” drop-down
– Can be used for Multi-WAN or multiple ports on the same WAN
● Site to Site VPN
– Static Key or SSL/TLS (Site-to-Multisite) uses a second remote statement in
advanced options
– Static route one IP on each WAN if desired
● Alternate tactic: DNS trickery
– Dynamic DNS + Multi-WAN, or round-robin DNS
Multiple Servers, Multiple WANs
Server
WAN1 x.x.x.x
OpenVPN Server #1 Port 1194
Tunnel Network: 10.0.8.0/30
Client
WAN2 y.y.y.y
OpenVPN Server #2 Port 1195
Tunnel Network: 10.0.8.4/30
OpenVPN Client #1
Server IP: x.x.x.x:1194
Tunnel Network: 10.0.8.0/30
OpenVPN Client #2
Server IP: y.y.y.y:1195
Tunnel Network: 10.0.8.4/30
Multiple Servers, Multiple WANs
● Remote access, routing protocol or policy routed style
(covered later) only, cannot use for traditional site-to-site
(routes conflict)
● Bind directly to each WAN
● Must use different tunnel networks
● Other settings can be the same (including CA/Certs, TLS
key, auth settings, etc)
● If the client has only one WAN:
– Use multiple remote statements OR
– Pin up both tunnels if an alternate routing setup is used
WAN Failover (GW Groups)
● Gateway group as bind interface for OpenVPN
● Only active on one WAN at a time
● Useful for servers in some cases, but other methods are
generally better
● Useful for clients with Multi-WAN but relies on gateway
monitoring for changes so it can be slow to react
● Server use requires one of:
– Dynamic DNS on pfSense set to use the same gateway group,
client connects to that host
– Multiple remote statements on the client so the client will
attempt the other WAN, but only one will work at a time.
Policy Routed Multi-WAN setup
● Load Balanced (connection-based) or Failover
● One server and client per WAN
● Needs only keys, compression settings, and unique tunnel networks
● Routes should not be added to all of the clients and servers
– May be added to one for firewall-to-firewall traffic since it will not balance.
● Assign VPN interfaces on both sides
● Create gateway groups for desired behavior (load balancing or
failover)
● Firewall rules
– OpenVPN tab rules MUST NOT MATCH this traffic (needs reply-to)
● Outbound NAT may also help, but could introduce other problems. Reply-to is best
– Place rules to pass traffic on each assigned interface tab
– Add LAN rules to top to match destination with gateway group chosen
OSPF / Dynamic Routed VPN
● Can also be used to link multiple sites together
● Requires Multicast
● Static key or /30 SSL/TLS preferred, but works with
tap mode and/or tun mode with topology subnet
● Server side: Use two unique server instances, each on
separate ports/WANs
● Use distinct, non-overlapping tunnel networks (e.g.
10.0.8.0/30 and 10.0.9.0/30)
● Do NOT put routes in remote network boxes! OSPF
will handle routes
OSPF (cont'd)
● Client side: Setup two clients, one for each server, each on
a separate WAN. (A1-B1, A2-B2)
● May be overkill but for complete WAN and path redundancy,
you could use four connections (A1-B1, A1-B2, A2-B1, A2-
B2), or mix this with a multiple remote statement method
● Ensure OpenVPN tab firewall rules pass OSPF traffic, allow
each side to ping the remote end's tunnel network address
– Do not filter OSPF on destination as it uses multicast
● Check that the VPNs come online and can ping in both
directions to/from the tunnel network IPs
– NOT a LAN-to-LAN test yet
OSPF - Quagga
●
Install and configure the Quagga package on both sides
– Assigning interfaces is optional
●
Interfaces tab in Quagga
– Add VPN interfaces to quagga, give one lower metric (e.g. preferred WAN metric 10, second
WAN 20)
– Add local/LAN interfaces to quagga as passive
●
Global settings tab in Quagga
– Create a random master password
– Set the area (typically 0.0.0.0 or 0.0.0.1)
– Set the router ID (typically this firewall's LAN IP)
– Add the VPN tunnel network IPs with /32 masks to the list of subnets with "Accept Filter" set
●
After configuring both sides in this way, check the status tab, it should show a full
peering/neighboring between the nodes
●
Test a LAN to LAN ping
Random OpenVPN Bits
● Servers can also be clients, similar to IPsec
– Static Key or SSL/TLS /30 only
– Set the local port on the client to a static port (e.g. 1194)
– Allow traffic on client WAN firewall rules to that port
– Add a remote statement to the server's advanced
options so it will initiate
● For remote access, if clients get disconnected
periodically, check/set reneg-sec timeouts in
advanced options for server and client
Q&A
Any Questions?

More Related Content

What's hot

Site-to-Site VPNs - pfSense Hangout November 2015
Site-to-Site VPNs - pfSense Hangout November 2015Site-to-Site VPNs - pfSense Hangout November 2015
Site-to-Site VPNs - pfSense Hangout November 2015Netgate
 
IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015Netgate
 
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018Netgate
 
Advanced Captive Portal - pfSense Hangout June 2017
Advanced Captive Portal - pfSense Hangout June 2017Advanced Captive Portal - pfSense Hangout June 2017
Advanced Captive Portal - pfSense Hangout June 2017Netgate
 
Creating a DMZ - pfSense Hangout January 2016
Creating a DMZ - pfSense Hangout January 2016Creating a DMZ - pfSense Hangout January 2016
Creating a DMZ - pfSense Hangout January 2016Netgate
 
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018Netgate
 
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018Netgate
 
Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016
Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016
Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016Netgate
 
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...Netgate
 
DDoS Mitigation using BGP Flowspec
DDoS Mitigation using BGP Flowspec DDoS Mitigation using BGP Flowspec
DDoS Mitigation using BGP Flowspec APNIC
 
MPLS Traffic Engineering
MPLS Traffic EngineeringMPLS Traffic Engineering
MPLS Traffic EngineeringAPNIC
 
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016Netgate
 
VXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building BlocksVXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building BlocksAPNIC
 
BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1GLC Networks
 

What's hot (20)

Site-to-Site VPNs - pfSense Hangout November 2015
Site-to-Site VPNs - pfSense Hangout November 2015Site-to-Site VPNs - pfSense Hangout November 2015
Site-to-Site VPNs - pfSense Hangout November 2015
 
IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015
 
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
 
Advanced Captive Portal - pfSense Hangout June 2017
Advanced Captive Portal - pfSense Hangout June 2017Advanced Captive Portal - pfSense Hangout June 2017
Advanced Captive Portal - pfSense Hangout June 2017
 
Creating a DMZ - pfSense Hangout January 2016
Creating a DMZ - pfSense Hangout January 2016Creating a DMZ - pfSense Hangout January 2016
Creating a DMZ - pfSense Hangout January 2016
 
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
RADIUS and LDAP on pfSense 2.4 - pfSense Hangout February 2018
 
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
 
Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016
Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016
Traffic Shaping Basics with PRIQ - pfSense Hangout February 2016
 
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
 
BGP
BGPBGP
BGP
 
Rip presentation
Rip presentationRip presentation
Rip presentation
 
DDoS Mitigation using BGP Flowspec
DDoS Mitigation using BGP Flowspec DDoS Mitigation using BGP Flowspec
DDoS Mitigation using BGP Flowspec
 
MPLS Traffic Engineering
MPLS Traffic EngineeringMPLS Traffic Engineering
MPLS Traffic Engineering
 
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
 
VXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building BlocksVXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building Blocks
 
Ospf
 Ospf Ospf
Ospf
 
Bgp protocol
Bgp protocolBgp protocol
Bgp protocol
 
BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1
 
DHCP Protocol
DHCP ProtocolDHCP Protocol
DHCP Protocol
 

Similar to Advanced OpenVPN Concepts - pfSense Hangout September 2014

pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014Netgate
 
Connectivity Troubleshooting - pfSense Hangout June 2016
Connectivity Troubleshooting - pfSense Hangout June 2016Connectivity Troubleshooting - pfSense Hangout June 2016
Connectivity Troubleshooting - pfSense Hangout June 2016Netgate
 
High Availability Part 2 - pfSense Hangout July 2016
High Availability Part 2 - pfSense Hangout July 2016High Availability Part 2 - pfSense Hangout July 2016
High Availability Part 2 - pfSense Hangout July 2016Netgate
 
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018Netgate
 
Remote Access VPNs - pfSense Hangout September 2015
Remote Access VPNs - pfSense Hangout September 2015Remote Access VPNs - pfSense Hangout September 2015
Remote Access VPNs - pfSense Hangout September 2015Netgate
 
High Availability on pfSense 2.4 - pfSense Hangout March 2017
High Availability on pfSense 2.4 - pfSense Hangout March 2017High Availability on pfSense 2.4 - pfSense Hangout March 2017
High Availability on pfSense 2.4 - pfSense Hangout March 2017Netgate
 
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017Netgate
 
Site to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latestSite to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latestChanaka Lasantha
 
FreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 serverFreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 serverTomaz Muraus
 
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018Netgate
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATThomas Graf
 
Site to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory authSite to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory authChanaka Lasantha
 
Intro to Multi-WAN - pfSense Hangout April 2014
Intro to Multi-WAN - pfSense Hangout April 2014Intro to Multi-WAN - pfSense Hangout April 2014
Intro to Multi-WAN - pfSense Hangout April 2014Netgate
 
Site to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql dbSite to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql dbChanaka Lasantha
 
DHCP Server - pfSense Hangout September 2016
DHCP Server - pfSense Hangout September 2016DHCP Server - pfSense Hangout September 2016
DHCP Server - pfSense Hangout September 2016Netgate
 
There and back again
There and back againThere and back again
There and back againJon Spriggs
 
LF_OVS_17_State of the OVN
LF_OVS_17_State of the OVNLF_OVS_17_State of the OVN
LF_OVS_17_State of the OVNLF_OpenvSwitch
 
Let's Encrypt - pfSense Hangout April 2017
Let's Encrypt - pfSense Hangout April 2017Let's Encrypt - pfSense Hangout April 2017
Let's Encrypt - pfSense Hangout April 2017Netgate
 
OpenFlow Extensions
OpenFlow ExtensionsOpenFlow Extensions
OpenFlow ExtensionsUS-Ignite
 
OVN operationalization at scale at eBay
OVN operationalization at scale at eBayOVN operationalization at scale at eBay
OVN operationalization at scale at eBayAliasgar Ginwala
 

Similar to Advanced OpenVPN Concepts - pfSense Hangout September 2014 (20)

pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014pfSense 2.2 Preview - pfSense Hangout November 2014
pfSense 2.2 Preview - pfSense Hangout November 2014
 
Connectivity Troubleshooting - pfSense Hangout June 2016
Connectivity Troubleshooting - pfSense Hangout June 2016Connectivity Troubleshooting - pfSense Hangout June 2016
Connectivity Troubleshooting - pfSense Hangout June 2016
 
High Availability Part 2 - pfSense Hangout July 2016
High Availability Part 2 - pfSense Hangout July 2016High Availability Part 2 - pfSense Hangout July 2016
High Availability Part 2 - pfSense Hangout July 2016
 
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
Routed IPsec on pfSense 2.4.4 - pfSense Hangout June 2018
 
Remote Access VPNs - pfSense Hangout September 2015
Remote Access VPNs - pfSense Hangout September 2015Remote Access VPNs - pfSense Hangout September 2015
Remote Access VPNs - pfSense Hangout September 2015
 
High Availability on pfSense 2.4 - pfSense Hangout March 2017
High Availability on pfSense 2.4 - pfSense Hangout March 2017High Availability on pfSense 2.4 - pfSense Hangout March 2017
High Availability on pfSense 2.4 - pfSense Hangout March 2017
 
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
Server Load Balancing on pfSense 2.4 - pfSense Hangout July 2017
 
Site to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latestSite to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latest
 
FreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 serverFreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 server
 
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
pfSense 2.4.4 Short Topic Miscellany - pfSense Hangout August 2018
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NAT
 
Site to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory authSite to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory auth
 
Intro to Multi-WAN - pfSense Hangout April 2014
Intro to Multi-WAN - pfSense Hangout April 2014Intro to Multi-WAN - pfSense Hangout April 2014
Intro to Multi-WAN - pfSense Hangout April 2014
 
Site to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql dbSite to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql db
 
DHCP Server - pfSense Hangout September 2016
DHCP Server - pfSense Hangout September 2016DHCP Server - pfSense Hangout September 2016
DHCP Server - pfSense Hangout September 2016
 
There and back again
There and back againThere and back again
There and back again
 
LF_OVS_17_State of the OVN
LF_OVS_17_State of the OVNLF_OVS_17_State of the OVN
LF_OVS_17_State of the OVN
 
Let's Encrypt - pfSense Hangout April 2017
Let's Encrypt - pfSense Hangout April 2017Let's Encrypt - pfSense Hangout April 2017
Let's Encrypt - pfSense Hangout April 2017
 
OpenFlow Extensions
OpenFlow ExtensionsOpenFlow Extensions
OpenFlow Extensions
 
OVN operationalization at scale at eBay
OVN operationalization at scale at eBayOVN operationalization at scale at eBay
OVN operationalization at scale at eBay
 

More from Netgate

Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...Netgate
 
Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Netgate
 
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017Netgate
 
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017Netgate
 
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017Netgate
 
Console Menu - pfSense Hangout December 2016
Console Menu - pfSense Hangout December 2016Console Menu - pfSense Hangout December 2016
Console Menu - pfSense Hangout December 2016Netgate
 
pfSense 2.3 Preview - pfSense Hangout December 2015
pfSense 2.3 Preview - pfSense Hangout December 2015pfSense 2.3 Preview - pfSense Hangout December 2015
pfSense 2.3 Preview - pfSense Hangout December 2015Netgate
 

More from Netgate (7)

Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
Using Google Cloud Identity Secure LDAP with pfSense - Netgate Hangout Octobe...
 
Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017
 
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
Firewall Best Practices for VoIP on pfSense - pfSense Hangout October 2017
 
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
 
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
 
Console Menu - pfSense Hangout December 2016
Console Menu - pfSense Hangout December 2016Console Menu - pfSense Hangout December 2016
Console Menu - pfSense Hangout December 2016
 
pfSense 2.3 Preview - pfSense Hangout December 2015
pfSense 2.3 Preview - pfSense Hangout December 2015pfSense 2.3 Preview - pfSense Hangout December 2015
pfSense 2.3 Preview - pfSense Hangout December 2015
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

Advanced OpenVPN Concepts - pfSense Hangout September 2014

  • 1. Advanced OpenVPN Concepts September 2014 Hangout Jim Pingle
  • 2. What will be covered? ● This is a shorter talk with Q&A, not a complete walkthrough – Many of these concepts are useful with Multi-WAN, but also in Remote Access setups or with VPN providers for Internet access ● Project Notes ● OpenVPN Improvements in 2.2 ● Tunnel Network Behavior ● Routing Methods ● Assigning OpenVPN Interfaces ● Several Multi-WAN/Redundancy tactics
  • 3. Project Notes ● Bash CVE aka “Shell Shock” - pfSense-SA-14_18.packages – Base system not vulnerable – FreeRADIUS2 and mailscanner packages are affected, fixes posted – FreeSWITCH packages affected, removed as unmaintained ● 2.1.5 is out – Security release, OpenSSL and other fixes – Menu issue on Linux, caused by CSS+Fonts, several workarounds posted on forum already. ● 2.2 Moved to BETA, already getting lots of useful feedback – Help test tickets in Feedback state for fast release! ● OpenVPN client export update coming soon with new -I60x installers which include a new tap driver ● Hackathon next month, Oct 17-20 in Austin, TX
  • 4. OpenVPN Improvements in 2.2 ● Clients can now specify user/pass – These clients can also opt to not use a cert ● Authentication Digest Algorithm can now be selected in GUI – Default is SHA1 to match implied default on <=2.1.x ● Client-Specific Override screen has many new fields – Local (pushed), and remote (iroute) networks, lots of others. ● Additional compression settings (unset, on, off, adaptive) in <=2.1 it was unset or adaptive ● Byte counts on the status page are human readable ● Option to disable IPv6 on some instances if it is not used ● Verbosity level
  • 5. OpenVPN Tunnel Networks ● Shared Key ● SSL/TLS - /30 Tunnel Network ● SSL/TLS in tun mode, /24 or similar ● SSL/TLS in tap mode or tun with topology subnet
  • 6. Shared Key Tunnel Networks ● Shared Key always uses two IP addresses, regardless of the specified subnet size ● Creates a point-to-point interface in the OS ● Both client and server use the same interface and IP addresses to reach each other ● Only one client per server can connect ● SSL/TLS with a /30 tunnel network behaves the same as Shared Key.
  • 7. SSL/TLS in tun Mode ● SSL/TLS w/tun setup and a larger subnet (/24) ● Allows multiple clients ● P2P links to clients each get their own /30 network (four IP addresses used per client) ● Client subnets handled inside OpenVPN and not exposed to the OS the same – Prevents broadcast and multicast from working
  • 8. SSL/TLS Subnet Style ● SSL/TLS in tap mode and tun with topology subnet behave similarly. – Tap mode also passes layer 2 info, tun does not ● Both group clients into one large actual subnet rather than sets of separate networks. ● More efficient use of IP address space, one per client ● Broadcast and Multicast can cross the VPN ● Can have quirks with some clients
  • 9. VPN Routing ● Three different types: – Static Routing – What most people are used to – Policy Routing – Handled via firewall rules – Dynamic – Handled by a routing Daemon
  • 10. VPN Routing - Static ● Most common kind, used by nearly everyone ● Routes are present in the system routing table ● Routes are managed by individual OpenVPN instances ● Networks specified in “Remote IPv4 Networks”, “Remote IPv6 Networks” or if using an SSL/TLS multi- site network, pushed via the Local network boxes ● For SSL/TLS in tun mode for multiple sites, iroute is used in Client Specific Overrides to route back to the proper client
  • 11. VPN Routing – Policy Routing ● Routes are not present in the routing table ● Routes managed by pf in firewall rules (outbound) ● Inbound/return traffic handled via reply-to
  • 12. VPN Routing - Dynamic ● Routes are present in the routing table ● Routes are managed by an add-on package daemon such as Quagga for OSPF
  • 13. Assigning OpenVPN Interfaces ● Allows more configuration possibilities for handling traffic to/from the VPN ● Assignment automatically adds gateway ● Adds firewall rule tab ● Allows the interface to be selected for use elsewhere in the GUI ● Outbound NAT, port forwards (VPN providers)
  • 14. Assigning OpenVPN Interfaces ● Perform the assignment action from LAN or WAN, not over this VPN ● Assign from Interfaces > (assign), creating a new OPTx interface – This disrupts the VPN, must restart VPN after the next step ● Interfaces > OPTx – Enable, change name, IP type of None! Save/Apply – Edit/save VPN after applying these settings
  • 15. Assigning OpenVPN Interfaces ● Gateway added by the assignment action can: – Be used for policy routing, for example: ● Send client X over VPN, but not others ● Send all HTTP traffic over VPN, but nothing else – Be used in gateway groups ● Failover between multiple VPNs or between VPN and WAN, or a mix. – Automatically add reply-to on interface tab rules – Do NOT use for static routes!
  • 16. Assigning OpenVPN Interfaces ● Firewall tab added by assignment allows more fine-grained control of traffic and the use of reply-to ● reply-to in pf specifies a gateway for return routing: Return traffic for connections entering an interface exits the same interface ● With reply-to in place you can route public subnets, use Port forwards, or use 1:1 NAT across VPN ● For reply-to to work, traffic must NOT match OpenVPN tab rules! – Traffic must only match rules on the assigned interface tab, no others – Do not block, alter sources so they do not match – Or assign all OpenVPN instances and use no rules on the OpenVPN tab – Rules are processed Floating -> Groups (OpenVPN tab) -> Interface tab rules
  • 17. Multi-WAN Tactics ● Using multiple remote statements (built into OpenVPN) – VPN is down for 60+ seconds before switch – Any VPN disconnect will try the next remote – Will not fail back automatically ● Gateway failover – Time to change depends on gateway monitoring, could be 10-60+ seconds – Will fail back, but VPN will be disrupted ● Policy Routing – Can do connection-based Load Balancing or Failover (not aggregation) – Time to change depends on gateway settings, as above – When the first WAN recovers, new connections will go back that way, existing connections left alone ● Dynamic Routing with OSPF – Very low time to change, could be only a few seconds. – Fails back automatically with little or no loss of connectivity
  • 18. Single server, multiple WANs Server WAN1 x.x.x.x - Port 1194 to Localhost:1194 WAN2 y.y.y.y - Port 1194 to Localhost:1194 OpenVPN Server #1 Localhost:1194 Tunnel Network: 10.0.8.0/24 Remote Network: 192.168.2.0/24 Client OpenVPN Client #1 Server IP x.x.x.x:1194 Tunnel Network: 10.0.8.0/24 Remote Network: 192.168.1.0/24 Advanced: remote y.y.y.y 1194;
  • 19. Single server, multiple WANs ● Bind VPN instance to Localhost ● Port forward from WANs to Localhost ● Remote access VPNs – OpenVPN client export package supports it automatically. Select one of the automatic options in the “Host Name Resolution” drop-down – Can be used for Multi-WAN or multiple ports on the same WAN ● Site to Site VPN – Static Key or SSL/TLS (Site-to-Multisite) uses a second remote statement in advanced options – Static route one IP on each WAN if desired ● Alternate tactic: DNS trickery – Dynamic DNS + Multi-WAN, or round-robin DNS
  • 20. Multiple Servers, Multiple WANs Server WAN1 x.x.x.x OpenVPN Server #1 Port 1194 Tunnel Network: 10.0.8.0/30 Client WAN2 y.y.y.y OpenVPN Server #2 Port 1195 Tunnel Network: 10.0.8.4/30 OpenVPN Client #1 Server IP: x.x.x.x:1194 Tunnel Network: 10.0.8.0/30 OpenVPN Client #2 Server IP: y.y.y.y:1195 Tunnel Network: 10.0.8.4/30
  • 21. Multiple Servers, Multiple WANs ● Remote access, routing protocol or policy routed style (covered later) only, cannot use for traditional site-to-site (routes conflict) ● Bind directly to each WAN ● Must use different tunnel networks ● Other settings can be the same (including CA/Certs, TLS key, auth settings, etc) ● If the client has only one WAN: – Use multiple remote statements OR – Pin up both tunnels if an alternate routing setup is used
  • 22. WAN Failover (GW Groups) ● Gateway group as bind interface for OpenVPN ● Only active on one WAN at a time ● Useful for servers in some cases, but other methods are generally better ● Useful for clients with Multi-WAN but relies on gateway monitoring for changes so it can be slow to react ● Server use requires one of: – Dynamic DNS on pfSense set to use the same gateway group, client connects to that host – Multiple remote statements on the client so the client will attempt the other WAN, but only one will work at a time.
  • 23. Policy Routed Multi-WAN setup ● Load Balanced (connection-based) or Failover ● One server and client per WAN ● Needs only keys, compression settings, and unique tunnel networks ● Routes should not be added to all of the clients and servers – May be added to one for firewall-to-firewall traffic since it will not balance. ● Assign VPN interfaces on both sides ● Create gateway groups for desired behavior (load balancing or failover) ● Firewall rules – OpenVPN tab rules MUST NOT MATCH this traffic (needs reply-to) ● Outbound NAT may also help, but could introduce other problems. Reply-to is best – Place rules to pass traffic on each assigned interface tab – Add LAN rules to top to match destination with gateway group chosen
  • 24. OSPF / Dynamic Routed VPN ● Can also be used to link multiple sites together ● Requires Multicast ● Static key or /30 SSL/TLS preferred, but works with tap mode and/or tun mode with topology subnet ● Server side: Use two unique server instances, each on separate ports/WANs ● Use distinct, non-overlapping tunnel networks (e.g. 10.0.8.0/30 and 10.0.9.0/30) ● Do NOT put routes in remote network boxes! OSPF will handle routes
  • 25. OSPF (cont'd) ● Client side: Setup two clients, one for each server, each on a separate WAN. (A1-B1, A2-B2) ● May be overkill but for complete WAN and path redundancy, you could use four connections (A1-B1, A1-B2, A2-B1, A2- B2), or mix this with a multiple remote statement method ● Ensure OpenVPN tab firewall rules pass OSPF traffic, allow each side to ping the remote end's tunnel network address – Do not filter OSPF on destination as it uses multicast ● Check that the VPNs come online and can ping in both directions to/from the tunnel network IPs – NOT a LAN-to-LAN test yet
  • 26. OSPF - Quagga ● Install and configure the Quagga package on both sides – Assigning interfaces is optional ● Interfaces tab in Quagga – Add VPN interfaces to quagga, give one lower metric (e.g. preferred WAN metric 10, second WAN 20) – Add local/LAN interfaces to quagga as passive ● Global settings tab in Quagga – Create a random master password – Set the area (typically 0.0.0.0 or 0.0.0.1) – Set the router ID (typically this firewall's LAN IP) – Add the VPN tunnel network IPs with /32 masks to the list of subnets with "Accept Filter" set ● After configuring both sides in this way, check the status tab, it should show a full peering/neighboring between the nodes ● Test a LAN to LAN ping
  • 27. Random OpenVPN Bits ● Servers can also be clients, similar to IPsec – Static Key or SSL/TLS /30 only – Set the local port on the client to a static port (e.g. 1194) – Allow traffic on client WAN firewall rules to that port – Add a remote statement to the server's advanced options so it will initiate ● For remote access, if clients get disconnected periodically, check/set reneg-sec timeouts in advanced options for server and client