Discover your public egress IP

How I use curl over IPv4 and IPv6 to check the public address visible to a service through NAT, proxies or VPNs.

Networknet command card for curl -4 and curl -6 ifconfig.io, with a pixel security operator and enterprise egress explanation.

Command and infographic terms

TERMINAL
Run curl from a shell or command line.
-4
Force an IPv4 connection.
-6
Force an IPv6 connection.
EGRESS IP
The Internet-facing address that the remote service observes.

When I troubleshoot connectivity in enterprise networks, I want to know which public address an external service actually sees.

curl -4 ifconfig.io

For IPv6, I use:

curl -6 ifconfig.io

Outbound traffic can pass through NAT gateways, proxy servers or VPN exit points. I compare the returned address across network segments and VPN sessions to see where my traffic leaves the network.

The result is the public address visible to ifconfig.io, not necessarily my workstation’s IP. It does not show the full route.