Don't worry, no bookmaker or anyone else will ban you for changing dns to 1.1.1.1 or 8.8.8.8 (google dns) or whatever else. This method just helps to access sites if your ISP block them, it's not hiding your real IP in anyway. Just make sure they allow citizens of your country to play.
In my coutry goverment banned access to all foreigh gamblings sites, but its still legal to play everywhere so I’m fine.
Just because you didn't face any problem or your accounts didn't get banned doesn't mean it's fine. In fact, it doesn't make much sense: how can gambling, or any other activity, be legal while your government prohibits it?
As I said multiple times: most casinos (especially licensed ones) will ban your account if they find out you are from a country where gambling is illegal. Better read the ToS before doing anything.
Besides, even if you change the DNS server, your ISP is still able to track your internet activity and see which websites you have visited. If gambling is illegal in your country, then you may encounter more serious problems (ie, prison) than having your account banned.