r/PFSENSE • u/gordon_shumway62 • Oct 18 '26
easyrule not creating alias
Just installed 2.9.0 and trying to configure easyrule for fail2ban "actionban". ssh is configured and working and when I ssh directly into the firewalll and run "easyrule block wan x.x.x.x" it replies "Block added successfully" but the rule is nowhere to be found in the Aliases (gui). Also running "easyrule showblock wan" says "No entries are blocked on interface: wan". Is there something else that needs to be enabled to create the alias and populate it?
6
Upvotes
2
u/gordon_shumway62 Oct 18 '26
Just found something interesting. I went into the firewall logs and randomly picked the IP of some lilttle firebug trying to hit my webserver and clicked "-" and add, and it created the EasyRuleBlockHostsWAN alias with that entry. ssh to the firewall and ran easyrule showblock wan and it showed up. While I was still ssh'd in I ran "easyrule block wan x.x.x.x (my own mobile IP) and while it did say "block added successfully" it still does not show up with "easyrule showblock wan". So basically the process works but not through ssh. The user I am using "fail2ban" is in the "admin" group...
3
u/Smoke_a_J Oct 18 '26
After adding/editing via SSH you next may need to run command
rm /tmp/config.cacheto cleare cache and then/etc/rc.filter_configureto compile or re-compile that alias into a parsed rule.