How to completely reset ubuntu networking settings? [duplicate]
I would like to reset my network settings and services entirely as if starting from scratch. I had recently installed Ubuntu a few days ago, and deleted a important boot file. After installing Ubuntu again, my network was not auto configured like my previous install. And my network did not work. Then I think I messed up the network settings too much in attempting to fix it, and now I would like to completely reset network settings. My system is an old HP Pavilion dv8 running Ubuntu 14.04 and Windows 8.1 dual boot.
I found a good command which has helped me to fix my problems.
sudo iptables -F
It reset my network settings and my network started to work. I hope this would help someone who had a similar problem.
Source:- Ask Ubuntu
Try this:
sudo nano /etc/network/interfaces
Enter:
auto eth0
iface eth0 inet dhcp
eth0
is assuming that you are using an Ethernet labeled "eth0". You can confirm that with ifconfig
.
The -r flag explicitly releases the current lease...
$ sudo dhclient -r
Now obtain fresh IP address using DHCP on Linux:
$ sudo dhclient