Valhalla Legends Archive

General => General Discussion => Topic started by: Stealth on June 11, 2004, 10:02 PM

Title: The question of whether you can connect to yourself with something other than localhost
Post by: 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.
Title: Re:Winsock not connecting... :(
Post by: Grok on June 11, 2004, 10:22 PM
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.
Title: Re:Winsock not connecting... :(
Post by: 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?
Title: Re:Winsock not connecting... :(
Post by: Adron on June 12, 2004, 01:03 PM
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.
Title: Re:Winsock not connecting... :(
Post by: Tuberload on June 12, 2004, 01:42 PM
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.  :)
Title: Re:The question of whether you can connect to yourself with something other than
Post by: 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).
Title: Re:The question of whether you can connect to yourself with something other than
Post by: Adron on June 12, 2004, 05:21 PM
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.
Title: Re:The question of whether you can connect to yourself with something other than
Post by: R.a.B.B.i.T on June 16, 2004, 12:43 AM
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..