If using Windows, you can edit the hosts file located in C:\Windows\System32\drivers\etc folder.
1. Run Notepad as administrator (rightclick on the notepad.exe and select Run as Administrator)
2. Navigate to C:\Windows\System32\drivers\etc and open the hosts file. If a box appears that says Always Open this File with Notepad, make sure it is NOT checked.
3. Edit or add the line as shown below:
Make sure you use the TAB key between the ip address and master.gamespy.com and not the spacebar.
4. Your hosts file should look like the attached file. Make sure you use the # to remark out old entries for master.gamespy.com.