10 Replies Latest reply on Dec 25, 2011 7:46 AM by jormond

    Remote user vs internal

    paulspafford

      I need to be able to tell the difference between people who are using a database from inside an office, vs the users accessing it from the outside world. The same user could be doing either.

       

      I'm thinking I could use Get ( HostIPAddress ), and test it to see if the first seven characters are "192.168". Is there any reason why that wouldn't provide a consistent result?

       

      Thanks,

      Paul

       

       

      --

      Paul Spafford

      FileMaker Database Superhero,

      Spafford Data Solutions

       

       

      Tel: 613 838 9956

      www.paulspafford.com

      www.ottawafilemakerdeveloper.com

      www.fmlayoutmode.com

      www.fmscripts.com

       

       

      FileMaker User Group in Ottawa:

      www.meetup.com/fudgeo

        • 1. Re: Remote user vs internal
          datastride

          Paul,

           

          I think the function you’re looking for is Get( SystetemIPAddress ) … and not Get( HostIPAddress).

           

          But I would urge you to read the online help description for Get( SystemIPAddress) carefully, as with the coming change to IPV6-style address, the world of IP addresses I about to change. Also note how the results are affected by the presence of multiple connections (multiple NICs, wireless adapter, Bluetooth adapter, etc.) on the client’s machine.

           

          Peace, love & brown rice,

          Morgan Jones

           

          FileMaker + Web:  Design, Develop & Deploy

          Certifications: FileMaker 9, 10 & 11

          One Part Harmony 

          Austin, Texas • USA

          512-422-0611

          • 2. Re: Remote user vs internal
            timwhisenant

            Hi Paul,

            I'm confused, would that not return the ip of the server???

            How about Get(SystemIPAddress)?? would that not give the user's IP?

            What about DHCP?? Would a server assigning dynamic IP's be an issue here?

             

             

            Merry Christmas & Happy New Year!

            Tim

            • 3. Re: Remote user vs internal
              timwhisenant

              Hi Morgan,

               

              IPV6 is quite a leap 128bit from 32bit and essentially no need for private addressing. How many private networks will use the fd addresses for security purposes do you think?

              For our company, however weak this is, likes the feeling that the world cannot see the "192.168" series. I would guess that a Length() could be applied to the Get(SystemIPAddress) and if it fits the pattern of an IPV4 then test for "192.168", else test Left($$IP; 2) = "fd".

               

              Or Paul is there another way with the login ( guess based on network response time)? Just an idea.

               

              Tim

              • 4. Re: Remote user vs internal
                RubenVanDenBoogaard

                Hi Paul,

                 

                There is a CF by Hal Gumbert which does what you need!

                 

                http://www.briandunning.com/cf/819

                 

                Best regards,

                 

                Ruben van den Boogaard

                Infomatics Software

                ruben@infomatics.nl

                 

                 

                 

                 

                created by paulspafford in General - View the full discussion

                I need to be able to tell the difference between people who are using a database from inside an office, vs the users accessing it from the outside world. The same user could be doing either.

                 

                 

                I'm thinking I could use Get ( HostIPAddress ), and test it to see if the first seven characters are "192.168". Is there any reason why that wouldn't provide a consistent result?

                 

                 

                Thanks,

                 

                Paul

                 

                 

                 

                --

                 

                Paul Spafford

                 

                FileMaker Database Superhero,

                 

                Spafford Data Solutions

                 

                 

                 

                Tel: 613 838 9956

                 

                www.paulspafford.com

                 

                www.ottawafilemakerdeveloper.com

                 

                www.fmlayoutmode.com

                 

                www.fmscripts.com

                 

                 

                 

                FileMaker User Group in Ottawa:

                 

                www.meetup.com/fudgeo

                 

                Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

                Start a new discussion in General by email or at FileMaker Technical Network

                Manage your email preferences.

                 

                FileMaker Developer Conference 2012 • Miami, Florida • July 16-18 • www.filemaker.com/devcon

                 

                • 5. Re: Remote user vs internal
                  datastride

                  Just FYI … This custom function would work for you now, but would not handle IPV6 addresses. So just keep that in mind for when the time comes …

                   

                  Peace, love & brown rice,

                  Morgan Jones

                   

                  FileMaker + Web:  Design, Develop & Deploy

                  Certifications: FileMaker 9, 10 & 11

                  One Part Harmony 

                  Austin, Texas • USA

                  512-422-0611

                  • 6. Re: Remote user vs internal
                    Stephen Huston

                    Any idea when those of use with old IP tests will need to upgrade to deal with this?

                     

                         > with the coming change to IPV6-style address, the world of IP addresses I about to change.

                     

                    I inherited a huge system which has some IP tests embedded in the file "on open" scripts; they're still working, but I would take any info on when they may fail as helpful.

                     

                    Stephen Huston

                    • 7. Re: Remote user vs internal
                      paulspafford

                      Hey Morgan,

                       

                      Nope, Get ( SystemIPAddress ) doesn't help me if they're behind a router in whatever remote location they're in. I want to know how they're seeing the host's IP address. If they're inside the office, I'm assuming they'll be seeing the host as a 192.168…. If they're in the outside world, they would see the external IP.

                       

                      Or that's what I'm asking anyhow. If they're inside the office, would they ALWAYS see the server's internal IP address?

                       

                       

                       

                      --

                      Paul Spafford

                      FileMaker Database Superhero,

                      Spafford Data Solutions

                       

                      Tel: 613 838 9956

                      www.paulspafford.com

                      www.ottawafilemakerdeveloper.com

                      www.fmlayoutmode.com

                      www.fmscripts.com

                       

                      FileMaker User Group in Ottawa:

                      www.meetup.com/fudgeo

                      • 8. Re: Remote user vs internal
                        paulspafford

                        Hey Tim,

                         

                        I'm hoping that if they see the host IP as a 192.168.etc., I can assume they are inside the office. I'm wondering if there is any instance where that would fail. Mostly, I want to make sure that if the host IP is NOT 192.168.etc. that I can assume they're outside.

                         

                        Thanks,

                        Paul

                         

                         

                         

                        --

                        Paul Spafford

                        FileMaker Database Superhero,

                        Spafford Data Solutions

                         

                        Tel: 613 838 9956

                        www.paulspafford.com

                        www.ottawafilemakerdeveloper.com

                        www.fmlayoutmode.com

                        www.fmscripts.com

                         

                        FileMaker User Group in Ottawa:

                        www.meetup.com/fudgeo

                        • 9. Re: Remote user vs internal
                          paulspafford

                          Thanks, Ruben. It looks like Hal is making exactly the assumption I'm asking about.

                           

                          Paul

                           

                           

                           

                          --

                          Paul Spafford

                          FileMaker Database Superhero,

                          Spafford Data Solutions

                           

                          Tel: 613 838 9956

                          www.paulspafford.com

                          www.ottawafilemakerdeveloper.com

                          www.fmlayoutmode.com

                          www.fmscripts.com

                           

                          FileMaker User Group in Ottawa:

                          www.meetup.com/fudgeo

                          • 10. Re: Remote user vs internal
                            jormond

                            From some limited testing I've done specific to our setup in our office...it will only fail if, as Hal mentions, they are using a VPN.  In the end we settled on filtering for the MAC address (actually a combination of MAC and IP).  Since we know which machines are running inside the office it was easy to determine it if was one of those machines or not.  You need to address situations where the user is on a laptop, either at home or the office.  But for us, the users with laptops are not using the VPN to log into the solution.

                             

                             

                            timwhisenant wrote:


                            IPV6 is quite a leap 128bit from 32bit and essentially no need for private addressing.

                            Hmmm...while there may be no "need" for private addressing...my understanding of it is that this is still a feature built into the IPV6 protocol.  It means we don't have to register/pay for use of the address set.  It will be interesting to see how this usage evolves over time.