Trash Talk - Setting 128.0.0.1 as Localhost Reznok - Fri Feb 27, 2009 8:53 pm Post subject: Setting 128.0.0.1 as Localhost
Alright, pretty simple question I think, using UNIX, is it possible to make
128.0.0.1 = localhost
instead of 127.0.0.1?
Samapico - Sun Mar 01, 2009 1:16 am Post subject:
First thing to come to my mind would be:
Why the hell would you want to do that? Dr Brain - Sun Mar 01, 2009 9:30 am Post subject:
The 128 class A is actually a part of the Internet. I mean you could always modify your kernel source, but that's a bad idea. There's no good reason to change the loopback address.
Bak - Sun Mar 01, 2009 2:41 pm Post subject:
yeah some ip addresses are reserved for special purposes. So like 127.0.0.1 is never an internet address, whereas 128.0.0.1 can be
Cheese - Sun Mar 01, 2009 3:37 pm Post subject:
although i was curious if modifying the HOSTS file in windows would be successful in this
JoWie - Sun Mar 01, 2009 5:51 pm Post subject:
Why not use 127.0.0.2 if you want to use a different address?
The whole 127 range should loopback:
127.0.0.1 up to 127.255.255.255 (exclusive)
You can modify the IP the hostname "localhost" points to, you should also be able to define multiple localhosts, such as "something.localhost".
(The whole .localhost TLD is reserved for this purpose)
In windows you can do this by modifying "%SystemRoot%\system32\drivers\etc\hosts"
In UNIX, this would probably be "/etc/hosts"
Reznok - Sat Mar 07, 2009 7:26 pm Post subject:
Thanks for the help.
The reason for doing it was a slight debate between me and one of my teachers. He was arguing that 128.0.0.1 could be made the localhost (though at first he was saying that IS localhost), and I really didn't believe him.
xD
Mine GO BOOM - Mon Mar 09, 2009 12:07 pm Post subject:
On Linux, can use ifconfig on lo to switch it to 128.0.0.1. If it doesn't route correctly, use route to add a new route so 128.0.0.0/255.0.0.0 routes to lo.
You can do it, but then you would not reach a while block of the internet, as 128.0.0.0/8 is administered by ARIN.