Most blockers put one wall in your way. You built the wall, so you know where the door is. Portcullis puts four in your way, across every device you own, and makes taking them down take two days.
Every blocker has a hole. A browser extension is removed with two clicks. A DNS filter is
switched off in settings. A hosts file is edited by anyone who can type sudo.
On its own, each one stops you for about forty seconds.
Layering changes the arithmetic. To get through, you have to defeat all of them, each needing a different trick, while a part of you is already arguing that this is stupid and you should stop. That argument is the thing we're buying time against — most urges fade within about twenty minutes if you don't act on them.
| Layer | Covers | Getting past it |
|---|---|---|
| Hosts file 76,000+ adult domains |
Every browser and every app on the computer — Safari, Chrome, Firefox, anything | Admin password, then a 48-hour wait |
| Browser policy Top 1,000 by traffic |
Chrome and Edge, including private windows | Admin password |
| DNS filter NextDNS, free tier |
Phone and laptop, on wi-fi and mobile data | Device settings, or a PIN someone else holds |
| App blocker AppBlock strict mode |
Apps and browsers on the phone | Strict mode: PIN, charger, or a cooldown |
Step-by-step guide with screenshots → every screen you'll see, for Mac, Windows, Android and iPhone.
Start with the computer you use most. Each part works on its own, so you can stop after one layer and still be better off than before.
Use the app. It does everything below for you, and the setup guide has a picture of every screen.
Portcullis-Mac.zip. A Portcullis icon appears.This does the same as the app using Terminal, a built-in Mac program where you type commands. You'll copy each grey box and paste it in — you don't need to understand the commands.
portcullis-blocker-main.zip, double-click it. You should now have
a folder called portcullis-blocker-main in Downloads.Terminal, and press Return. A window with a line of text and a blinking
cursor opens.cd ~/Downloads/portcullis-blocker-main
Nothing seems to happen — that's right. If it says No such file or directory, type
cd and a space, drag the portcullis-blocker-main folder from Finder onto
the Terminal window, and press Return.sudo bash mac/install-hosts.sh
It shows Password: — type the password you use to log in to your Mac and press
Return. Nothing appears while you type — not even dots. That's normal;
it's still typing. When it finishes you'll see a line saying the block is in place.sudo bash mac/install-guard.shPortcullis.mobileconfig. Click OK. Then
Apple logo (top left) → System Settings → General → Device Management,
double-click Portcullis, click Install and enter your password.
Pictures of each screen.sudo bash mac/test-guard.sh
You can close Terminal afterwards.Use the app. The setup guide has a picture of every screen.
Portcullis-Windows.zip →
Extract All… → Extract. A new Portcullis-Windows folder appears —
drag it onto Documents in the list on the left. Keep it there; the app runs from it.Portcullis.cmd in that folder. If a blue box says
Windows protected your PC, click More info, then Run anyway.This uses PowerShell, a built-in Windows program where you type commands. You'll copy each grey box and paste it in — you don't need to understand the commands.
portcullis-blocker-main.zip → Extract All… →
Extract.PowerShell, and on the right click Run as administrator. Click Yes.
A dark window with a blinking cursor opens.cd $HOME\Downloads\portcullis-blocker-main\portcullis-blocker-main
If it says it cannot find path, type cd and a space, drag the
portcullis-blocker-main folder that contains the windows folder onto the
PowerShell window, and press Enter.powershell -ExecutionPolicy Bypass -File .\windows\install.ps1
It blocks the sites in every browser and app, and stops Chrome and Edge getting around it.powershell -ExecutionPolicy Bypass -File .\windows\install-guard.ps1DNS filtering covers every app on the phone, on wi-fi and on mobile data. It's free.
yourid.dns.nextdns.io.apple.nextdns.io in Safari, pick your profile,
tap Download, then Settings → Profile Downloaded → Install.DNS filtering stops sites. It can't stop an app. AppBlock adds that, and its Strict Mode is the part that matters: once on, you can't edit your blocks, pause them, or uninstall the app until you satisfy whatever unlock you chose — a PIN, plugging in a charger, a timer, or a cooldown.
Uses device-admin permission to prevent uninstall, and can block access to device settings. This is the stronger of the two implementations.
Has "Disable App Uninstalling", but some users report it being bypassed via Screen Time. Treat it as friction, not a lock.
Set the unlock to a cooldown of several minutes rather than a PIN you know. A PIN you can remember is not an obstacle at 1am.
Fair question, and you shouldn't take anyone's word for it — including mine. Here's exactly what it touches and how to check.
| What it changes | Why | How to check |
|---|---|---|
Your hosts file | Points blocked domains at nothing | It's a text file. Everything is between two marker comments; your own entries are left alone and backed up first. |
| Chrome/Edge policy | Blocks the top 1,000 sites, turns off browser DNS | Open chrome://policy and read every value it has set. |
| A background task | Puts the block back if it's removed | One small script, guard.sh or guard.ps1. It writes a log of everything it does. |
If you use the DNS layer, NextDNS sees the domains your devices look up. That is how filtering works — something has to answer the question. They're a paid-subscription business rather than an ad one, logging is optional and you choose the retention, but it is a genuine trade and you should make it knowingly. Skip that layer if you'd rather not; the rest still works.
Documented on purpose. A tool that hides its own exit isn't trustworthy, and you'll legitimately need this one day — a new laptop, a work machine, a changed mind.
It's deliberately slow: you ask once, wait 48 hours, then do the same thing again to confirm. The setup guide shows every screen.
Terminal, press Return). Click Copy below, paste into Terminal
(⌘ Command + V), press Return, and type your Mac password — nothing shows while you type, which is normal:
sudo bash /Applications/Portcullis.app/Contents/Resources/mac/uninstall-hosts.sh
It replies that removal has been requested and tells you when you can come back. Do exactly the
same 48 hours later to finish. Changed your mind? Do it with --cancel on the end.
(Set up by hand instead of with the app? Use
sudo bash mac/uninstall-hosts.sh from the project folder.)
PowerShell, click Run as
administrator, then Yes. Click Copy below, right-click in PowerShell to paste, and
press Enter:
cd $HOME\Documents\Portcullis-Windows
powershell -ExecutionPolicy Bypass -File .\app\windows\uninstall.ps1
Do the same 48 hours later to finish — this also removes the Chrome and Edge lock. Changed your
mind? Add -Cancel to the end of the second line.
(Set up by hand? From the project folder, use
.\windows\uninstall.ps1 in the second line instead.)If one site you need is blocked by mistake, don't remove everything. Take it off
your list in the app — or, if it's on the built-in adult list, sudo bash mac/allow-site.sh
example.com from the project folder unblocks just that one after an hour.