setting static DNS
- This topic has 4 replies, 2 voices, and was last updated 7 years, 3 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forums › Conduit: mLinux Model › setting static DNS
Hi, I’m not able to set a static DNS for the Conduit eth0 interface. How can I do it?
The following is my interfaces configuration:
auto eth0
iface eth0 inet static
address 192.168.2.111
netmask 255.255.255.0
gateway 192.168.2.1
Nicola,
You should be able to specify the DNS nameservers in /etc/network/interfaces like so:
dns-nameservers 1.1.1.1 2.2.2.2
Jeff
I’m sorry but it doesn’t work. /etc/network/interfaces is:
auto eth0
iface eth0 inet static
address 192.168.2.111
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 8.8.8.8
this works:
root@mtcdt:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=47.3 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=46.5 ms
this not works:
root@mtcdt:~# ping google.com
ping: unknown host google.com
Nicola,
Have you tried putting a nameserver entry in /etc/resolv.conf?
Jeff
Perfect! I was missing this!
Now it works.
Thank you