IP address question

Community Forums/General Help/IP address question

JoshK(Posted 2010) [#1]
Can you connect to your own machine using the same IP address other people would use, or do you always have to use "127.0.0.1"?


skidracer(Posted 2010) [#2]
Ping yourself. I can but I have configured several options on my adsl modem to enable this.

My modem was helpfully configured so anyone on the net could reconfigure it's settings with a little research, I would hope that is not standard.


ziggy(Posted 2010) [#3]
The IP other people would use depends on other people location. If their outside your local network, they should use your modem public IP to connect to you, and the connection port has to be forwarded to your computer inside your local network router configuration (supposing your computer is acting like 'the server').

In the other hand, if the 'other people' is inside your local network, they can use your local IP (usually starting by 192.0.0.xxx)

There are several ways to get the public (internet) IP of a computer connected to the internet using a Router. One of the easiest ones is to make the program download a PHP document from the internet using http, given that the dynamic PHP document writes the IP of the machine requesting it (like a what's my IP internet service). It should be very easy to do. The real problem here usually is getting non-blocked ports etc to translate this to a real working connection.

Serious net services, deal with this having a public server (or several servers) with a real direct internet connection you can talk to. Like a http or smtp server. You can connect to it using DNS to make things a lot easier to the client user.

EDIT: I misunderstood your question. The answer is YES as long as you are using properly forwarded ports in your router NAT configuration.


Htbaa(Posted 2010) [#4]
@ziggy: 127.0.0.1 is always localhost and thus always points to yourself.


ziggy(Posted 2010) [#5]
@Htbaa: Thanks, edited!


Htbaa(Posted 2010) [#6]
And to answer the question asked by Josh. It depends on your network configuration. At work we can't connect to our world-wide IP-address from the inside. But at home, last time I checked, I could access my world-wide IP-address from the inside.

Might be wrong though.


Dreamora(Posted 2010) [#7]
In nearly all cases you can not access your own machine, commonly not even your own LAN with the public ip.

For redirect to own machine you should use 127.0.0.1 (not localhost, localhost is not granted to work on Vista+ depending on the security and security software)

Within your local lan, use the local lan ip.


JoshK(Posted 2010) [#8]
It works. I can use the global IP and join my own games.


Czar Flavius(Posted 2010) [#9]
Hurray! You can join your own games, no need to have friends now :D
Joke :P


ziggy(Posted 2010) [#10]
@Leadwerks: May I ask wich port/ports are you using, and if there are several computer in the same local network? (just curious as I'm also writting a net based app)


*(Posted 2010) [#11]
Yeah you can use the global Internet address that others use and this is a good way to test how well a game would connect to your server mainly because it has to go to your ISP then connect to your server, so instead of quick connecting via 127.0.0.1 which will be super fast it a good practice :)


Digital Anime(Posted 2010) [#12]
Not all modems support it tho... I had problems with it after installing a TrackMania Nations server and wanted to log in through the internet.

I had to replace my Orange/Wanadoo modem by a Speedtouch xDSL modem wich had the NAT Loopback function.

When I entered the external IP in my webbrowser on my old modem I got the configurationscreen of the modem. So if you get that you need to activate NAT Loopback or buy a modem wich has that function.


JoshK(Posted 2010) [#13]
The only reason you would really need this is for testing.


Retimer(Posted 2010) [#14]
Nothing difficult if you're on your own station, and have access to your router to access yourself through your public or even private router ip.

Biggest thing is port forwarding to the correct machine though.