echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`
- Press the Windows key.
- Type Notepad in the search field.
- In the search results, right-click Notepad and select Run as administrator.
- From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts
- Make the necessary changes to the file.
- Click File > Save to save your changes.
- Click Start > All Programs > Accessories.
- Right-click Notepad and select Run as administrator.
- Click Continue on the Windows needs your permission UAC window.
- When Notepad opens, click File > Open.
- In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
- Click Open.
- Make the necessary changes to the file.
- Click File > Save to save your changes.
- Click Start > All Programs > Accessories > Notepad.
- Click File > Open.
- In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
- Click Open.
- Make the necessary changes to the file.
- Click File > Save to save your changes.
It doesn't seem like any of the comments here are relevant anyway, 90% of them are actually about Windows filesystem (although the people talking about it probably don't know they are talking about it). Ironically the reason some people are having trouble editing their hosts files is because it can be a really bad idea to edit the hosts file if you don't know what you are doing, so Windows makes it very difficult to do on purpose.
(aside: Hosts File Editor is a pretty nice little utility to do this, and it has some neat features like pinging endpoints for verification, "hot swapping" hosts files, and enabling/disabling them from the system tray)
But In Response to Your Issue
It sounds like you are trying to register for some service that wants you to provide a URL in order to get an access token. I think Twilio does things like this, as do some email marketing services. If I understand correctly, you will not be able to do this using your local machine as a redirect, because the service will want a publicly facing URL, probably for verification. The IP address 127.0.0.1 is a loopback address (as is any IP address beginning with 127.), so it is only accessible from the machine itself by design.