When I first installed Ubuntu, all networking worked perfectly. After messing with the settings every so often, it slowly became unusable. I would really like to know if there is a way to completely reset network settings without re-installing Ubuntu, DNS settings, proxy settings, everything. I'm running 12.04.
You can flush your iptables which firestarter has changed with
sudo iptables -F
Source: Post on Ubuntu forums
It depends what sort of connection you have and whether you have had to manually tweak some settings for it, as sometimes you need to do in the case of a wireless connection.
If you have a wired connection and have simply been altering the settings with Network Manager, you can unplug your Ethernet cable, go into Network Manager and delete all the wired connections (eth0, autoethernet, etc) and then reboot. This has worked for me before. On restart, your wired network will be detected and automatically configured with DHCP to set up ip addresses and DNS settings. This assumes, however, you have a dynamic ip address: you will still have to specify some settings manually if not.
If you have manually altered any settings such as disabling DNSmasq or manually specifying nameservers by creating a fixed
resolv.conf, or even changing firewall settings, then you will need to reverse these first and then remove your connections from network manager and reboot.
If none of these approaches are successful, you may need to login to your router and check the settings there.