mlinux resolv.conf issue
Home › Forums › Conduit: mLinux Model › mlinux resolv.conf issue
Tagged: Conduit, DNS, mlinux, resolv.conf
- This topic has 8 replies, 7 voices, and was last updated 8 years, 5 months ago by Bryan Tran.
-
AuthorPosts
-
November 9, 2015 at 8:30 am #9852James ColemanParticipant
We found out that the resolv.conf file loses the nameserver 8.8.8.8 setting when the Conduit is powered down. This is why we were getting the ENOUTFOUND error after I provided my setup to a customer.
Do you know why this happens? Is there a way to set that nameserver 8.8.8.8 value in the resolv.conf file so it is not lost when the Conduit is powered off or is there a way to set this value when the Conduit is powered on?
Thanks,
James
November 9, 2015 at 3:27 pm #9868Brandon GoochParticipantHere’s what I did to obtain a persistent DNS config on my Conduit:
1. Remove the /etc/volatile.cache file from the filesytem.
2. Comment out the following entries from /etc/default/volatiles/00_core:l root root 0644 /etc/resolv.conf /var/run/resolv.conf f root root 0644 /var/run/resolv.conf none
3. Remove the /etc/resolv.conf symlink.
4. Create your new /etc/resolv.confAfter a reboot, my DNS settings survived.
There is probably a better way to do this, so I hope someone from MultiTech can chime in with some guidance.
- This reply was modified 9 years ago by Brandon Gooch. Reason: Try to fix the code markup conversion
November 9, 2015 at 8:35 pm #9873James ColemanParticipantBrandon,
Thanks for your post. The problem is when power is removed from the Conduit.
I made the revisions you reference above but the setting still goes away when power is removed from the Conduit.Thanks,
James
November 10, 2015 at 9:16 am #9878Jesse GillesBlockedAs Brandon pointed out, /etc/resolv.conf is configured by default as a “volatile” file and this scheme works well when using DHCP or when using PPP (cellular). A simple workaround for static configuration is to put something like the following in your /etc/network/interfaces file for eth0.
post-up echo “nameserver 8.8.8.8” > /etc/resolv.conf
Jesse
- This reply was modified 9 years ago by Jesse Gilles.
November 10, 2015 at 2:37 pm #9887James ColemanParticipantJesse,
Thanks for the information. I will try this and see if this works for us.
James
December 13, 2015 at 9:33 am #10419Bas van der PolParticipantI can confirm that Jesse Gilles his provided solution did the work for us!
Thanks!
Bas
- This reply was modified 8 years, 11 months ago by Bas van der Pol.
January 28, 2016 at 3:26 pm #11453Jeff ClemmerParticipantThanks! This worked for me as well.
June 23, 2016 at 12:15 am #13620Suryadiputra LiawatimenaParticipantDear all,
My existing resolv.conf symlink into /var/run/resolv.conf
ls -la resolv.conf
lrwxrwxrwx 1 admin root 20 Jun 1 21:39 resolv.conf -> /var/run/resolv.confInstruction number 4: create new symlink, the question is: where is the new symlink target?
Thank you very much.
Warmest Regards,
SuryadiJune 23, 2016 at 8:25 am #13623Bryan TranModeratorHi Suryadi,
You only need to modify your /etc/network/interfaces file by adding the following line:
#Wired interface
auto eth0
….
ipaddress 192.168.2.1
netmask 255.255.255.0
gateway 192.168.2.254
post-up echo “nameserver 8.8.8.8” > /etc/resolv.conf <– Add this line – Setup to obtain a persistent DNS config on the Conduit.
…Thanks,
BT
-
AuthorPosts
- You must be logged in to reply to this topic.