• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: determining if connection is local
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determining if connection is local


  • Subject: Re: determining if connection is local
  • From: Chaz McGarvey <email@hidden>
  • Date: Thu, 25 Sep 2003 15:06:35 -0600

Hello:

On Thursday, September 25, 2003, at 03:43 AM, Quinn wrote:

I'm curious why you're checking for a local connection. If you're doing this for security reasons, you might be able to just check the source address of the connection against 127.0.0.1. This will identify normal connections to your port, that is, where the client has called connect without calling bind, or has bound to INET_ANY. It will give false negatives if the client has bound to a specific local IP address, but that's a somewhat bizarre thing to do and false negatives in a security context aren't bad.

I thought that the client, when connecting on the same machine as the server, would always identify itself as 127.0.0.1, but it also sometimes uses 0.0.0.0 and 192.168.0.3 (the IP I get from my router). Then I figured testing against one address (127.0.0.1) wasn't a good way to go about it, so I thought I would simply test every IP of the machine.

The reason I'm interesting in this is because I have a program which has its user interface and "get work done" interface separated by sockets because I also want to allow remote clients to connect and use a remote interface with the local "get work done" interface (and visa versa). I don't always want remote clients to connect to my local computer, but I always want my local user interface to be able to connect to my local "get work done" interface. So, yes, it's a matter of security. This is my first project that needs to be networked. I'm definitely new to security, so if what I'm trying to do doesn't sound secure or if you can tell I'm missing a networking concept, I'd like to know.

Thanks for your replies,
Chaz McGarvey
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: determining if connection is local
      • From: Quinn <email@hidden>
References: 
 >Re: determining if connection is local (From: Quinn <email@hidden>)

  • Prev by Date: Re: Apple-approved way to listen on well known ports?
  • Next by Date: Re: Apple-approved way to listen on well known ports?
  • Previous by thread: Re: determining if connection is local
  • Next by thread: Re: determining if connection is local
  • Index(es):
    • Date
    • Thread