ID:163902
 
I just can't seem to host. I could portforward if I knew which router is my router. But whenever I try to host, it always uses localhost instead of my IP address. Any ideas?
Armiris wrote:
I just can't seem to host. I could portforward if I knew which router is my router.

What do you mean by "which router is my router?" If you have a router, it is a piece of hardware that you have physically connected to your computer via a wire of some type that would likely be in your home. Unless you're connecting wirelessly through a router owned by one of your neighbors in their house.

Either way, if you are using one at all, the IP address to it is usually 192.168.0.1. Enter that into your browser, and, if it follows conventional home router standards, it should bring up information that you can change for it.

But whenever I try to host, it always uses localhost instead of my IP address. Any ideas?

It doesn't "use localhost instead of my IP address." When you are hosting, you can use any valid address to the port. That could be 127.0.0.1:xxxx to connect locally through localhost; or, if you are using a router, 192.168.0.xxx:xxxx to connect through your LAN; or, if you want to connect through the internet, whatever your IP address for the internet is.

For example, my LAN ip address assigned to the computer I am currently by my router is 192.168.0.21. If I were hosting on port 1000, I could connect through 127.0.0.1:1000 (connecting locally through your computer, not bothering with any networking at all), or 192.168.0.21:1000 to connect through my LAN, or 25.50.200.100:1000 (or whatever the IP address is, I just made that up since it could be almost anything) to connect through the internet.

If you're hosting, I'd have to connect via the internet. If someone else in my house using a different computer on my local network were hosting, I could connect either through the internet or through the LAN ip address. If I'm hosting it on my own computer, I can use any of the three addresses, local, LAN or internet. If you are hosting and want to connect via the internet, however, that is a bit silly; although you are hosting on your computer and connecting to that same computer, by putting in the IP address over the internet, you are sending a message out which ends up coming right back to you.

127.0.0.1 refers to the computer that references it because, with IP protocol, certain numbers are often reserved for special situations, with 127 being a loop-back number, and 1 often referring to the system that is processing network traffic. So, for example, on a network, the router that is routing the traffic gets the last byte of 1 (as in 192.168.0.1, which is the "default gateway" for the computer I am currently sitting at) because it is the system processing the network traffic. Your computer you are sitting at is likewise 127.0.0.1 since 127 loops back to itself.

Also, when I go to www.WhatIsMyIp.com, and it is currently telling me 24.59.219.255, that is not really my IP address, it is the address assigned to my router, since that is the system connected to the internet. My router doesn't say in its settings page, but the system it contacts directly on its first step into the internet very well may be 24.59.219.1.

Anyway, I hope that helps you understand network connections a bit better, enough at least to understand the general idea of getting from point A to point B. If you're not behind a local router, you should be fine, and other people connecting to your ip-address:port should be able to connect fine. If you are, then you have to forward a port to your computer, so just direct your browser to 192.168.0.1 and that should get you there. If it asks for a password and you don't know what it is, it's likely still default unless someone changed it. They usually default to a username of admin or password and password of blank (not the word blank, but just no password, so it's empty), password (yes, actually "password" for a password), or other simple things such as 1234. I think I've also seen where both the username and password were both admin and admin.

Once on the router's settings page, it might be listed under something other than "port forwarding", such as possibly "virtual server"