# How to fix nameserver setting permanently

**URL:** <https://forums.suse.com/t/how-to-fix-nameserver-setting-permanently/35207>\
**Category:** SLES Networking\
**Created:** [August 11, 2020, 4:12am UTC](https://forums.suse.com/t/how-to-fix-nameserver-setting-permanently/35207 "2020-08-11T04:12:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daishi](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@Daishi](https://forums.suse.com/u/Daishi)\
**Post date:** [August 11, 2020, 4:12am UTC](https://forums.suse.com/t/how-to-fix-nameserver-setting-permanently/35207/1 "2020-08-11T04:12:45Z")

</div>

Hello,

I need to refer the external DNS server.  
Then I checked “/var/run/netconfig/resolv.conf”, and nameserver is “10.0.0.2”.  
 ![](https://forums.suse.com/uploads/editor/6j/1u9ydr7cpazy.png)

I changed the name server address to the external DNS server’s one.  
I can resolve the hostname by the external DNS server.  
 ![](https://forums.suse.com/uploads/editor/jz/o4mivi14kf1l.png)

But after rebooting, the setting went to back the before value(10.0.0.2).  
**Could you tell me How to fix nameserver setting permanently?**

Best regards,

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [August 11, 2020, 12:27pm UTC](https://forums.suse.com/t/how-to-fix-nameserver-setting-permanently/35207/2 "2020-08-11T12:27:16Z")

</div>

Hi  
Did you run the command as indicated in the file `netconfig update -f`? Or if using wicked, then set via YaST Network Settings in the Hostname/DNS tab.

---

<div class="post-metadata">

**Author:** ![Daishi](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@Daishi](https://forums.suse.com/u/Daishi)\
**Post date:** [August 12, 2020, 8:49am UTC](https://forums.suse.com/t/how-to-fix-nameserver-setting-permanently/35207/3 "2020-08-12T08:49:37Z")

</div>

Thank you for advice.  
**The problem is solved.**

The wicked.service is used.  
 ![](https://forums.suse.com/uploads/editor/a0/0izjtxhnqhuv.png)

I set the DNS server by yast(following command).  
**yast dns edit nameserver1=192.168.1.116**

After rebooting, I confirmed that the DNS server is reflected to /etc/resolv.conf.

Best regards,
