Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

How to change DNS on Kali

1) sudo nano /etc/dhcp/dhclient.conf // Change #prepend domain-name-servers line, add the dns you want. Example:
prepend domain-name-servers 1.1.1.1, 1.0.0.1; // Remove # so that it isnt a comment

2) sudo chattr -i /etc/resolv.conf/

3) sudo nano /etc/resolv.conf/ // Change your DNS settings. IMPORTANT NOTE: Dont separate DNS adresses with commas, write nameserver before each adress, like here:
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4

4) sudo chattr +i /etc/resolv.conf/

5) sudo systemctl restart NetworkManager.service // If it doesnt work use sudo service restart NetworkManager. It isnt that necessary, wont change outcome.


/*I dont like people not understandig what they do, heres what you did:

You modifided /etc/dhcp/dhclient.conf and added the adresses, Then used chattr -i to set /etc/resolv.conf/ as a writable file, then changed the file again, set /etc/resolv.conf/ as unwritable and restarted Network Manager*/

Comment

PREVIOUS NEXT
Code Example
Shell :: update pyinstaller 
Shell :: enable virtualization mac pro 
Shell :: linux speed up video 
Shell :: fork bomb linux 
Shell :: linux DNS_PROBE_FINISHED_NXDOMAIN 
Shell :: grep v multiple word 
Shell :: information about files linux 
Shell :: set date and time linux 
Shell :: ubuntu update 
Shell :: shebang line 
Shell :: remove all untracked files git 
Shell :: gh create github repo 
Shell :: install entityframeworkcore nuget in asp.net core 3.0 
Shell :: how to update forked repo in github 
Shell :: git ignore except 
Shell :: how to open appimage in linux 
Shell :: run pm2 in cluster mode 
Shell :: how to check size of image in linux 
Shell :: git clone with subrepos 
Shell :: brew install jupyter 
Shell :: vagrant vbox guest additions install 
Shell :: ubuntu iso download 
Shell :: install brew in mac 
Shell :: debian bullseye install nvm 
Shell :: how to make a tarball in linux 
Shell :: Google Chrome freeze uploading a file ubuntu 22.04 
Shell :: git push heroku master everything up-to-date 
Shell :: centos copy folder 
Shell :: git clone in 
Shell :: run mutiple sass files at once 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =