JWMutant Posted September 27, 2017 Share Posted September 27, 2017 Evening all, Just a quick question for those who know. Does anyone know how to update the DNS via ssh? Im not that crash hot with my linux commands... my knowledge doesnt go past ifconfig. :-) But if there is a way to flush and update the DNS via ssh would someone be able to post up a idiots guide on how to do so. Appreciated. Quote Link to comment
Tuftuf Posted September 27, 2017 Share Posted September 27, 2017 (edited) DNS settings are located in /etc/resolv.conf root@Tower:~# cat /etc/resolv.conf # Generated entries: nameserver 172.19.10.1 root@Tower:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf root@Tower:~# cat /etc/resolv.conf nameserver 8.8.8.8 root@Tower:~# echo "nameserver 172.19.40.1" > /etc/resolv.conf root@Tower:~# cat /etc/resolv.conf nameserver 172.19.40.1 root@Tower:~# Or you can simply edit with vi or nano Edited September 27, 2017 by Tuftuf 1 Quote Link to comment
JWMutant Posted September 27, 2017 Author Share Posted September 27, 2017 1 minute ago, Tuftuf said: DNS settings are located in /etc/resolv.conf root@Tower:~# cat /etc/resolv.conf # Generated entries: nameserver 172.19.10.1 root@Tower:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf root@Tower:~# cat /etc/resolv.conf nameserver 8.8.8.8 root@Tower:~# echo "nameserver 172.19.40.1" > /etc/resolv.conf root@Tower:~# cat /etc/resolv.conf nameserver 172.19.40.1 root@Tower:~# Thank You. Do you happen to know if there is a way to update the gateway without doing a reboot? Quote Link to comment
Tuftuf Posted September 27, 2017 Share Posted September 27, 2017 From memory, you can do that within the UI but will need to stop the array I believe. Settings > Network Settings The CLI commands will partly depend on what your current routing table looks like. Is it a requirement for you to do this from commandline? Quote Link to comment
JWMutant Posted September 27, 2017 Author Share Posted September 27, 2017 Im working on a project a the moment which short story requires me to update the gateway without taking the VM offline. Quote Link to comment
JWMutant Posted September 27, 2017 Author Share Posted September 27, 2017 I’m wondering if “route add default gw 192.168.1.254 eth0” will workSent from my iPhone using Tapatalk Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.