š¦ Instalação do pfSense
Guia completo de instalação do pfSense 2.8.1 no Proxmox VE, incluindo criação da VM e configuração inicial.
š PrĆ©-requisitos
| Item | Especificação |
|---|---|
| Hypervisor | Proxmox VE 8.x |
| ISO pfSense | pfSense-CE-2.8.1-RELEASE-amd64.iso |
| RAM MĆnima | 2 GB (recomendado: 2-4 GB) |
| Disco MĆnimo | 20 GB (recomendado: 40+ GB) |
| NICs NecessƔrias | 3 (WAN, LAN, DMZ) |
š„ļø Criação da VM no Proxmox
1. Configuração Geral
# Na interface web do Proxmox VE
# Botão: Create VM
| Parâmetro | Valor |
|---|---|
| Node | Seu node Proxmox |
| VM ID | 100 (ou disponĆvel) |
| Name | pfSense |
| Resource Pool | (opcional) |
2. Sistema Operativo
| Parâmetro | Valor |
|---|---|
| ISO Image | pfSense-CE-2.8.1-RELEASE-amd64.iso |
| Type | Other |
| Guest OS | Other |
3. Sistema
| Parâmetro | Valor |
|---|---|
| Graphic card | Default |
| Machine | Default (i440fx) |
| SCSI Controller | VirtIO SCSI |
| BIOS | Default (SeaBIOS) |
| Add TPM | ā NĆ£o |
| Qemu Agent | ā Sim |
4. Discos
| Parâmetro | Valor |
|---|---|
| Bus/Device | VirtIO Block / 0 |
| Storage | local-lvm (ou seu storage) |
| Disk size | 42 GB |
| Cache | Write back |
| Discard | ā Ativado |
| SSD emulation | ā Ativado (se aplicĆ”vel) |
5. CPU
| Parâmetro | Valor |
|---|---|
| Sockets | 1 |
| Cores | 2 |
| Type | host (ou kvm64) |
6. Memória
| Parâmetro | Valor |
|---|---|
| Memory (MiB) | 2048 |
| Minimum memory | 512 |
| Ballooning | ā Ativado |
7. Rede - IMPORTANTE: 3 Interfaces
Interface 1 - WAN (vtnet0)
| Parâmetro | Valor |
|---|---|
| Bridge | vmbr0 (bridge com acesso Ć Internet) |
| Model | VirtIO (paravirtualized) |
| Firewall | ā Desativado |
| MAC address | (auto) |
Interface 2 - LAN (vtnet1)
| Parâmetro | Valor |
|---|---|
| Bridge | vmbr1 (bridge LAN isolada) |
| Model | VirtIO (paravirtualized) |
| Firewall | ā Desativado |
| MAC address | (auto) |
Interface 3 - DMZ (vtnet2)
| Parâmetro | Valor |
|---|---|
| Bridge | vmbr2 (bridge DMZ isolada) |
| Model | VirtIO (paravirtualized) |
| Firewall | ā Desativado |
| MAC address | (auto) |
š” Nota: As bridges devem ser criadas previamente no Proxmox em Datacenter ā Node ā Network
8. Confirmar Criação
Revisar todas as configuraƧƵes e clicar em Finish.
š Instalação do pfSense
1. Iniciar a VM
# Via CLI do Proxmox
qm start 100
# Ou via Web UI
# VM ā Start
2. Boot e Instalação
- Boot Screen
- Aguardar o boot automƔtico ou pressionar
Enter
- Aguardar o boot automƔtico ou pressionar
- Accept License
- Ler e aceitar a licenƧa Apache 2.0
- Pressionar
Accept
- Install pfSense
- Selecionar:
Install pfSense - Pressionar
Enter
- Selecionar:
- Keymap Selection
- Selecionar keymap apropriado (ex:
USouPortuguese) - Pressionar
Enterpara continuar
- Selecionar keymap apropriado (ex:
- Partitioning
- Selecionar:
Auto (ZFS)- Recomendado - Pressionar
Enter
- Selecionar:
-
ZFS Configuration
Opção Valor ZFS Pool Type stripe (para single disk) Disk vtbd0 (42GB) - Confirmar com
Yespara destruir dados existentes
- Confirmar com
- Instalação
- Aguardar a cópia dos ficheiros (2-5 minutos)
- Manual Configuration
- Selecionar:
No(faremos via web) - Pressionar
Enter
- Selecionar:
- Reboot
- Selecionar:
Reboot - Importante: Desconectar o ISO do CD-ROM no Proxmox
- Selecionar:
āļø Configuração Inicial (Console)
Após o reboot, o pfSense iniciarÔ e mostrarÔ o menu de console:
*** Welcome to pfSense 2.8.1-RELEASE (amd64) on pfSense ***
WAN (wan) -> vtnet0 -> DHCP
LAN (lan) -> vtnet1 -> 192.168.1.1
0) Logout (SSH only) 9) pfTop
1) Assign Interfaces 10) Filter Logs
2) Set interface(s) IP address 11) Restart webConfigurator
3) Reset webConfigurator password 12) PHP shell + pfSense tools
4) Reset to factory defaults 13) Update from console
5) Reboot system 14) Disable Secure Shell (sshd)
6) Halt system 15) Restore recent configuration
7) Ping host 16) Restart PHP-FPM
8) Shell
Enter an option:
1. Atribuir Interfaces
Escolher opção 1 (Assign Interfaces)
Should VLANs be set up now? [y|n]: n
Enter the WAN interface name: vtnet0
Enter the LAN interface name: vtnet1
Enter the Optional 1 interface name: vtnet2
Do you want to proceed? [y|n]: y
2. Configurar IP da WAN
Escolher opção 2 (Set interface(s) IP address)
Available interfaces:
1 - WAN (vtnet0)
2 - LAN (vtnet1)
3 - OPT1 (vtnet2)
Enter the number of the interface: 1
Configure IPv4 address WAN interface via DHCP? [y|n]: n
Enter the new WAN IPv4 address: 192.168.31.100
Enter the new WAN IPv4 subnet bit count: 24
Enter the new WAN IPv4 upstream gateway address: 192.168.31.1
Configure IPv6 address WAN interface via DHCP6? [y|n]: n
Do you want to revert to HTTP as the webConfigurator protocol? [y|n]: n
3. Configurar IP da LAN
Escolher opção 2 novamente
Available interfaces:
1 - WAN (vtnet0)
2 - LAN (vtnet1)
3 - OPT1 (vtnet2)
Enter the number of the interface: 2
Enter the new LAN IPv4 address: 192.168.1.1
Enter the new LAN IPv4 subnet bit count: 24
For a WAN, enter the new LAN IPv4 upstream gateway address: [Enter]
Configure IPv6 address LAN interface via DHCP6? [y|n]: n
Do you want to enable the DHCP server on LAN? [y|n]: y
Enter the start address of the DHCP range: 192.168.1.100
Enter the end address of the DHCP range: 192.168.1.200
Do you want to revert to HTTP as the webConfigurator protocol? [y|n]: n
4. Configurar IP da DMZ (OPT1)
Escolher opção 2 novamente
Available interfaces:
1 - WAN (vtnet0)
2 - LAN (vtnet1)
3 - OPT1 (vtnet2)
Enter the number of the interface: 3
Enter the new OPT1 IPv4 address: 10.0.0.1
Enter the new OPT1 IPv4 subnet bit count: 24
For a WAN, enter the new OPT1 IPv4 upstream gateway address: [Enter]
Configure IPv6 address OPT1 interface via DHCP6? [y|n]: n
Do you want to enable the DHCP server on OPT1? [y|n]: n
Do you want to revert to HTTP as the webConfigurator protocol? [y|n]: n
š Acesso Ć Interface Web
1. Conectar Ć Interface Web
De uma mƔquina na rede LAN (192.168.1.0/24):
URL: https://192.168.1.1
Username: admin
Password: pfsense
ā ļø Aviso de Certificado: O browser mostrarĆ” um aviso de certificado auto-assinado. Aceitar e continuar.
2. Setup Wizard
Passo 1: Netgate Global Support
- Pode fechar ou clicar em
Next
Passo 2: General Information
| Campo | Valor |
|---|---|
| Hostname | pfSense |
| Domain | fsociety.pt |
| Primary DNS Server | 1.1.1.1 (Cloudflare) |
| Secondary DNS Server | 1.0.0.1 |
| DNS Server Override | ā Desativado |
Passo 3: Time Server Information
| Campo | Valor |
|---|---|
| Time server hostname | pool.ntp.org |
| Timezone | Europe/Lisbon |
Passo 4: Configure WAN Interface
| Campo | Valor |
|---|---|
| SelectedType | Static |
| IP Address | 192.168.31.100 |
| Subnet Mask | 24 |
| Upstream Gateway | 192.168.31.1 |
| Block RFC1918 Private Networks | ā Desativado |
| Block bogon networks | ā Ativado |
Passo 5: Configure LAN Interface
| Campo | Valor |
|---|---|
| LAN IP Address | 192.168.1.1 |
| Subnet Mask | 24 |
Passo 6: Set Admin Password
- Definir password forte para o utilizador
admin - Importante: Guardar em local seguro
Passo 7: Reload
- Clicar em
Reload - Aguardar reload das configuraƧƵes
Passo 8: Wizard Completed
- Clicar em
Finish
š§ Configuração Pós-Instalação
1. Renomear Interface OPT1 para DMZ
System ā Assignments ā Interface Assignments
OPT1:
- Description: DMZ
- Clicar em "Save"
2. Ativar Interface DMZ
Interfaces ā DMZ
General Configuration:
- Enable: ā
Enable interface
- Description: DMZ
- IPv4 Configuration Type: Static IPv4
- IPv4 Address: 10.0.0.1 / 24
Clicar em "Save" e depois "Apply Changes"
3. Configurar Hostname Completo
System ā General Setup
System:
- Hostname: pfSense
- Domain: fsociety.pt
4. Ativar SSH (Opcional mas Recomendado)
System ā Advanced ā Admin Access
Secure Shell:
- Enable Secure Shell: ā
Ativado
- SSH port: 22
- Authentication Method: Public Key and Password
- Login Protection: ā
Ativado
Clicar em "Save"
5. Desativar Regras de Bloqueio Padrão (Se NecessÔrio)
Para permitir comunicação inicial entre redes durante configuração:
Interfaces ā WAN ā Edit
Reserved Networks:
- Block private networks and loopback addresses: ā Desativado
Clicar em "Save" e "Apply Changes"
ā Verificação da Instalação
1. Verificar Interfaces
Status ā Interfaces
Verificar:
- WAN: UP - 192.168.31.100/24
- LAN: UP - 192.168.1.1/24
- DMZ: UP - 10.0.0.1/24
2. Verificar Conectividade
Diagnostics ā Ping
Testar:
- 192.168.31.1 (Gateway WAN) ā
- 1.1.1.1 (DNS Cloudflare) ā
- 8.8.8.8 (DNS Google) ā
3. Verificar ServiƧos
Status ā Services
Verificar serviƧos ativos:
- dhcpd (DHCP Server)
- dpinger (Gateway Monitoring)
- ntpd (NTP Server)
- sshd (SSH Daemon)
- syslogd (System Logger)
- unbound (DNS Resolver)
4. Testar Acesso Ć Internet
De uma mƔquina cliente na LAN:
# Testar DNS
nslookup google.com
# Testar conectividade
ping 8.8.8.8
ping google.com
š Hardening Inicial
1. Alterar Porta de Acesso Web (Opcional)
System ā Advanced ā Admin Access
Protocol: HTTPS
TCP port: 8009 # Porta personalizada
2. Ativar Auto-Update Check
System ā Update Settings
Dashboard check: ā
Enable
Check Interval: 1 day
3. Configurar Firewall Logging
Status ā System Logs ā Settings
General Logging Options:
- Firewall Log Entries: 100000
- Show log entries in reverse order: ā
šø Screenshots da Instalação
Dashboard Após Instalação
Status: pfSense 2.8.1-RELEASE (amd64) - FreeBSD 15.0-CURRENT
Interfaces:
ā
WAN - 192.168.31.100/24
ā
LAN - 192.168.1.1/24
ā
DMZ - 10.0.0.1/24
System Information:
- Uptime: 1 hour
- CPU usage: 5%
- Memory usage: 12% (245 MiB)
- Disk usage: 2% (900 MiB)
š Troubleshooting
Problema: NĆ£o consigo aceder Ć interface web
Solução:
- Verificar que estĆ” ligado Ć rede LAN (192.168.1.0/24)
- Verificar IP do cliente:
ipconfigouip addr - Fazer ping ao gateway:
ping 192.168.1.1 - Limpar cache do browser ou usar modo privado
Problema: Interface não aparece
Solução:
# No console do pfSense
1) Assign Interfaces
# Reatribuir interfaces corretamente
Problema: Sem conectividade Ć Internet
Solução:
- Verificar gateway WAN:
ping 192.168.31.1 - Verificar DNS:
Diagnostics ā DNS Lookup - Verificar regras WAN:
Firewall ā Rules ā WAN
š Próximos Passos
Após a instalação, prosseguir com:
- ā Instalação ConcluĆda
- ā”ļø Configuração de Interfaces
- ā”ļø Criação de Aliases
- ā”ļø Regras de Firewall
š Informação AcadĆ©mica
| Campo | Informação |
|---|---|
| Instituição | ESTG - Instituto Politécnico do Porto |
| Unidade Curricular | Administração de Sistemas II |
| Ano Letivo | 2025/2026 |
| Autores | Ryan Barbosa, Hugo Correia, Igor AraĆŗjo |
š LicenƧa
Este projeto estĆ” licenciado sob a MIT License.
š ReferĆŖncias
Ćltima atualização: Dezembro 2025