Some malware variants modify Internet browser settings by adding a Proxy Server. In these cases, you will be unable to visit any websites, and thus not able to download the required software to eliminate the security infections. Other types of malware change the computer's DNS settings or add various entries to your operating system's Hosts file. By altering these settings, computer viruses can cause redirect issues or completely block the Internet connection.
Follow me to Solve your Problem,
First of All this Step is optional but i Recommend doing it .
Step 1: Reboot into Safe mode with networking.( while the system is booting keep pressing F8 ).
After it boots Successfully , Press Start> In search box type cmd> Right click on cmd.exe
or / Press Run and type : cmd.exe
However you can still do this without Safe Mode but make sure you are running cmd as an administrator
Step 2:
Type in the following, followed by enter
netsh winsock reset
Enter
Restart PC
netsh winsock reset
Enter
Restart PC
Step 3 :
Open cmd once again
Type in the following, followed by enter for eachipconfig /flushdns
Enter
ipconfig /release
Enter
ipconfig /renew
Enter
Enter
ipconfig /release
Enter
ipconfig /renew
Enter
Step 4:
Test if the browser can now open browse the web , if no no matter what browser you use you have to open Internet Explorer
press on top and right click, choose menu bar.
press on tools ,choose Internet Options ,Choose Advanced press on Restore Advanced Settings then Press Reset .