Setup DNS server permanently

How to setup the DNS server permanently on server using command line?

I changed the network settings but the the old DNS server keeps being changed automatically once a while.

What command should I execute or witch configuration file should I change?

cpcmd scope:set net.nameservers '[1.0.0.1,1.1.1.1]'