You don't need to pull your internet connection to be safe. As mentioned in other posts, the security a router does is only partially liable to the security of the network as a whole. With the user being the most insecure thing about it.
Still no script that will help in your quoted scenario above.
Glad to see you're still learning (and willing to learn). Keep doing that. Maybe read some of my links, which include not using default ports for a default setup.
The internet by design is built on trust. Whether one knows it or not. Either you trust certain sites, or you don't. But nothing you can put on a router or other network device will give you free rein for surfing the internet and keep you totally safe too. You must decide the balance.
For myself (as I've stated before), I don't trust anything on my phone (Samsung/Android). No apps. No games. Nothing except phone/text use. Why? Because Google is behind everything on that platform. And I don't trust/refuse to allow Google into my activities.
On the computers, I don't randomly follow every link. I never click on any 'Ad'. I don't use Google to search for what I want. I have a handful of sites that I use and pretty much stay within them (and even that isn't 100% secure, I know). I also don't have third-party Antivirus software either for the same reason (I don't trust any third-party provider - and, when I did, that is the only time my computers would be infected... coincidence? I don't think so).
On that same note of entities I don't trust, Apple is right up there with Google. I really want another choice for a phone (iOS and Android really suck for what I use them for).
For your search, learn as much as you can about the things you want to know about. Unbound? Sure, you can be reading for a few weeks on that alone. When you've absorbed all that information, make your choice then. No script can help with that. Nor can anyone here or on any other forum answer that for you.
Start with the basics. Keep it handy (even print it out if that helps you better). But know that anything you do is a tradeoff when you're online. You either want some information from the web, or you don't. I lean towards the 'don't' side myself, and I don't feel I miss anything.
Unbound.conf