Jump to:navigation, search
Wiki




























{#vardefine:headerIcon|spicon-spdyn}}


De.png
En.png
Fr.png






Determine your own public IP address
Last adaption: 09.2023
New:
  • Generally updated
notempty
This article refers to a Resellerpreview

2016



How do I determine my public IP?

  • If the Internet connection is both IPv4 and IPv6 ("dual stack"), it is recommended to use
    • checkip4.spdyn.de (has only an A-record, so it cannot be reached via IPv6) or
    • checkip6.spdyn.de (has only one AAAA record and therefore does not respond to IPv4 requests)
  • The checkip hosts respond only to plaintext HTTP requests on port 80

  • Output as plain text

    Default
    Die Ausgabe der IP erfolgt entweder als Plaintext (das ist der Standard), JSON oder XML. The plaintext page always displays only the one IP address from which the connection to our server was established. 203.0.113.203


    Formatted output

    • JSON/XML output may show multiple IP addresses depending on whether the connection is through one or more proxies
    • The headers are evaluated in the following order (further up the list = higher priority):
      • Source IP detected by the server:
        • REMOTE_ADDR → HTTP_CLIENT_IP
      • Headers sent by the client:
        • HTTP_X_FORWARDED_FOR → HTTP_X_FORWARDED → HTTP_X_CLUSTER_CLIENT_IP → HTTP_FORWARDED_FOR → HTTP_FORWARDED
          The output can be checked e.g. with the command cURL:
          curl -w "\n" -H "CLIENT-IP: 192.168.175.175" -X GET http://checkip.spdyn.de/json
            
  • The Securepoint spDyn update server does not handle private IPv4 addresses
  • When attempting to update a hostname to point to a private IP, the update server will use the detected public IP (REMOTE_ADDR) of the client instead of the private address (HTTP_CLIENT_IP).

    This enables the use of our service even with clients that have no way to determine their public IP themselves before the update.

  • Even if an update from such a client works, this client probably does not "know" when its public IP changes and will not automatically update the host (e.g. after a 24h reconnect).
    In general, a manual or cronjob controlled restart of the Dyndns client is then sufficient.
  • Other headers sent by the client are ignored by the update server
  • Output as JSON object

    When calling http://checkip.spdyn.de/json, the IP addresses found are output according to the following scheme with the MIME type application/json:

    {
    	"ipinfo":[{
    		"ip":"2001:DB8::DB8",
    		"source":"REMOTE_ADDR"
    	},{
    		"ip":"203.0.113.203",
    		"source":"HTTP_X_FORWARDED_FOR"
    	}]
    }
    


    Output as XML

    When calling http://checkip.spdyn.de/xml, the IP addresses found are output according to the following scheme with the MIME type text/xml:

    <ipinfo>
        <ip ip="2001:DB8::DB8" source="REMOTE_ADDR"/>
        <ip ip="203.0.113.203" source="HTTP_X_FORWARDED_FOR"/>
    </ipinfo>