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