A NodeJS web app for easily blocking internet access for devices via pfSense NAT rules
I only have access to iOS devices, so this will render best on an iOS device. It should still look reasonable in just about any modern web browser.
You must install and configure the API for pfSense (see https://github.com/jaredhendrickson13/pfsense-api).
- Create an alias (Firewall → Aliases) for each device to be blocked.
- Create firewall rules on the LAN adapter to block each alias. Be sure to create the rules before/above the final "Default allow LAN to any rule" rule.
a. Action:
Reject
b. Disabled:Disable this rule
(checked) c. Interface:LAN
d. Address Family:IPv4+IPv6
e. Protocol:Any
f. Source:Single host or alias
and enter/select the alias
Copy config.js.example
to config.js
and set the options below.
- devices:
alias_name
:friendly device name
- http_port: HTTP port to listen on
- pfsense:
address
- The DNS or IP address of pfSenseprotocol
- The procotol (HTTP or HTTPS) used to access pfSenseport
- The TCP port pfSense is listening onclient_id
- The client ID for the pfSense APIclient_token
- The client token for the pfSense API