October 29th, 2002, 04:57 PM
localhost ip address
Im a little unsure about the localhost ip address. Why is it there and what is its purpose.
short and quick question today.
October 29th, 2002, 05:09 PM
Short and quick question and a short and quick answer .
127.0.0.1 (localhost) is the loopback address on a machine. It means a packet for that address is looped back to the same machine. It does not even come on the network. This is also one of the reserved IP addresses.
October 29th, 2002, 05:13 PM
Why is it necessary to have the loopback address though????
October 29th, 2002, 05:21 PM
The loopback address is used by the host to enable it to direct network traffic to itself. The purpose can be many and Im not skilled in programming and the possible use there.. But for example can I use the "loopback" adress to connect to services (ie http) in a more secure way then if I connected through the "wild wild west" known as your LAN or Internet. local services can also talk to each other the same way.
Im not that good in explaining but I will see if I can find a good piece of paper for you .
October 29th, 2002, 05:25 PM
...Plus, when trying out your webserver or whatever, wouldn't it be easier to type 127.0.0.1 instead of doing 68.blah.453.blah? It would be easier for admin's and it is used even more for ftp services, http services, etc. Like miceal said, it's hard to explain.
October 29th, 2002, 05:47 PM
I am sorry soia. I can't find a really good document since there are to many of them and its a bit to wide subject, seems like your short question has a long answer .
If you really want to dig into this then my advice is to use a RFC search engine or do a search with google and continue from there.
October 29th, 2002, 05:52 PM
Will do. ill check out some rfc's and google to try and find things. If you find anything put up a post.
October 29th, 2002, 06:14 PM
If memory serves, the loopback address is actually part of the IP version 4 standard. In that standard certain addresses are set aside for special purposes (other examples are 184.108.40.206 for multicasting, 10.0.0.0, 192.168.0.0 as private networks, etc). I am not exactly sure if it was the original intent (i assume it was), but the loopback is used if you want to access a service from your computer but you wouldn't necessarily want anyone else to connect to the service (one of the more common examples would be the rpc daemon (at least my version of unix, X windows uses rpc queries to the daemon listening on localhost to do some calls for X, RPC meaning remote procedure call)). Another example of why maybe you would want to do this, maybe you are developing a web page that isn't fully tested or fully functional...do you really want people from the outside to access it yet? Probably not...the answer would be to bind to the loopback address..you could then test it from the server itself and you wouldn't have to worry about any external people accessing it (another user on the same server would be a different story).
Hope that helps at least set you on the right track.
EDIT: Force9's post also reminded me of something else that I found amusing. When Alldas.de was Dos/DDos'd off of the net, they updated the DNS records to resolve the hostname to 127.0.0.1. I hope it is obvious what would happen if someone tried to attack that address But that is also a reason why you might want to use the loopback.
There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.
(Merovingian - Matrix Reloaded)
October 29th, 2002, 06:38 PM
I keep Banner ads from my browser by looping back all known banner ad web sites to 220.127.116.11
Example Win2000 Hosts file Entry
The File is huge and still growing
# 247Media (Sabela)
October 29th, 2002, 09:56 PM
Just out of curiosity, If I was to do that with my host file but instead of putting 127.0.0.1 and putting an IP address of a friend or something would that make all the ads go to that address? Just made me think if it would do something or no.