Hi cedm5cd. It sounds like you want a domain whitelist, which may be a bit tricky to implement (a blacklist would be simpler).
A naive solution is to put the domain names and ip addresses of the sites you want into /etc/hosts, so that it looks like this (add the other domains you want, one per line--there are many ways to get the ip address, simplest way is "nslookup blahblahblah.org"):
127.0.0.1 box localhost localhost.local
kmeleonbrowser.org 216.105.38.10
tinycorelinux.net 128.127.66.77
msfn.org 151.106.17.234
Then disable DNS by changing /etc/resolv.conf to this:
nameserver 0.0.0.0
You probably want to make /etc/resolv.conf immutable (to prevent network managers etc. from adding a dns server to it):
sudo chattr +i /etc/resolv.conf
You'd also need some mechanism to periodically update /etc/hosts, because the ip address associated with each domain may change.
Other users may have a better solution, but I think the above would work.