pfBlockerNG how to block Mozilla Firefox VPN
-
Good day. If doable, how to use pfBlockerNG (or any pfsense tool) to block Mozilla Firefox Browser's free VPN? I have read the two posts below but would like to know if it's possible to block if the particular VPN is known:
https://forum.netgate.com/topic/162784/block-vpn-connection
https://forum.netgate.com/topic/165201/unable-to-block-vpn-apps -
Uninstall Firefox might be easier.
-
block this endpoint https://vpn.mozilla.org and see if you get the results you want.
-
For reference https://docs.netgate.com/pfsense/en/latest/firewall/aliases-features.html#hostnames-in-aliases, if they have multiple IPs for it. (?)
One could also try a DNS host override, but then would need to block DOH/DOT. Which pfBlocker can do. And/ or https://docs.netgate.com/pfsense/en/latest/recipes/index.html#dns.
-
Hi @elvisimprsntr this is not possible because it is a school and users bring their own devices
Hi @Uglybrian and @SteveITS blocking https://vpn.mozilla.org did not solve it, even when set to all ports. DNS over TLS and DNS over HTTPS are already blocked. Any other ideas on how to block Mozilla Firefox VPN?

This is the VPN_toblock alias:

-
@richardsago said in pfBlockerNG how to block Mozilla Firefox VPN:
Hi @elvisimprsntr this is not possible because it is a school and users bring their own devices
At least in the US, there are CIPA legal and regulatory requirements for protecting students internet access.
You might want to consider a professionally managed firewall and rule sets, rather than trying to implement something on your own, which you may be held personally liable for.
-
G Gertjan referenced this topic
-
Not sure why this is a 'hard' question ?
If a LAN users activates a VPN, this can be observed on pfSense.Goto Diagnostics > Packet Capture, select the LAN interface the client uses, enter it's IPv4, and hit Enter.
You see a lot of traffic.
One of the destination IPs listed is the 'Firefox VPN server' destination IP. That's the one you have to block.If this is to hard, install Firefox on your own PC.
Kill close most apps, so the PC generates les traffic.
No start packet capturing with your own IP - your own PC.
Start Firefox with the enabled VPN.
The lines shown up right now in ten ten capture log are probably what you are looking for.The IPs, entire networks probably that Firefox uses aren't really hidden, and you could find the on the Internet. Put all these IPs (network) in an alias list, and use that alias with LAN block rule.
-
@richardsago vpn.mozilla.org has a 60 second TTL so presumably they are changing IPs rapidly. Meaning the doc warning I linked above applies. Your alias would block whatever one IP to which pfSense resolves it, at that point in time (every 5 minutes).
-
I’m guessing your students have found a DoH resolver that you’re not blocking. As long as there’s access to DoH, none of the firewall rules will trigger.Are you using PFS built-in resolver, some other resolver? if you have PF Bocker enabled. Look at reports-> unified, there could be some clues in there to what’s being resolve.
-
@SteveITS if it uses vpn.mozilla.org that is easy enough to block via just dns, but as mentioned they could just be using doh to resolve it and yeah that becomes more difficult to block - especially if they are using some not really known doh server, or for that matter spun up their own somewhere.
doh can be a PITA to effectively block..
-
@johnpoz Most (common ones?) are covered by the DNSBL SafeSearch "DNS over HTTPS/TLS/QUIC Blocking" option as I alluded to...it just refuses to resolve the names. OP should also use the recipes I linked above to block external DNS.
Nothing like configuring curated/managed DNS just to have browsers helpfully bypass it...

-
Thank you @elvisimprsntr @Gertjan @SteveITS @Uglybrian @johnpoz for the replies. Further tests showed your suggestions to block endpoint https://vpn.mozilla.org and pfsense recipe - DNS will solve the problem. The states value seem to reset to zero every time a firewall rule is deactivated and then reactivated:


If the firewall rule is active when VPN is started it will not proceed to the activation of VPN but will loop back to the message "Get started":

If the firewall rule is deactivated the option to turn on VPN will be available:

-
This solution will fail if one of your LAN clients resolves the domain
vpn.mozilla.orgto an IP address that hasn't been picked up byfilterdnsyet, the pfSense function that resolves FQDNs used in aliases like you've done here.Best to use a proper DNSBL utility, like pfBlockerNG, to block specific domain queries. That still doesn't cover all the ways a LAN client could circumvent even strict DNSBL. But at least it (i.e., pfBlockerNG) affords some reliable DoH blocking.
-
Thank you @tinfoilmatt for the reply. Can you please assist how to go about this? The only VPN I found in pfBlockerNG > Feeds is Ejrv VPN and it does not seem to be updated:

These are currently what I have. Please let me know what changes need to be made. Thank you
Using StevenBlack for DNSBL blocking:

And also DNSBL Category UT1:

