Last adaption: 09.2023
- Generally updated
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)
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
- HTTP_X_FORWARDED_FOR → HTTP_X_FORWARDED → HTTP_X_CLUSTER_CLIENT_IP → HTTP_FORWARDED_FOR → HTTP_FORWARDED
- Source IP detected by the server:
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.
In general, a manual or cronjob controlled restart of the Dyndns client is then sufficient.
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>