1

I have a Laptop with debian jessie installed. At my home network, i could connect successfully to the internet (ping google.de successful). At the external network, i can't ping google.de (result: unknown host google.de), although i can ping 8.8.8.8 and 8.8.4.4 (those are the google public dns servers Source)

I assume, /etc/resolv.conf was configured to use a private DNS resolver(nameserver 255.0.0.0) at home, therefore it doesn't work at the external network. Changing that to nameserver 8.8.8.8 and 8.8.4.4 as suggested in 1 doesn't help, it is overwritten after the dhclient is run. chmod -w /etc/resolv.conf (it has now only read permissions) also doesn't help. It is still overwritten, when running dhclient.

I use ifup and ifdown and those legacy tools to connect.

my /etc/network/interfaces:

source /etc/network/interfaces.d/* allow-hotplug wlan0 auto wlan0 iface wlan0 inet dhcp wpa-ssid <...> wpa-psk <...>

Now my question:

You need to make sure DHCP (if in use) is configured correctly, and your local DHCP server (usually your cable / adsl modem) is handing out the right details.

How do i do that? I can't use that suggestion, because obviously i have no internet connection.

  • Did you use NetworkManager? which dhcpclient? – LilloX Nov 5 '15 at 11:55
  • i do not use NetworkManager (although i want to install in in the future). I use dhclient. – toogley Nov 5 '15 at 12:11
0

After you have setup your network device(s) with DHCP change the /etc/resolv.conf file manually, the file will only be overwritten when dhclient is restarted and not constantly. When you changed the /etc/resolv.conf file you should be able to perform hostname lookups and to be able to install the resolvconf package. After the package is installed you can follow the instructions in the referenced question debian, problem with DNS to finish your's.

  • That debian dns answer is wrong. you install resolvconfif you want /etc/resolv.conf to be automatically managed (by dhcp, pon, etc). You purge it if you want such things to leave your /etc/resolv.conf alone. – cas Nov 5 '15 at 12:14
  • @cas well, im not sure if i understood your answer. But dhclient obviously doesn't leave my /etc/resolv.conf alone, but when i follow the installation and configuration of resolvconf /etc/resolv.conf doesn't becomes replaced just completed with the private dns – toogley Nov 5 '15 at 12:28
1

You can enter in the configuration of the dhcp client (dhclient.conf) :

prepend domain-name-servers 8.8.8.8;

this should overwrite the information passed from the server DHCP

  • I haven't tried that possible solution, because the one suggested by @Lambert works perfectly. Anyways thanks :) – toogley Nov 5 '15 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.