5 Replies Latest reply on Jul 9, 2013 12:29 PM by ianblackburn

    Get ( SystemIPAddress) only returning LAN IP, not WAN IP


      I'm trying to create a log of users connecting from outside the office LAN, but Get(SystemIPAddress) is only returning the LAN IP assigned to them by the remote network's DHCP server. According to the help entry for Get(SystemIPAddress), the function is supposed to return both LAN & WAN addresses, separated by a carriage return.


      For example, here's the entry for Joe Blow in my FM solution:

      7/9/2013 11:16:46 AM Joe Blow (an internal private IP)

      ...and that's the only data in that field. There's no other CR-separated value.


      Here's how he shows up in the server admin console:

      Joe Blow fmapp 69.64.x.x (public IP belonging to an ISP in another state)


      That's the data I want to capture. Can anyone think of why Get(SystemIPAddress) is only returning the LAN IP? Clearly, the server admin console knows where the connection's coming from.




        • 1. Re: Get ( SystemIPAddress) only returning LAN IP, not WAN IP

          FileMaker's help entry for Get ( SystemIPAddress ) does not say that it returns both LAN and WAN IP addresses. Get ( SystemIPAddress ) returns the LAN IP address for each active network connection on the client machine, including wired Ethernet, WiFi, Bluetooth, and VPN connections.


          If you need the WAN IP address of a client machine, one possible solution is to load a web page like whatsmyip.org in a web viewer and scrape the contents after it loads.

          1 of 1 people found this helpful
          • 2. Re: Get ( SystemIPAddress) only returning LAN IP, not WAN IP

            I must've misunderstood. Thanks for the clarification.


            I think I might just make a shell script that copies /Library/FileMaker Server/Logs/Access.log every couple of days or so.

            • 3. Re: Get ( SystemIPAddress) only returning LAN IP, not WAN IP

              Ian --


              Basically, what with everyone being on various internal networks that eventually connect to the internet, you can't easily get the kind of information you want.


              I track users with an IP address for one client, and I get all kinds of private IP addresses from Class A (10.x.x.x), Class B (192.168.x.x), and class C (172.16.31.x-172.16.32.x); sometimes a couple of IPs per person.  The only clients that report a public IP are those on Instant Web Publishing connections but that turns out to be the public IP of the FMServer itself, so not very helpful.


              So, you might have to study a bit about networks and also look into the way in which your users are getting to the system in the first place.  Are they using VPN connections?  Is your FMServer on a public IP, did you route FM traffic from a public IP to a private IP?


              Depending on these factors, you might be able to determine a flag for in-office vs. external connections, but it won't be as easy as "everything that has a non-routable IP must be in-office".  I can see a way where 10.1.0.x means "in-house, wired', 192.168.1.x means "in-house, wireless", 10.1.1.x means "branch office A, wired", etc. etc  One 'trick' is to set up the main in-office network on an subnet that is not as likely to be the same as what every other router/ISP out there is already using.



              Drew Tenenholz

              1 of 1 people found this helpful
              • 4. Re: Get ( SystemIPAddress) only returning LAN IP, not WAN IP

                In our solutions we simply query a script on our website. So we know our website is reachable and we get the IP back from there.



                • 5. Re: Get ( SystemIPAddress) only returning LAN IP, not WAN IP

                  Excellent advice (just copied that to a text file in case something happens to the forum posts in the future).


                  All I'm trying to do at the moment is generate a basic daily report of which of my users are logging in from where - I'm not trying to branch a startup script depending on whether they're local or remote. That may come in the near future, though, in which case I'll use your suggestion of changing the office LAN to a non-typical subnet. That should do the trick fine.


                  For the moment, I think it'll work okay to set up a simple FM file on a robot machine to import the server's access.log file at a set interval.