• Welcome to Valhalla Legends Archive.
 

The question of whether you can connect to yourself with something other than localhost

Started by Stealth, June 11, 2004, 10:02 PM

Previous topic - Next topic

Stealth

You can't connect to your own computer without either using 127.0.0.1 (in which case the net effect will be identical to your bouncing it off another computer) or routing through a proxy and then back to your machine.
- Stealth
Author of StealthBot

Grok

Quote from: Stealth on June 11, 2004, 10:02 PM
You can't connect to your own computer without either using 127.0.0.1 (in which case the net effect will be identical to your bouncing it off another computer) or routing through a proxy and then back to your machine.

Untrue.

Stealth

Really? You can connect to your own IP address without bouncing it off another computer, and not using localhost?
- Stealth
Author of StealthBot

Adron

Quote from: Stealth on June 12, 2004, 12:59 PM
Really? You can connect to your own IP address without bouncing it off another computer, and not using localhost?

At least you can in the operating systems I know.

Tuberload

Quote from: Stealth on June 12, 2004, 12:59 PM
Really? You can connect to your own IP address without bouncing it off another computer, and not using localhost?

I run an Apache HTTPD from my computer for development purposes and I connect directly to my IP address all the time. All an IP address is really is an address to a location. It's like you leaving your backdoor and going to you front door because your address was your destination.  :)
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Yoni

If you're behind a router than you might not be able to do it.

I'm behind a router, and I can connect to myself through 127.0.0.1 and through 10.0.0.2 (LAN IP), but not through the external IP address, even though the port forwarding is set up (possibly due to a router bug? I also can't tracert, so I suspect this is the case).

Adron

Quote from: Yoni on June 12, 2004, 04:55 PM
If you're behind a router than you might not be able to do it.

I'm behind a router, and I can connect to myself through 127.0.0.1 and through 10.0.0.2 (LAN IP), but not through the external IP address, even though the port forwarding is set up (possibly due to a router bug? I also can't tracert, so I suspect this is the case).

That's somewhat different. It has to do with the nat functionality in the router. I'm pretty sure if the router has some internal web interface it listens to, that you could connect to that on the external ip as well as the internal, but you're probably not able to connect to an external ip that is forwarded to an internal ip.

Something that might happen:

syn 10.0.0.2:1026 -> externalip:80 hits router
router maps externalip to 10.0.0.2, now syn 10.0.0.2:1026 -> 10.0.0.2:80
your computer responds with syn-ack 10.0.0.2:80 -> 10.0.0.2:1026
your computer receives a syn-ack it doesn't expect, from some computer called "10.0.0.2:80" when it was trying to speak to a computer called "externalip:80".

Depending on the router, the packets might just be dropped right away.

R.a.B.B.i.T

I've connected to my own internal IP (with the router), and my normal IP back before I had the router, but I can't seem to connect to my router in a way that will forward the connection back to me..interesting..