Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Querying WAN address

    General pfSense Questions
    5
    7
    960
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      coatmaker618
      last edited by

      Is there a way to query a pfSense box for the WAN IP from the LAN side (ideally a separate machine)?

      Obviously I can do this manually by logging in to the pfSense web GUI & and seeing the WAN IP on the homepage…but I'd like some method to do this automatically.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • W
        wkn
        last edited by

        Call http://checkip.dyndns.org:8245 and parse the incoming HTML for the IP-Address.

        Same way as pfSense will query the IP for Dynamic DNS updates.

        1 Reply Last reply Reply Quote 0
        • K
          kpa
          last edited by

          I always thought SNMP was designed to gather and monitor such information.

          1 Reply Last reply Reply Quote 0
          • C
            coatmaker618
            last edited by

            @wkn:

            Call http://checkip.dyndns.org:8245 and parse the incoming HTML for the IP-Address.

            Same way as pfSense will query the IP for Dynamic DNS updates.

            wkn apologies for not making my intention clear but I am specifically trying not to rely on an external/3rd party services, just on the pfsense box itself which can already show me the information I require through the web GUI.

            1 Reply Last reply Reply Quote 0
            • C
              coatmaker618
              last edited by

              @kpa:

              I always thought SNMP was designed to gather and monitor such information.

              Could very well be, but I'm not all that familiar with SNMP.  Any pointers to get started beyond RTFM or just keep digging around on SNMP in PFsense?

              1 Reply Last reply Reply Quote 0
              • H
                heper
                last edited by

                enable the snmp service on pfsense.

                then use an snmp-client to check if the wan ip is among the listed variables

                1 Reply Last reply Reply Quote 0
                • G
                  gjaltemba
                  last edited by

                  Have you tried?

                  ifconfig eth1 | grep 'inet'

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.