Wireguard Failed to Connect until I increase Firewall Maximum Table Entries
-
I spent many hours and thought I would share my fix... I am new to pfSense but work in IT.
To start, I followed these instructions How to Set Up WireGuard on pfSense and Wireguard would not connect. I re-installed multiple times. I even setup a Raspberry Pi with Wireguard. However, the firewall was dropping all wireguard packets to the Pi.
Eventually, I figured out how to view ther firewall logs.
Status > System Logs > Firewall Normal View
Many Drops by the rule "Default deny rule IPv4 (1000000103)" to destination xxx.xxx.xxx.xxx:51820This made no sense because I have the port forwarding enabled, with the WAN rule setup so packets should not be dropped by default.
While troubleshooting, I got a several messages:
"there were error(s) loading the rules: /tmp/rules.debug:34: cannot define table pfB_PRI1_v4: Cannot allocate memory"This seemed unrelated but I decided to fix it. This lead to recommendations to increase Firewall Maximum Table Entries to 400000. However, I was already set to 400000 by default during the install. So increased it from 400000 to 600000. Immediately, my phone began ping my Linux server via Wireguard.
System > Advanced > Firewall & NAT
Firewall Maximum Table Entries
Was 400000 increased to 600000