I try to download something from
nvidia on a remote server via ssh. Iran is banned by the
nvidia website. When I check the server
dns, that is:
IP4.DNS: 192.168.20.14 IP4.DNS: 126.96.36.199
I know if I could set the dns to google dns (188.8.131.52 or 184.108.40.206) then I was able to surf the website and download from it. I tried to change the dns on the server but whatever I do it’s the same as above.
Its the content of
uto lo iface lo inet loopback #auto enth0 iface eth0 inet static address 172.16.143.8 netmask 255.255.255.224 gateway 172.16.143.1 dns-nameservers 220.127.116.11 18.104.22.168
This is the output of
eno1 Link encap:Ethernet HWaddr 34:97:f6:dc:9f:ff inet addr:172.16.143.8 Bcast:172.16.143.31 Mask:255.255.255.224 inet6 addr: fe80::c8cd:597a:b384:a22b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2101 errors:0 dropped:0 overruns:0 frame:0 TX packets:1298 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:891719 (891.7 KB) TX bytes:237702 (237.7 KB) Interrupt:20 Memory:fb200000-fb220000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host
I wonder why network id is
eno1?! it’s the output of
sudo nmcli c
NAME UUID TYPE DEVICE Wired connection 1 532cfa3a-d61b-4bc4-b516-1dc31a5baead 802-3-ethernet eno1
Once I changed
eno1 but then I couldn’t access the server until the file was set back to
I also installed
resolvconf and followed instruction of this website
the content of
/etc/resolv.conf is preserved but the dns doesn’t change
Yet, I might be able to use the secondary dns to connect a website (using
wget or other solutions)
Is it possible, what could I do?
It looks like your system is using NetworkManager to manage its connection to the network. This is helpful, because what you want to do needs to be done in NM, and cannot be done in the interfaces file.
You need to modify a NetworkManager setting for your connection to tell it to ignore the DNS servers provided by DHCP so that it will only use your chosen DNS servers:
nmcli c mod "Wired connection 1" ipv4.ignore-auto-dns true
You can then restart the network or the computer. All of your DNS queries should now use your chosen nameservers.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.