Restrict all except few

A metered lte location would benefit from most restricted data possible. Question is how to basically stop all traffic except a few? Currently I have adguard on with a number of sites and about as large of a hosts file as I can without breaking it.
Suggestions online are DNS port and Pi-hole or allow specific IP and block rest.

Trying nextdns.

You need to use luci for this, navigate to network -> firewall -> traffic rules, add one like this.

Something like:

Result:

The ! is a special operator, meaning except, or false, but it cannot be applied on every field, it does also work on mac source addresses and dest addresses.

2 Likes

OK, let me try that and get back in a week. (leaving on a jet plane)

2 Likes

! is a near universal token in programming for not. Eg:

if [ ! "$(grep -m 1 '0 * * * * /usr/bin/wireguard_watchdog' /etc/crontabs/root)" = '0 * * * * /usr/bin/wireguard_watchdog     # hourly' ]; then
	printf '%s\n' '0 * * * * /usr/bin/wireguard_watchdog     # hourly' >> /etc/crontabs/root
fi
1 Like

This is true, but one would not know a UI accepts it.

1 Like

Heh, agreed. I’ve learned not to expect much from a UI. :wink:

1 Like