How to block porn on Linux for free, and why it's worth paying for a porn blocker
Block adult sites on a Linux computer today, then check that it worked.
Set up a free filter on your router
Enter Cloudflare's family addresses on your router, and every device on your home network uses the filter.
Using it anyway? Here are the steps.
-
Sign in to your router
Open your router's admin page. The address and login are usually printed on the router or in its manual.
-
Find the DNS settings
Router makers label them differently, often under Internet, WAN or DHCP.
-
Enter the family addresses
Enter the IPv4 addresses below. If your router has IPv6 DNS settings, enter the IPv6 addresses too. Save, then restart the router if it asks you to.
Check it worked
Set up a free filter on this computer
Point your active connection at Cloudflare's 1.1.1.1 for Families. These steps follow Ubuntu desktop with GNOME Settings and NetworkManager.
Using it anyway? Here are the steps.
- An administrator account.
- Ubuntu desktop with GNOME Settings and NetworkManager. Other desktops label settings differently.
-
Open your connection settings
SettingsNetworkyour connectionSettings button
For Wi-Fi, open Wi-Fi instead of Network.
-
Enter the IPv4 servers
IPv4DNS
Turn off Automatic and enter the IPv4 servers below.
-
Enter the IPv6 servers
IPv6DNS
Turn off Automatic, enter the IPv6 servers above, then select Apply.
-
Reconnect
Turn the connection off and on again so the new servers take effect.
Check it worked
Questions and troubleshooting
Your setup, the command line, new connections, the test address
- Not sure what you're running
cat /etc/os-releaseprints your distribution and version.nmcli general statusshows whether NetworkManager is running. Neither changes anything.- You set DNS from the command line
- It depends on your network stack, so no single command suits every system. Follow your distribution's NetworkManager or systemd-resolved documentation, with the same addresses.
- A new network or a system upgrade
- Each saved connection keeps its own DNS settings, so repeat the steps for a new one. After a major upgrade, run
resolvectl statusagain. - Cloudflare's test address still opens
- Check the addresses on the connection you are using, reconnect, then reopen the browser.
Is a free filter enough on Linux?
You can block porn on Linux for free. Cloudflare's 1.1.1.1 for Families on your router covers the devices on your home network, and the same addresses on a connection in Ubuntu's settings cover that computer. Whoever has the router login or can edit the connection can change them back in seconds, and nobody is told.
-
What the free options cover
A router filter applies only on your home network, not on a hotspot, at work or when you travel, and any device can be set to a different DNS in its own settings. A filter on the computer covers only the connections you set it on, so each new one needs the same steps. Both use Cloudflare's categories only, so you can't block a site of your own.
-
Why it's worth paying for a porn blocker
A paid blocker earns its cost when protection has to hold. LockedWeb for Linux is coming soon. Every LockedWeb device today waits 72 hours before protection loosens and then needs a one-time code, is protected on any network, blocks any site you add right away, and can alert an optional contact if someone asks to loosen protection. LockedWeb protects iPhone, iPad, Android, Windows and Mac today, with one plan for up to 25 devices in one household. See supported devices and plans.
-
Does a porn blocker see what you browse?
It depends on the app. Some send a partner activity reports or screenshots. LockedWeb takes no screenshots and keeps no browsing history. Domain lookups reach our resolver to apply your rules and are not kept as browsing history. Account and device details, settings and requests are stored to run the service. See What we store, the Privacy Policy and how blocking and reporting differ.