Pfsense On Fe Deployment Guide v1.5
Pfsense On Fe Deployment Guide v1.5
Objectives
pfSense software delivers advanced firewall, VPN, and routing functionality in your cloud-based infrastructure
with features including intrusion detection and prevention, load balancing, traffic shaping, GeoIP blocking,
dual-stack IPv4 and IPv6 support, DHCP and DNS server, Domain Name blacklisting, multiple VPN tunnels using
IPsec and OpenVPN, web content filtering, and more.
2.1.Prerequisites
Before deploying a pfSense appliance on Flexible you must define a network design corresponding to your
needs.
Here is a simple and minimal network design example on which this deployment guide is based on:
In this example we need 1 VPC with CIDR 172.16.0.0/24 with 2 subnets. A subnet “out” with CIDR
172.16.0.0/27 on which pfSense WAN network interface will be attached and a subnet “in” with CIDR
172.16.128.0/27 on which pfSense LAN network interface will be attached. An EIP will be attached on the WAN
network interface to give pfSense internet connectivity.
The objective here is for pfSense to protect internet access of ECS attached to the subnet “in”.
In order to create the pfSense ECS instance, you will need a SSH Key-Pair. The SSH Key Pair will only be used for
ECS creation; it can’t be used to SSH login on pfSense instances without further configuration.
https://docs.prod-cloud-ocb.orange-business.com/en-us/usermanual/ecs/en-us_topic_0014250631.html
In order to allow network flows, you will need to associate a Security Group to each network interface of your
pfSense instance. Since pfSense is a firewall, you can use a non-filtering Security Group:
https://docs.prod-cloud-ocb.orange-business.com/en-us/usermanual/ecs/en-us_topic_0140323151.html
Once the ECS is created go the “NICs” tab of the ECS details page:
On the “Security Groups” tab, associate a security group to the network interfaces:
You can start configuring pfSense using “Remote Login” from the Flexible Engine console:
We don’t need to set up VLANs since they are not applicable in Flexible Engine network, so you can answer ‘n’
here.
We now define which network interface will be the WAN interface, so you can answer ‘vtnet0’ here since this
network interface is attached to subnet “out” and has an EIP bound:
After confirmation we can see the WAN interface has been configured with DHCP and the LAN interface with a
default static configuration. So we need to configure the LAN interface with menu 2:
LAN interface must be configured manually using the IP address and mask which would have been received by
DHCP.
In single VPC network configuration, upstream gateway should not be configured and DHCP server should
never be activated on LAN interface:
From the “Remote login” Flexible Engine console open a shell and run the “viconfig” command:
Now you create EIP and bound it to LAN interface of pfSense ECS:
Then you can open the webconfigurator page from the browser of your workstation:
After first login it’s strongly recommended to customize the admin password before doing anything else
especially when your webconfigurator is accessible by anyone on the internet through EIP address.
You can do this by running the “Setup Wizard” which will also allow you to start configuring your pfSense
instance for you own purpose.
For further configuration information you can use pfSense online documentation:
https://docs.netgate.com/
In pfSense webconfigurator verify that automatic outbound NAT rule generation is selected and that a rule with
subnet “in” exists on WAN interface:
Now you can deploy protected ECS on subnet “in” which will use pfSense instance as an Internet NAT gateway
and define some fine-tuned firewall rules to filter egress and ingress internet traffic for them.
5.1.Single VPC
In this advanced example pfSense instance is used to filter all the traffic between the all the VPCs, the MPLS
WAN and Internet.
For this, we introduce the “Subnet Level Based Routing” concept by creating a custom route table attached to
subnet “in” of the transit-fw VPC.
In the default route table of the transit-fw VPC, there is only a default route to send all the traffic entering the
VPC to the LAN interface of pfSense instance.
All the routes toward the other VPCs are set in the custom route so that the traffic going out from the VPC can
be routed only after being filtered.
You can also use virtual IPs with EIPs bound associated with one WAN network interface:
https://docs.prod-cloud-ocb.orange-business.com/usermanual/vpc/en-us_topic_0097594610.html
https://docs.netgate.com/pfsense/en/latest/firewall/virtual-ip-address-feature-comparison.html