0

So I was trying to fix this reverse DNS issue:

$ dig HOSTNAME.DOMAIN.com
1.2.3.4                  #example

$ dig -x 1.2.3.4
OTHERHOSTNAME.OTHERDOMAIN.com

I was blindly following online instructions to fix it:

In, /etc/hosts, I changed the first line

127.0.0.1 localhost

to

127.0.0.1 HOSTNAME.DOMAIN.com localhost.localdomain localhost

then I did:

sudo /sbin/dhclient -r

I believe by then I realized I no longer had internet connection, even though I was still connected to WiFi. I reverted the edit to /etc/hosts, without effect.

(I am posting from another computer, so first I would like to fix the internet connection on original computer).

Any ideas? Thanks

EDIT: @Alaa ali 's initial proposal didn't work for me, but he told me to restart my machine, which worked.

0

sudo /sbin/dhclient -r releases (-r) the IP address obtained from your DHCP server. That is what caused your connection to drop, since now your machine does not have an IP address to communicate to the network.

To fix this issue, you should simply request a new IP address. But first, we'll make sure that it is released by executing this command:

sudo /sbin/dhclient -r wlan0

Then to request a new one from your DHCP server, simply do:

sudo /sbin/dhclient wlan0

(Assuming that your wireless interface is called wlan0. If it isn't, take a look at the output of iwconfig and find out the name of the entry that has wireless information next to it).

That command should complete fairly quickly and you'll see that an IP address has been assigned to your interface. Now try browsing the internet.

  • The output was RTNETLINK answers: File exists. Still no internet connection. I think wlan0 was the right interface, since it had my WiFi SSID next to it. – onepiece Sep 6 '14 at 1:49
  • @onepiece Hmm, alright try sudo dhclient -r wlan0 then sudo dhclient wlan0. – Alaa Ali Sep 6 '14 at 1:52
  • Still no connection :(. Both commands finished without any output – onepiece Sep 6 '14 at 1:56
  • Let's take this to chat. – Alaa Ali Sep 6 '14 at 1:58

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.