IP Address
Purpose
Quickly show the public IP address and related diagnostics as seen by the server and the clientβs browser. This tool combines a server-side endpoint (what the server sees for the request), a Cloudflare trace (public metadata), and browser local-network hints to help diagnose CDN, firewall, proxy, and connectivity issues. No data is stored unless you opt in.
π§ What this feature shows
Server-side view β server time,
REMOTE_ADDR,X-Forwarded-For,CF-Connecting-IPand other headers the server receives for your request.Cloudflare trace (client) β parsed
/cdn-cgi/traceresponse when fetched from the browser (public IP, colo, TLS, timestamp, etc.).Cloudflare trace (server) β optionally fetchable from the server to compare what Cloudflare sees for server-side requests.
Local network (browser) β
navigator.connectionvalues (effectiveType,downlink,rtt) and full user agent.Local LAN discovery β best-effort WebRTC trick to reveal local LAN IPs (modern browsers may return mDNS names or block this for privacy).
Live refresh β buttons to refresh server view and Cloudflare client trace without a full page reload.
π₯ Who should use this
Developers debugging reverse-proxy / CDN / header / geo-routing issues.
Support staff investigating client vs server differences (e.g., CDN sending different IP or missing
X-Forwarded-For).Network administrators validating client connectivity and local network characteristics.
Shop owners who want to confirm the public IP and basic network diagnostics before sharing with support.
βοΈ How it works (high level)
Server endpoint β the UI calls a server route (e.g.,
shopadmin.iptracker.server) which returns JSON of server-observed fields (time, remote addr, headers).Client Cloudflare probe β the browser attempts to GET
https://www.cloudflare.com/cdn-cgi/traceto collect public IP and Cloudflare metadata; if blocked, the UI suggests fetching server-side Cloudflare trace instead.Local network hints β
navigator.connection(where supported) provides browser-reported network parameters; the UA and platform are displayed.Local IP discovery β a WebRTC-based peer connection is created to surface ICE candidates; extracted IPv4/IPv6 addresses are shown if the browser permits them.
Compare & triage β operators compare server-side and client-side results to identify proxies, header mismatches, CDN behaviour, or NAT issues.
πͺ How to use β step-by-step
Open Dashboard β IP Tracker for the shop.
Observe the Server-side block β server time and headers will be populated automatically.
Click Refresh to re-query what the server currently sees (useful behind load balancers or after config changes).
Click Fetch Cloudflare (server) if the client-side Cloudflare trace is blocked β the server will attempt to fetch
/cdn-cgi/traceand return it.Click Refresh under Cloudflare Trace (client) to attempt a browser fetch of Cloudflare data.
Click Discover local IPs to run the WebRTC discovery (best-effort).
Share the results (copy/paste) with your developer or CDN provider when troubleshooting.
π How to interpret results
Client IP vs REMOTE_ADDR β If
REMOTE_ADDRdiffers from the client IP orX-Forwarded-For, check your proxy/load-balancer configuration and ensure correct forwarding of headers.CF-Connecting-IP β When Cloudflare is in front,
CF-Connecting-IPshould show the original client IP as seen by Cloudflare. If missing, verify Cloudflare settings and upstream header passthrough.Cloudflare trace fields β
ip,colo(datacenter),http, andtlshelp correlate geographic and transport behaviours.Navigator hints β
effectiveType,downlink, andrttare approximate and may help explain slow or unstable connections but are not authoritative.Local IP discovery β reveals LAN addresses (NAT/private RFC1918) if the browser allows; absence may mean the browser hides these for privacy.
β
Recommended actions (prioritised)
Header mismatch β if the server sees the proxy IP instead of client IP, enable/verify trusted proxy configuration and forwarding of
X-Forwarded-For. In Laravel, configureTrustedProxyorApp\Http\Middleware\TrustProxies.Cloudflare discrepancies β if Cloudflare trace on client differs from server, verify whether Cloudflare is proxying the server endpoint or if the server is behind a different CDN/proxy. Use the server-side Cloudflare fetch to compare.
CORS / blocked client trace β if client-side
/cdn-cgi/traceis blocked, use the server-side fetch and compare results. Consider sharing both with CDN support.Local network issues β if
effectiveTypeshows2g/3gunexpectedly, test connectivity and router configuration. Use the Internet Speed Test tool for quantitative measurements.Privacy-aware browsers β modern browsers may block or obfuscate local IPs (mDNS). Do not rely solely on WebRTC discovery for LAN IPs.
π€ Exporting & reporting
The UI is lightweight and intended for interactive diagnostics. Copy results from the page (or take a screenshot) to include in support tickets.
If you want persistent logs, implement an opt-in server endpoint that accepts the server/client payload and stores it with a timestamp and operator note (be mindful of privacy and obtain consent).
π Privacy & safety notes
The feature deliberately does not store data by default. It only displays what the server and client already expose.
Cloudflare trace reveals the public IP address β treat it as operational data and avoid posting publicly without reason.
The WebRTC local-IP discovery may reveal private LAN addresses; do not collect or share these without consent. If you implement server-side logging, require explicit opt-in and retain for the minimal duration necessary.
π§© Troubleshooting & FAQs
Q: CF-Connecting-IP is empty but Cloudflare is enabled.
A: Ensure your origin server receives Cloudflareβs headers (check firewall rules or reverse proxy that might strip headers). Also confirm the request actually passed through Cloudflare (e.g., hostname proxied).
Q: Client Cloudflare trace fetch fails with CORS or network error. A: Some browsers or network policies block cross-origin calls; use βFetch Cloudflare (server)β which fetches from the server side and returns the trace text.
Q: X-Forwarded-For contains multiple IPs β which is the client?
A: The left-most (first) IP is typically the original client; subsequent entries are proxies the request passed through. Confirm your proxy chain & trusted proxy configuration.
Q: Local IP discovery shows mDNS names or no IPs. A: Modern browsers return mDNS hostnames or block direct local IP exposure for privacy. This is expected behaviour in many up-to-date browsers.
Q: Can this be logged automatically for audits? A: Yes β add an opt-in backend endpoint to capture snapshots. If you need that, implement secure auth, explicit consent, and data retention controls.
β
Quick checklist
Last updated