← Back to home
OpenVPN pfSense VPN Certificados Mikrotik

OpenVPN on pfSense

Jan 20, 2022

Setting up a VPN with OpenVPN on pfSense with a Mikrotik router, including certificate creation, user management and client connection from Windows and Kali Linux.

Network Topology

1. Mikrotik Router

ip dhcp-client add interface=ether1 disable=no
ip address add address=10.10.10.2/30 interface=ether2
ip address add address=172.26.0.1/24 interface=ether3
ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade

2. Install OpenVPN Package on pfSense

# Browser: https://192.168.1.1
# System β†’ Package Manager β†’ Install: openvpn-client-export

3. Create CA and Server Certificate

# System β†’ Certificate Manager β†’ CAs β†’ Add (internal CA)
# System β†’ Certificate Manager β†’ Certificates β†’ Add (Server Certificate)

4. Configure OpenVPN Server

# VPN β†’ OpenVPN β†’ Wizards
# Type: Local User Access | Tunnel: 10.8.0.0/24
# Enable Redirect Gateway, Firewall Rule and OpenVPN Rule

5. Create Users and Connect

# System β†’ User Manager β†’ Add (username + password + certificate)
# Windows: download OpenVPN installer + user .ovpn β†’ import β†’ connect
# Kali: nmcli connection import type openvpn file cert.ovpn