And DNSBL SafeSearch DoH Blocking List:

And added these firewall rules taken from pfsense docs and forum users:

-
@richardsago See
https://docs.netgate.com/pfsense/en/latest/services/dns/resolver-host-overrides.htmlhost = vpn.mozilla.org
IP = 0.0.0.0 or 127.0.0.1 or something that goes nowhereAnd then block external DNS as you did. Also I'd consider the Blocking and/or Redirecting DNS recipes to which I linked up above.
-
@tinfoilmatt said in pfBlockerNG how to block Mozilla Firefox VPN:
This solution will fail if one of your LAN clients resolves the domain vpn.mozilla.org to an IP address that hasn't been picked up by filterdns yet, the pfSense function that resolves FQDNs used in aliases like you've done here.
Agree which is why I would like aliases in pfsense to keep a configurable history (old values are not removed for minutes, hours, days or weeks) as described here Unexpected alias behaviour - two ranges / size limits with FQDN. That solution would enable white listing or back listing any of the FQDN which big tech likes to change very frequently.
@richardsago said in pfBlockerNG how to block Mozilla Firefox VPN:
The only VPN I found in pfBlockerNG > Feeds is Ejrv VPN and it does not seem to be updated:
Yeh,
I suspect that list was too valuable to have freely available. It use to block by far the majority of the port scanners as well as VPN access. -
Thank you @SteveITS and @Patch for the replies. I have added the host override in DNS Resolver. Concerning the Redirect DNS recipe: How to test if the Redirect DNS recipe was successful? This is where I'm stuck:
- set test computer DNS from automatic to 8.8.8.8
- run "ipconfig /all" and confirm "DNS Servers" is 8.8.8.8
- confirm the test computer can browse successfully
- implement the Redirect DNS recipe
- I'm stuck here. What should I test or run to confirm that the Redirect DNS recipe is working as intended?
-
Be careful with the main 'adult' list. It's huge.

See pfBlokcerng as this little two stroke engine.
The 'Adult' list is a "Boeing 777". Moving it around with your little engin might be problematic. That's why the message says [Large].
My Netgate 4100 (4 Gbytes RAM) has difficulties with it.Here is the "ut1" dnsbnl file unpacked, also on your pfSense :

Btw : the utf feeds unpacked location is here :/var/db/pfblockerng/ut1
Go there, and have a look :[26.07-RELEASE][root@pfSense.bhf.tld]/var/db/pfblockerng/ut1: grep -R 'mozilla.org' * ut1_adult:addon--o-mozilla-org.webflow.io ut1_adult:addons--mozilla-orgs.webflow.io ut1_blacklists_adult:addon--o-mozilla-org.webflow.io ut1_blacklists_adult:addons--mozilla-orgs.webflow.io ut1_blacklists_liste_blanche:mozilla.org ut1_blacklists_malware:supportmozilla.org ut1_blacklists_phishing:supportmozilla.org ut1_blacklists_redirector:vpn.mozilla.org ut1_blacklists_strict_redirector:vpn.mozilla.org ut1_blacklists_strong_redirector:vpn.mozilla.org ut1_blacklists_vpn:vpn.mozilla.org ut1_liste_blanche:mozilla.org ut1_malware:supportmozilla.org ut1_redirector:vpn.mozilla.org ut1_strict_redirector:vpn.mozilla.org ut1_strong_redirector:vpn.mozilla.org ut1_vpn:vpn.mozilla.orgYou see the last two lines ?

Back to :

and ... wait ... this "VPN section" isn't visible in the pfBlockng GUI 'UTF' section .....

But a dnsbl feeds file exist in the utf main feed file, so ... why not using it yourself ? You know now the location on your pfSense of this file. It will exist as long as you activate and thus download the utf feed.
Recycle back to what I have said above : what about making your own feed file out of it ? ^^ -
@richardsago said in pfBlockerNG how to block Mozilla Firefox VPN:
set test computer DNS from automatic to 8.8.8.8
mmm
I'm not sure that's correct. 8.8.8.8 is Googles DNS which will not contain your host over rides.
I suspect you need to- Forcing all computers including the test computer to use pfsense DNS
- Check test computer is using pfsense DNS and can access the internet
- Add host over ride to pfsense DNS +/- IP filtering of VPN end points
- Check test computer can't access VPN
- Check other computers can't access VPN
- Monitor attempts to access VPN
-
Thank you @Gertjan and @Patch for the replies. Adding vpn.mozilla.org in the DNS Resolver host override solved the problem and I have now deleted the firewall rule I posted earlier (including the VPN_toblock alias). Concerning how to test the "Redirect DNS" recipe: I have added the port forward and placed the automatically-added firewall rule just below the "Allow DNS query to pfsense". Is this the correct sequence or should I place it above the firewall rule "Allow DNS query to pfsense"?

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy