Raymii.org
Quis custodiet ipsos custodes?Home | About | All pages | Cluster Status | RSS Feed
pfSense allow web interface access on WAN from specific IP
Published: 31-12-2014 | Author: Remy van Elst | Text only version of this article
❗ This post is over nine years old. It may no longer be up to date. Opinions may have changed.
pfSense is a fast and simple FreeBSD based firewall appliance with a nice web managent interface and the power of the pf firewall underneath. Normally the web interface is only accessible from the management LAN (or LAN by default) interface. If you for whatever reason locked yourself out or need access from a different IP via the WAN interface you can use the easyrule command line to temporarly add a rule that allows your remote IP in. This simple snippet shows you how.
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:
I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!
The following command adds a firewall rule, allowing tcp traffic in on port 443 from remote IP XX.XX.XX.XX: to the WAN IP on YY.YY.YY.YY:
easyrule pass wan tcp XX.XX.XX.XX YY.YY.YY.YY 443
You can also allow SSH access and set up a remote port forward (ssh -L
localport:remoteip:remoteport remoteip
):
easyrule pass wan tcp XX.XX.XX.XX YY.YY.YY.YY 22
Remember to remove the rule when you've restored access to the web interface via your regular way.
See other methods to get back in the webinterface on the pfSense Wiki.
Tags: bsd , firewall , freebsd , iptables , pf , pfsense , security , snippets