Show your public IP address

Read-only
What do risk levels mean?
Read-only
Inspects state without changing anything.
Low risk
Reversible with a routine follow-up command.
Medium risk
Changes state; undo path documented.
Destructive
Deletes or overwrites; confirmation required.

Prints the public IP address this machine appears as on the internet, useful for configuring firewall allowlists or debugging NAT and VPN setups.

networkippublicnat

Commands

Ask a public echo service which IPv4 address the request arrived from

curl -4 -s https://ifconfig.me

Verification

curl -4 -s https://ifconfig.me

A single public IPv4 address is printed.

Undo

Not undoable

This recipe only reads your public address and changes nothing.

Pitfalls

  • Behind a VPN or corporate proxy this shows the VPN or proxy egress address, not your ISP-assigned one.
  • Drop the -4 flag to see your public IPv6 address instead, if your network has one.
  • The result depends on a third-party service being reachable; icanhazip.com and api.ipify.org are equivalent fallbacks.
  • On Windows PowerShell, use curl.exe as shown (and in the verification command) — bare "curl" is an alias for Invoke-WebRequest and does not accept these flags.

Related