[{"data":1,"prerenderedAt":1470},["ShallowReactive",2],{"content-index":3,"guide-en-find-your-public-ip-address-find-your-ip-address-on-mac":80,"guides-navigation-en":1375},{"en":4,"de":54,"es":67},{"paths":5,"docs":29},[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28],"\u002Fdocs\u002Fgetting-started","\u002Fdocs\u002Flinux","\u002Fdocs\u002Fmacos","\u002Fdocs\u002Fwindows","\u002Fdocs\u002Fdocker","\u002Fdocs\u002Fcreate-api-key","\u002Fguides\u002Ffind-your-public-ip-address\u002Ffind-your-ip-address-on-linux","\u002Fguides\u002Ffind-your-public-ip-address\u002Ffind-your-ip-address-on-mac","\u002Fguides\u002Ffind-your-public-ip-address\u002Ffind-your-ip-address-on-windows","\u002Fguides\u002Ffind-your-public-ip-address","\u002Fguides\u002Fself-hosting\u002Fdocker-desktop-mac-client-ip","\u002Fguides\u002Fself-hosting\u002Fexpose-docker-containers-to-the-internet","\u002Fguides\u002Fself-hosting\u002Fexpose-home-server-to-internet","\u002Fguides\u002Fself-hosting\u002Fgetpublicip-vs-cloudflare-tunnel-vs-tailscale","\u002Fguides\u002Fself-hosting\u002Fmac-mini-home-server","\u002Fguides\u002Fself-hosting\u002Fport-forwarding-not-working","\u002Fguides\u002Fself-hosting\u002Fself-hosting-behind-carrier-grade-nat-cgnat","\u002Fguides\u002Fself-hosting\u002Fwireguard-simple-watchdog-script","\u002Fguides\u002Fstatic-public-ip-address\u002Fhow-to-get-a-public-ip-address","\u002Fguides\u002Fstatic-public-ip-address\u002Fhow-to-get-a-static-ip-address","\u002Fguides\u002Fstatic-public-ip-address","\u002Fguides\u002Fuse-cases\u002Fhome-server","\u002Fguides\u002Fuse-cases\u002Foffice-server",[30,34,38,42,46,50],{"path":6,"title":31,"icon":32,"stem":33},"Getting Started","mdi-file-document-outline","docs\u002F1.getting-started",{"path":7,"title":35,"icon":36,"stem":37},"Linux","mdi-linux","docs\u002F2.linux",{"path":8,"title":39,"icon":40,"stem":41},"macOS","mdi-apple","docs\u002F3.macos",{"path":9,"title":43,"icon":44,"stem":45},"Windows","mdi-microsoft-windows","docs\u002F3.windows",{"path":10,"title":47,"icon":48,"stem":49},"Docker","mdi-docker","docs\u002F4.docker",{"path":11,"title":51,"icon":52,"stem":53},"Create API Key","mdi-key","docs\u002F5.create-api-key",{"paths":55,"docs":58},[6,7,8,9,10,11,12,14,15,56,17,18,57,19,21,22,24,25,26,27,28],"\u002Fguides\u002Fself-hosting\u002Fdyndns-hinter-cgnat","\u002Fguides\u002Fself-hosting\u002Ffritzbox-portfreigabe-ds-lite",[59,61,62,63,64,65],{"path":6,"title":60,"icon":32,"stem":33},"Erste Schritte",{"path":7,"title":35,"icon":36,"stem":37},{"path":8,"title":39,"icon":40,"stem":41},{"path":9,"title":43,"icon":44,"stem":45},{"path":10,"title":47,"icon":48,"stem":49},{"path":11,"title":66,"icon":52,"stem":53},"API-Schlüssel erstellen",{"paths":68,"docs":71},[6,7,8,9,10,11,12,14,15,69,70,17,18,19,21,22,24,25,26,27,28],"\u002Fguides\u002Fself-hosting\u002Fcomo-saber-si-tengo-cgnat","\u002Fguides\u002Fself-hosting\u002Fddns-detras-de-cgnat",[72,74,75,76,77,78],{"path":6,"title":73,"icon":32,"stem":33},"Primeros pasos",{"path":7,"title":35,"icon":36,"stem":37},{"path":8,"title":39,"icon":40,"stem":41},{"path":9,"title":43,"icon":44,"stem":45},{"path":10,"title":47,"icon":48,"stem":49},{"path":11,"title":79,"icon":52,"stem":53},"Crear clave API",{"id":81,"title":82,"body":83,"createdAt":1349,"description":1350,"extension":1351,"faq":1352,"meta":1367,"navigation":1368,"path":13,"seo":1371,"stem":1372,"updatedAt":1373,"__hash__":1374},"content_en\u002Fguides\u002Ffind-your-public-ip-address\u002Ffind-your-ip-address-on-mac.md","How to Find Your IP Address on a Mac (Local and Public)",{"type":84,"value":85,"toc":1329},"minimark",[86,91,108,165,180,249,294,367,677,972,999,1073,1140,1290,1294,1325],[87,88,90],"h1",{"id":89},"how-to-find-your-ip-address-on-a-mac","How to Find Your IP Address on a Mac",[92,93,94,103],"v-row",{},[95,96,99],"v-col",{"cols":97,"md":98},12,"6",[100,101],"ipv4-address",{"max-width":102},"500",[95,104,105],{"cols":97,"md":98},[106,107],"ipv6-address",{"max-width":102},[109,110,113,121],"guide-quick-answer",{"cta-title":111,"cta-text":112},"Behind CGNAT, or your IP keeps changing?","Get a dedicated public IPv4 and IPv6 that stays yours and accepts inbound connections.",[114,115,116,120],"p",{},[117,118,119],"strong",{},"Your Mac has two IP addresses."," The local one is in System Settings › Network: click Wi-Fi or Ethernet, then Details › TCP\u002FIP. The public one, which websites see, isn't shown anywhere in macOS. Open Terminal and run:",[122,123,128],"pre",{"className":124,"code":125,"language":126,"meta":127,"style":127},"language-shell shiki shiki-themes monokai","curl -4 ip.getpublicip.com    # public IPv4\ncurl -6 ip.getpublicip.com    # public IPv6\n","shell","",[129,130,131,152],"code",{"__ignoreMap":127},[132,133,136,140,144,148],"span",{"class":134,"line":135},"line",1,[132,137,139],{"class":138},"sHkqI","curl",[132,141,143],{"class":142},"s7s5_"," -4",[132,145,147],{"class":146},"s_Ekj"," ip.getpublicip.com",[132,149,151],{"class":150},"snpHw","    # public IPv4\n",[132,153,155,157,160,162],{"class":134,"line":154},2,[132,156,139],{"class":138},[132,158,159],{"class":142}," -6",[132,161,147],{"class":146},[132,163,164],{"class":150},"    # public IPv6\n",[114,166,167,168,171,172,175,176,179],{},"We ran every command on this page on a Mac mini with macOS 27.0.1 on 3 November 2026. Three of them didn't behave the way most guides describe: ",[129,169,170],{},"ipconfig getifaddr en0"," on a Mac mini, ",[129,173,174],{},"curl ifconfig.me"," on a network with IPv6, and the usual ",[129,177,178],{},"dig"," command.",[181,182,191,196],"v-sheet",{"className":183,"rounded":127,"max-width":190},[184,185,186,187,188,189],"mx-auto","pa-lg-4","pa-2","mt-2","mb-4","ma-0","1200",[192,193,195],"h2",{"id":194},"key-takeaways","Key takeaways",[197,198,199,214,221,233,246],"ul",{},[200,201,202,203,206,207,210,211,213],"li",{},"Your local IP (usually ",[129,204,205],{},"192.168.x.x"," or ",[129,208,209],{},"10.x.x.x",") is in System Settings › Network › Details › TCP\u002FIP. In Terminal, ",[129,212,170],{}," prints it.",[200,215,216,217,220],{},"Your public IP only shows up when you ask a server outside your network: ",[129,218,219],{},"curl -4 ip.getpublicip.com",".",[200,222,223,226,227,229,230,220],{},[129,224,225],{},"en0"," is Wi-Fi on a MacBook but Ethernet on a Mac mini. If ",[129,228,170],{}," prints nothing, your connection has another name, often ",[129,231,232],{},"en1",[200,234,235,236,238,239,241,242,245],{},"On a network with IPv6, ",[129,237,174],{}," prints your IPv6 address and the usual ",[129,240,178],{}," command prints nothing. Add ",[129,243,244],{},"-4"," for IPv4.",[200,247,248],{},"If your router's WAN address differs from your public IP, your ISP is using CGNAT, and connections from the internet can't reach your Mac.",[181,250,252,256,278,281,291],{"className":251,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,253,255],{"id":254},"local-ip-vs-public-ip-on-a-mac","Local IP vs public IP on a Mac",[114,257,258,259,266,267,270,271,206,274,277],{},"Your router gives each device at home a local (private) IP address from a range reserved for private networks by ",[260,261,265],"a",{"href":262,"rel":263},"https:\u002F\u002Fwww.rfc-editor.org\u002Frfc\u002Frfc1918",[264],"nofollow","RFC 1918",": ",[129,268,269],{},"10.0.0.0\u002F8",", ",[129,272,273],{},"172.16.0.0\u002F12",[129,275,276],{},"192.168.0.0\u002F16",". That's the address macOS shows you, and nothing outside your home can reach it.",[114,279,280],{},"When the Mac connects to a website, the router rewrites the traffic to come from its own public IP address, the one your ISP assigned. This is NAT (network address translation). Websites and game servers only ever see the public address, and macOS can't know it without asking a server outside your network.",[114,282,283],{},[284,285],"img",{"alt":286,"className":287,"src":290},"Diagram of where to find each IP address on a Mac: the local IP in System Settings, the router's WAN address on its admin page, and the public IP with curl, with and without CGNAT",[288,289],"w-100","my-4","\u002Fimages\u002Fguides\u002Fmac_local_vs_public_ip.svg",[114,292,293],{},"With a VPN connected, websites see the VPN's address, and the commands below report that address instead of your ISP's.",[181,295,297,301,310,355,364],{"className":296,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,298,300],{"id":299},"find-your-local-ip-address-in-system-settings","Find your local IP address in System Settings",[114,302,303,304,309],{},"These are the steps in ",[260,305,308],{"href":306,"rel":307},"https:\u002F\u002Fsupport.apple.com\u002Fguide\u002Fmac-help\u002Fmchlp2718\u002Fmac",[264],"Apple's Mac User Guide"," for macOS Ventura and later:",[311,312,313,319,326,335,344],"ol",{},[200,314,315,316,220],{},"Choose Apple menu › ",[117,317,318],{},"System Settings",[200,320,321,322,325],{},"Click ",[117,323,324],{},"Network"," in the sidebar. You may need to scroll down.",[200,327,328,329,206,332,220],{},"Click the connection you're using, ",[117,330,331],{},"Wi-Fi",[117,333,334],{},"Ethernet",[200,336,321,337,340,341,220],{},[117,338,339],{},"Details",", then ",[117,342,343],{},"TCP\u002FIP",[200,345,346,347,350,351,354],{},"Read the ",[117,348,349],{},"IP address"," field. That's your local IPv4 address. The ",[117,352,353],{},"Router"," field below it is your router's address.",[114,356,357,358,363],{},"On Wi-Fi there's a quicker way: hold Option and click the Wi-Fi icon in the menu bar. Apple's guide to the ",[260,359,362],{"href":360,"rel":361},"https:\u002F\u002Fsupport.apple.com\u002Fguide\u002Fmac-help\u002Fmchlfad426fa\u002Fmac",[264],"Wi-Fi status menu"," says this shows the IP address and router address under the network you're connected to, along with the channel and security type.",[114,365,366],{},"macOS Monterey and earlier have System Preferences instead. Open System Preferences › Network and select the connection: the IP address is in the status text, and Advanced › TCP\u002FIP has the full details.",[181,368,370,374,381,397,403,411,417,422,433,436,449,452,458,461,494,501,592,596,608,611,617,664],{"className":369,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,371,373],{"id":372},"find-your-local-ip-address-in-terminal","Find your local IP address in Terminal",[114,375,376,377,380],{},"Open Terminal from Spotlight (Command-Space, then type ",[129,378,379],{},"Terminal",") or from Applications › Utilities. Then run:",[122,382,384],{"className":124,"code":383,"language":126,"meta":127,"style":127},"ipconfig getifaddr en0\n",[129,385,386],{"__ignoreMap":127},[132,387,388,391,394],{"class":134,"line":135},[132,389,390],{"class":138},"ipconfig",[132,392,393],{"class":146}," getifaddr",[132,395,396],{"class":146}," en0\n",[114,398,399,400,402],{},"It prints the IPv4 address of ",[129,401,225],{}," and nothing else:",[122,404,409],{"className":405,"code":407,"language":408},[406],"language-text","192.168.1.20\n","text",[129,410,407],{"__ignoreMap":127},[114,412,413,414,416],{},"On a MacBook Air or MacBook Pro, ",[129,415,225],{}," is Wi-Fi, so that's usually all you need.",[418,419,421],"h3",{"id":420},"if-ipconfig-getifaddr-en0-prints-nothing","If ipconfig getifaddr en0 prints nothing",[114,423,424,425,427,428,430,431,220],{},"On Macs with a built-in Ethernet port, ",[129,426,225],{}," is the Ethernet port, and Wi-Fi gets another name. Our Mac mini was online over Wi-Fi, and ",[129,429,170],{}," printed nothing at all and exited with status 1. Its Wi-Fi is ",[129,432,232],{},[114,434,435],{},"To see which name belongs to which port:",[122,437,439],{"className":124,"code":438,"language":126,"meta":127,"style":127},"networksetup -listallhardwareports\n",[129,440,441],{"__ignoreMap":127},[132,442,443,446],{"class":134,"line":135},[132,444,445],{"class":138},"networksetup",[132,447,448],{"class":142}," -listallhardwareports\n",[114,450,451],{},"Trimmed output from our Mac mini:",[122,453,456],{"className":454,"code":455,"language":408},[406],"Hardware Port: Ethernet\nDevice: en0\n\nHardware Port: Wi-Fi\nDevice: en1\n",[129,457,455],{"__ignoreMap":127},[114,459,460],{},"To skip the guessing, ask macOS which interface it uses to reach the internet and print that one's address:",[122,462,464],{"className":124,"code":463,"language":126,"meta":127,"style":127},"ipconfig getifaddr \"$(route -n get default | awk '\u002Finterface:\u002F{print $2}')\"\n",[129,465,466],{"__ignoreMap":127},[132,467,468,470,472,475,478,481,484,488,491],{"class":134,"line":135},[132,469,390],{"class":138},[132,471,393],{"class":146},[132,473,474],{"class":146}," \"$(",[132,476,477],{"class":138},"route",[132,479,480],{"class":142}," -n",[132,482,483],{"class":146}," get default ",[132,485,487],{"class":486},"s8I7P","|",[132,489,490],{"class":138}," awk",[132,492,493],{"class":146}," '\u002Finterface:\u002F{print $2}')\"\n",[114,495,496,497,500],{},"With a full-tunnel VPN connected, the default route goes through the VPN's ",[129,498,499],{},"utun"," interface, so this prints the VPN's internal address instead.",[502,503,504,517],"table",{},[505,506,507],"thead",{},[508,509,510,514],"tr",{},[511,512,513],"th",{},"Interface",[511,515,516],{},"What it usually is",[518,519,520,530,543,556,569,579],"tbody",{},[508,521,522,527],{},[523,524,525],"td",{},[129,526,225],{},[523,528,529],{},"Wi-Fi on a MacBook; Ethernet on a Mac with an Ethernet port",[508,531,532,540],{},[523,533,534,270,536,539],{},[129,535,232],{},[129,537,538],{},"en2",", …",[523,541,542],{},"Wi-Fi on desktop Macs, Thunderbolt ports, USB Ethernet adapters",[508,544,545,550],{},[523,546,547],{},[129,548,549],{},"lo0",[523,551,552,553],{},"Loopback, always ",[129,554,555],{},"127.0.0.1",[508,557,558,566],{},[523,559,560,270,563,539],{},[129,561,562],{},"utun0",[129,564,565],{},"utun1",[523,567,568],{},"VPN tunnels. macOS also creates a few for its own services",[508,570,571,576],{},[523,572,573],{},[129,574,575],{},"bridge0",[523,577,578],{},"Thunderbolt Bridge",[508,580,581,589],{},[523,582,583,270,586],{},[129,584,585],{},"awdl0",[129,587,588],{},"llw0",[523,590,591],{},"AirDrop and other Apple wireless features",[418,593,595],{"id":594},"see-every-address-ipv6-included-ifconfig","See every address, IPv6 included: ifconfig",[122,597,599],{"className":124,"code":598,"language":126,"meta":127,"style":127},"ifconfig en0\n",[129,600,601],{"__ignoreMap":127},[132,602,603,606],{"class":134,"line":135},[132,604,605],{"class":138},"ifconfig",[132,607,396],{"class":146},[114,609,610],{},"Output (addresses replaced with examples):",[122,612,615],{"className":613,"code":614,"language":408},[406],"en0: flags=8863\u003CUP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500\n    ether 3a:5c:91:07:be:42\n    inet6 fe80::4d1:a46b:d416:9156%en0 prefixlen 64 secured scopeid 0x12\n    inet6 2001:db8:4c2a:1e00:1c8a:5f2e:9b7d:3a10 prefixlen 64 autoconf secured\n    inet6 2001:db8:4c2a:1e00:84f3:22c1:6e0a:b5d7 prefixlen 64 autoconf temporary\n    inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255\n    status: active\n",[129,616,614],{"__ignoreMap":127},[197,618,619,636,642],{},[200,620,621,624,625,628,629,632,633,220],{},[129,622,623],{},"inet"," is the IPv4 address. ",[129,626,627],{},"netmask 0xffffff00"," is ",[129,630,631],{},"255.255.255.0",", a ",[129,634,635],{},"\u002F24",[200,637,638,641],{},[129,639,640],{},"inet6 fe80::…"," is a link-local address. It only works on your own network segment.",[200,643,644,645,648,649,652,653,656,657,628,660,663],{},"The other two ",[129,646,647],{},"inet6"," lines are global IPv6 addresses. ",[129,650,651],{},"secured"," is the stable one. ",[129,654,655],{},"temporary"," changes regularly, and macOS uses it for outgoing connections by default (",[129,658,659],{},"sysctl net.inet6.ip6.prefer_tempaddr",[129,661,662],{},"1",").",[114,665,666,669,670,673,674,676],{},[129,667,668],{},"networksetup -getinfo Wi-Fi"," gives a tidier summary of the IP address, subnet mask and router. Don't rely on it for IPv6: on our Mac it said ",[129,671,672],{},"IPv6 IP address: none"," while ",[129,675,605],{}," listed two global IPv6 addresses on the same interface.",[181,678,680,684,698,701,707,717,732,735,752,756,770,774,809,813,816,836,846,866,869,891],{"className":679,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,681,683],{"id":682},"find-your-public-ip-address-in-terminal","Find your public IP address in Terminal",[122,685,687],{"className":124,"code":686,"language":126,"meta":127,"style":127},"curl -4 ip.getpublicip.com\n",[129,688,689],{"__ignoreMap":127},[132,690,691,693,695],{"class":134,"line":135},[132,692,139],{"class":138},[132,694,143],{"class":142},[132,696,697],{"class":146}," ip.getpublicip.com\n",[114,699,700],{},"Output:",[122,702,705],{"className":703,"code":704,"language":408},[406],"IP Address: 203.0.113.42\nISP: Example ISP\nCity: Chicago\nCountry: United States\n",[129,706,704],{"__ignoreMap":127},[114,708,709,710,712,713,716],{},"Swap ",[129,711,244],{}," for ",[129,714,715],{},"-6"," to get your public IPv6 address. If your network has no IPv6, curl fails with a connection error.",[114,718,719,720,722,723,726,727,729,730,220],{},"On IPv6, your router usually doesn't translate addresses, so the global address in ",[129,721,605],{}," is often the one websites see, but not always. On our test network, the address ",[129,724,725],{},"curl -6"," reported didn't match either IPv6 address on the Mac, because the router translates IPv6 too, so check with ",[129,728,725],{}," rather than reading it off ",[129,731,605],{},[114,733,734],{},"For the bare address with nothing else, which is handy in scripts:",[122,736,738],{"className":124,"code":737,"language":126,"meta":127,"style":127},"curl -4 -s ifconfig.me\n",[129,739,740],{"__ignoreMap":127},[132,741,742,744,746,749],{"class":134,"line":135},[132,743,139],{"class":138},[132,745,143],{"class":142},[132,747,748],{"class":142}," -s",[132,750,751],{"class":146}," ifconfig.me\n",[418,753,755],{"id":754},"why-plain-curl-ifconfigme-can-print-an-ipv6-address","Why plain curl ifconfig.me can print an IPv6 address",[114,757,758,759,762,763,766,767,769],{},"On a network with IPv6, curl tries IPv6 first. On our Mac, ",[129,760,761],{},"curl -s ifconfig.me"," and ",[129,764,765],{},"curl https:\u002F\u002Fapi.getpublicip.com\u002Fip"," both returned the IPv6 address. Port forwarding rules and most allowlists want the IPv4 address, so add ",[129,768,244],{}," whenever you need it.",[418,771,773],{"id":772},"theres-no-wget-on-a-mac","There's no wget on a Mac",[114,775,776,777,270,779,270,781,762,784,787,788,791,792,795,796,799,800,805,806,663],{},"macOS 27.0.1 includes ",[129,778,139],{},[129,780,178],{},[129,782,783],{},"host",[129,785,786],{},"nslookup",", but not ",[129,789,790],{},"wget",". The ",[129,793,794],{},"wget -qO-"," one-liners in many Linux guides fail with ",[129,797,798],{},"zsh: command not found: wget",". Use curl, or install wget with ",[260,801,804],{"href":802,"rel":803},"https:\u002F\u002Fbrew.sh\u002F",[264],"Homebrew"," (",[129,807,808],{},"brew install wget",[418,810,812],{"id":811},"the-dns-method-add-4-to-dig","The DNS method: add -4 to dig",[114,814,815],{},"You can also get your public IP from a DNS lookup instead of a web request:",[122,817,819],{"className":124,"code":818,"language":126,"meta":127,"style":127},"dig -4 +short myip.opendns.com @resolver1.opendns.com\n",[129,820,821],{"__ignoreMap":127},[132,822,823,825,827,830,833],{"class":134,"line":135},[132,824,178],{"class":138},[132,826,143],{"class":142},[132,828,829],{"class":146}," +short",[132,831,832],{"class":146}," myip.opendns.com",[132,834,835],{"class":146}," @resolver1.opendns.com\n",[114,837,838,839,841,842,845],{},"Leave out ",[129,840,244],{}," and, on a network with IPv6, dig sends the query to OpenDNS over IPv6. On our Mac that came back empty (",[129,843,844],{},"status: NOERROR",", zero answers), because OpenDNS reports the address your query came from, and an IPv6 query can't tell it your IPv4 address. The IPv6 version works the same way:",[122,847,849],{"className":124,"code":848,"language":126,"meta":127,"style":127},"dig -6 +short AAAA myip.opendns.com @resolver1.opendns.com\n",[129,850,851],{"__ignoreMap":127},[132,852,853,855,857,859,862,864],{"class":134,"line":135},[132,854,178],{"class":138},[132,856,159],{"class":142},[132,858,829],{"class":146},[132,860,861],{"class":146}," AAAA",[132,863,832],{"class":146},[132,865,835],{"class":146},[114,867,868],{},"Google's equivalent returns the address in quotes:",[122,870,872],{"className":124,"code":871,"language":126,"meta":127,"style":127},"dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com\n",[129,873,874],{"__ignoreMap":127},[132,875,876,878,880,883,885,888],{"class":134,"line":135},[132,877,178],{"class":138},[132,879,143],{"class":142},[132,881,882],{"class":146}," TXT",[132,884,829],{"class":146},[132,886,887],{"class":146}," o-o.myaddr.l.google.com",[132,889,890],{"class":146}," @ns1.google.com\n",[502,892,893,906],{},[505,894,895],{},[508,896,897,900,903],{},[511,898,899],{},"Command",[511,901,902],{},"Prints",[511,904,905],{},"Needs",[518,907,908,920,933,946,959],{},[508,909,910,914,917],{},[523,911,912],{},[129,913,219],{},[523,915,916],{},"IPv4, ISP and location",[523,918,919],{},"nothing, curl ships with macOS",[508,921,922,927,930],{},[523,923,924],{},[129,925,926],{},"curl -6 ip.getpublicip.com",[523,928,929],{},"IPv6, ISP and location",[523,931,932],{},"IPv6 on your network",[508,934,935,940,943],{},[523,936,937],{},[129,938,939],{},"curl -4 -s ifconfig.me",[523,941,942],{},"IPv4 only",[523,944,945],{},"nothing",[508,947,948,953,956],{},[523,949,950],{},[129,951,952],{},"dig -4 +short myip.opendns.com @resolver1.opendns.com",[523,954,955],{},"IPv4 only, over DNS",[523,957,958],{},"outbound DNS to OpenDNS",[508,960,961,966,969],{},[523,962,963],{},[129,964,965],{},"wget -qO- ifconfig.me",[523,967,968],{},"Fails on a stock Mac",[523,970,971],{},"Homebrew's wget",[181,973,975,979,987,996],{"className":974,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,976,978],{"id":977},"find-your-public-ip-without-terminal","Find your public IP without Terminal",[114,980,981,982,986],{},"Open ",[260,983,985],{"href":984},"\u002F","getpublicip.com"," in a browser. The boxes at the top of this page show the same thing: your public IPv4 and IPv6 addresses.",[114,988,989,990,995],{},"If you use iCloud Private Relay, a website open in Safari sees a temporary relay address, not yours. Apple says the second relay ",[260,991,994],{"href":992,"rel":993},"https:\u002F\u002Fsupport.apple.com\u002Fen-us\u002F102602",[264],"\"generates a temporary IP address\""," for the connection. Use the Terminal commands, which don't go through Safari, or open the page in another browser.",[114,997,998],{},"Your router's admin page also shows a public-facing address, usually labelled WAN or Internet. Comparing the two is how you check for CGNAT.",[181,1000,1002,1006,1009,1012,1039,1060,1067],{"className":1001,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,1003,1005],{"id":1004},"is-your-mac-behind-cgnat","Is your Mac behind CGNAT?",[114,1007,1008],{},"Carrier-grade NAT (CGNAT) means your ISP puts one more NAT between your router and the internet, and shares one public address among many customers. It's most common on mobile networks, and more and more fibre ISPs use it where IPv4 addresses are scarce. Outbound traffic works normally, but nothing on the internet can start a connection to you, so port forwarding on your router does nothing.",[114,1010,1011],{},"To check:",[311,1013,1014,1028,1031,1034],{},[200,1015,1016,1017,1019,1020,1023,1024,1027],{},"Find your router's address: the ",[117,1018,353],{}," field in Details › TCP\u002FIP, or the ",[129,1021,1022],{},"gateway"," line from ",[129,1025,1026],{},"route -n get default"," in Terminal.",[200,1029,1030],{},"Type that address into a browser and log in to the router.",[200,1032,1033],{},"Find the WAN or Internet address on its status page.",[200,1035,1036,1037,220],{},"Compare it with ",[129,1038,219],{},[114,1040,1041,1042,1045,1046,1049,1050,1053,1054,1059],{},"If the two match, you have your own public IPv4 address and port forwarding can work. If they differ, you're behind CGNAT. A WAN address from ",[129,1043,1044],{},"100.64.0.0"," to ",[129,1047,1048],{},"100.127.255.255"," settles it: that's ",[129,1051,1052],{},"100.64.0.0\u002F10",", the range ",[260,1055,1058],{"href":1056,"rel":1057},"https:\u002F\u002Fwww.rfc-editor.org\u002Frfc\u002Frfc6598",[264],"RFC 6598"," reserves for carrier-grade NAT.",[114,1061,1062,1063,1066],{},"To host something on your Mac from behind CGNAT, such as a Plex library or a Minecraft server, you need a way in that doesn't depend on your ISP. ",[260,1064,1065],{"href":22},"Self-hosting behind CGNAT"," compares the options. For a plain website, Cloudflare Tunnel is free and usually enough. UDP services such as game servers, and anything that needs the visitor's real address, are harder; the guide covers which tools handle them.",[114,1068,1069,1072],{},[260,1070,1071],{"href":8},"GetPublicIP for Mac"," gives your Mac a public IPv4 and IPv6 address of its own, routed to it over a WireGuard tunnel, with the ports you choose forwarded to it. It works behind CGNAT, because the Mac connects out to our server.",[181,1074,1076,1080,1087,1096,1099,1134],{"className":1075,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,1077,1079],{"id":1078},"your-mac-address-is-a-different-thing","Your MAC address is a different thing",[114,1081,1082,1083,1086],{},"A MAC address (media access control address) is the hardware address of a network port, written as six pairs of hex digits like ",[129,1084,1085],{},"3a:5c:91:07:be:42",". It has nothing to do with Apple's Macs. Your router uses it to tell devices apart, and it doesn't travel past your router.",[114,1088,1089,1090,1095],{},"On Wi-Fi, macOS can use a private Wi-Fi address in place of the hardware one. Apple's ",[260,1091,1094],{"href":1092,"rel":1093},"https:\u002F\u002Fsupport.apple.com\u002Fguide\u002Fmac-help\u002Fmh11935\u002Fmac",[264],"Wi-Fi settings guide"," lists three modes, Off, Fixed and Rotating, under Wi-Fi › Details, along with the current Wi-Fi address and the hardware MAC address.",[114,1097,1098],{},"In Terminal, the two are different commands:",[122,1100,1102],{"className":124,"code":1101,"language":126,"meta":127,"style":127},"ifconfig en0 | awk '\u002Fether\u002F{print $2}'    # the address in use now (may be private)\nnetworksetup -getmacaddress en0           # the hardware address\n",[129,1103,1104,1122],{"__ignoreMap":127},[132,1105,1106,1108,1111,1114,1116,1119],{"class":134,"line":135},[132,1107,605],{"class":138},[132,1109,1110],{"class":146}," en0",[132,1112,1113],{"class":486}," |",[132,1115,490],{"class":138},[132,1117,1118],{"class":146}," '\u002Fether\u002F{print $2}'",[132,1120,1121],{"class":150},"    # the address in use now (may be private)\n",[132,1123,1124,1126,1129,1131],{"class":134,"line":154},[132,1125,445],{"class":138},[132,1127,1128],{"class":142}," -getmacaddress",[132,1130,1110],{"class":146},[132,1132,1133],{"class":150},"           # the hardware address\n",[114,1135,1136,1137,1139],{},"On our Mac mini, whose Wi-Fi is ",[129,1138,232],{},", the two returned different addresses with a private address turned on.",[181,1141,1143,1147,1165,1183,1210,1223,1247,1268],{"className":1142,"rounded":127,"max-width":190},[184,185,186,187,188,189],[192,1144,1146],{"id":1145},"frequently-asked-questions","Frequently Asked Questions",[1148,1149,1152,1156],"details",{"className":1150},[1151],"faq-item",[1153,1154,1155],"summary",{},"How do I find my IP address on a Mac?",[114,1157,1158,1159,1161,1162,1164],{},"Your local IP is in System Settings › Network: click the connection you're using (Wi-Fi or Ethernet), then Details › TCP\u002FIP, and read the IP address field. On Wi-Fi you can also Option-click the Wi-Fi icon in the menu bar. Your public IP isn't shown anywhere in macOS. Run ",[129,1160,219],{}," in Terminal, or open ",[260,1163,985],{"href":984}," in a browser.",[1148,1166,1168,1171],{"className":1167},[1151],[1153,1169,1170],{},"How do I find my public IP address on a Mac using Terminal?",[114,1172,1173,1174,1176,1177,1179,1180,1182],{},"Run ",[129,1175,219],{}," for your public IPv4 address, or ",[129,1178,926],{}," for IPv6. Each prints the address with your ISP and location. For the bare address only, run ",[129,1181,939],{},". curl ships with macOS, so there's nothing to install.",[1148,1184,1186,1189],{"className":1185},[1151],[1153,1187,1188],{},"Why does ipconfig getifaddr en0 show nothing on my Mac?",[114,1190,1191,1193,1194,1196,1197,1199,1200,1202,1203,1206,1207,220],{},[129,1192,225],{}," isn't your active connection. On a MacBook ",[129,1195,225],{}," is Wi-Fi, but on a Mac with a built-in Ethernet port, such as a Mac mini, ",[129,1198,225],{}," is Ethernet and Wi-Fi has another name (",[129,1201,232],{}," on our Mac mini). Run ",[129,1204,1205],{},"networksetup -listallhardwareports"," to see which name is which, or ask for the interface that carries your default route: ",[129,1208,1209],{},"ipconfig getifaddr \"$(route -n get default | awk '\u002Finterface:\u002F{print $2}')\"",[1148,1211,1213,1216],{"className":1212},[1151],[1153,1214,1215],{},"Why does my Mac show a 192.168 address instead of my real IP?",[114,1217,1218,1220,1221,1027],{},[129,1219,205],{}," is a private address that your router gave the Mac on your home network. The internet never sees it. Your router swaps it for the public IP your ISP gave the router, a process called NAT. To see the public address, ask a server outside your network: ",[129,1222,219],{},[1148,1224,1226,1229],{"className":1225},[1151],[1153,1227,1228],{},"Why does curl ifconfig.me show an IPv6 address on my Mac?",[114,1230,1231,1232,1234,1235,1238,1239,1242,1243,1246],{},"When your network has IPv6, curl tries it first, so services that answer on both report the IPv6 address you connected from. Add ",[129,1233,244],{}," to get your IPv4 address: ",[129,1236,1237],{},"curl -4 ifconfig.me",". The same goes for dig: on an IPv6 network, ",[129,1240,1241],{},"dig +short myip.opendns.com @resolver1.opendns.com"," can return nothing, while ",[129,1244,1245],{},"dig -4"," returns your IPv4 address.",[1148,1248,1250,1253],{"className":1249},[1151],[1153,1251,1252],{},"Is my IP address the same as my MAC address?",[114,1254,1255,1256,1259,1260,1263,1264,1267],{},"No. An IP address identifies your Mac on a network and can change. A MAC address is the hardware address of a network port. On Wi-Fi, macOS can use a private Wi-Fi address instead of the hardware one. ",[129,1257,1258],{},"ifconfig en0"," shows the address in use on the ",[129,1261,1262],{},"ether"," line, and ",[129,1265,1266],{},"networksetup -getmacaddress en0"," shows the hardware address.",[1148,1269,1271,1274],{"className":1270},[1151],[1153,1272,1273],{},"How do I find my router's IP address on a Mac?",[114,1275,1276,1277,206,1280,1283,1284,1286,1287,1289],{},"In System Settings › Network › (your connection) › Details › TCP\u002FIP, the Router field is your router's local address, usually ",[129,1278,1279],{},"192.168.0.1",[129,1281,1282],{},"192.168.1.1",". In Terminal, run ",[129,1285,1026],{}," and read the ",[129,1288,1022],{}," line. Type that address into a browser to reach your router's admin page, where its WAN (public-facing) address is shown.",[192,1291,1293],{"id":1292},"related-guides","Related guides",[197,1295,1296,1302,1308,1314,1319],{},[200,1297,1298,1301],{},[260,1299,1300],{"href":15},"How to find your public IP address (any device)",": the overview, including phones and routers",[200,1303,1304,1307],{},[260,1305,1306],{"href":12},"Find your public IP on Linux",": curl, wget and dig one-liners",[200,1309,1310,1313],{},[260,1311,1312],{"href":14},"Find your IP address on Windows",": PowerShell and Command Prompt",[200,1315,1316,1318],{},[260,1317,1065],{"href":22},": when your public IP can't accept connections",[200,1320,1321,1324],{},[260,1322,1323],{"href":21},"Port forwarding not working?",": the usual causes, in order",[1326,1327,1328],"style",{},"html pre.shiki code .sHkqI, html code.shiki .sHkqI{--shiki-default:#A6E22E}html pre.shiki code .s7s5_, html code.shiki .s7s5_{--shiki-default:#AE81FF}html pre.shiki code .s_Ekj, html code.shiki .s_Ekj{--shiki-default:#E6DB74}html pre.shiki code .snpHw, html code.shiki .snpHw{--shiki-default:#88846F}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s8I7P, html code.shiki .s8I7P{--shiki-default:#F92672}",{"title":127,"searchDepth":154,"depth":154,"links":1330},[1331,1332,1333,1334,1339,1344,1345,1346,1347,1348],{"id":194,"depth":154,"text":195},{"id":254,"depth":154,"text":255},{"id":299,"depth":154,"text":300},{"id":372,"depth":154,"text":373,"children":1335},[1336,1338],{"id":420,"depth":1337,"text":421},3,{"id":594,"depth":1337,"text":595},{"id":682,"depth":154,"text":683,"children":1340},[1341,1342,1343],{"id":754,"depth":1337,"text":755},{"id":772,"depth":1337,"text":773},{"id":811,"depth":1337,"text":812},{"id":977,"depth":154,"text":978},{"id":1004,"depth":154,"text":1005},{"id":1078,"depth":154,"text":1079},{"id":1145,"depth":154,"text":1146},{"id":1292,"depth":154,"text":1293},"2026-11-03","Find your Mac's local IP in System Settings or with ipconfig getifaddr, and your public IP with one Terminal command. Covers IPv6, en0 vs en1, and CGNAT.","md",[1353,1355,1357,1359,1361,1363,1365],{"question":1155,"answer":1354},"Your local IP is in System Settings › Network: click the connection you're using (Wi-Fi or Ethernet), then Details › TCP\u002FIP, and read the IP address field. On Wi-Fi you can also Option-click the Wi-Fi icon in the menu bar. Your public IP isn't shown anywhere in macOS. Run curl -4 ip.getpublicip.com in Terminal, or open getpublicip.com in a browser.",{"question":1170,"answer":1356},"Run curl -4 ip.getpublicip.com for your public IPv4 address, or curl -6 ip.getpublicip.com for IPv6. Each prints the address with your ISP and location. For the bare address only, run curl -4 -s ifconfig.me. curl ships with macOS, so there's nothing to install.",{"question":1188,"answer":1358},"en0 isn't your active connection. On a MacBook en0 is Wi-Fi, but on a Mac with a built-in Ethernet port, such as a Mac mini, en0 is Ethernet and Wi-Fi has another name (en1 on our Mac mini). Run networksetup -listallhardwareports to see which name is which, or ask for the interface that carries your default route: ipconfig getifaddr \"$(route -n get default | awk '\u002Finterface:\u002F{print $2}')\".",{"question":1215,"answer":1360},"192.168.x.x is a private address that your router gave the Mac on your home network. The internet never sees it. Your router swaps it for the public IP your ISP gave the router, a process called NAT. To see the public address, ask a server outside your network: curl -4 ip.getpublicip.com in Terminal.",{"question":1228,"answer":1362},"When your network has IPv6, curl tries it first, so services that answer on both report the IPv6 address you connected from. Add -4 to get your IPv4 address: curl -4 ifconfig.me. The same goes for dig: on an IPv6 network, dig +short myip.opendns.com @resolver1.opendns.com can return nothing, while dig -4 returns your IPv4 address.",{"question":1252,"answer":1364},"No. An IP address identifies your Mac on a network and can change. A MAC address is the hardware address of a network port. On Wi-Fi, macOS can use a private Wi-Fi address instead of the hardware one. ifconfig en0 shows the address in use on the ether line, and networksetup -getmacaddress en0 shows the hardware address.",{"question":1273,"answer":1366},"In System Settings › Network › (your connection) › Details › TCP\u002FIP, the Router field is your router's local address, usually 192.168.0.1 or 192.168.1.1. In Terminal, run route -n get default and read the gateway line. Type that address into a browser to reach your router's admin page, where its WAN (public-facing) address is shown.",{},{"title":1369,"icon":40,"description":1370},"Find your IP Address on Mac","Find your local and public IP address on macOS in System Settings or Terminal, and check whether you're behind CGNAT.",{"title":82,"description":1350},"guides\u002Ffind-your-public-ip-address\u002Ffind-your-ip-address-on-mac","2026-11-05","pKK_oBhRP_MjRW4E6zLW0mxov1fYsIIziNKAIhQeXrk",[1376,1392,1441,1455],{"path":15,"title":1377,"icon":1378,"children":1379},"Find Your Public IP Address","mdi-folder",[1380,1386,1388],{"path":12,"title":1381,"navigation":1382},"Get Your Public IP on Linux: One curl Command (2026)",{"title":1383,"icon":1384,"description":1385},"Find your IP Address on Linux","mdi-penguin","Find your public and local IP address on Linux using curl, wget, dig, and built-in tools.",{"path":13,"title":82,"navigation":1387},{"title":1369,"icon":40,"description":1370},{"path":14,"title":1389,"navigation":1390},"Find your IP Address on Windows",{"title":1389,"icon":44,"description":1391},"Find your public and local IP address on Windows using PowerShell and Command Prompt.",{"path":1393,"title":1394,"icon":1378,"children":1395},"\u002Fguides\u002Fself-hosting","Self Hosting",[1396,1401,1406,1412,1418,1423,1429,1435],{"path":16,"title":1397,"navigation":1398},"Docker on Mac Sees 192.168.65.1? Why, and How to Fix It",{"title":1399,"icon":48,"description":1400},"Docker on Mac Sees 192.168.65.1","Why containers in Docker Desktop for Mac see 192.168.65.1 instead of the client's IP address, and the fixes that work.",{"path":17,"title":1402,"navigation":1403},"How to Expose Docker Containers to the Internet (Without Port Forwarding)",{"title":1404,"icon":48,"description":1405},"Expose Docker Containers to the Internet","Four ways to make a Docker Compose stack reachable from the internet, and why a dedicated public IP needs no published ports at all.",{"path":18,"title":1407,"navigation":1408},"Expose a Home Server to the Internet: 5 Methods (2026)",{"title":1409,"icon":1410,"description":1411},"Expose Your Home Server to the Internet","mdi-server-network","Five realistic methods to make your home server reachable from the internet, from port forwarding to a dedicated public IP.",{"path":19,"title":1413,"navigation":1414},"GetPublicIP vs Cloudflare Tunnel vs Tailscale for Self-Hosting",{"title":1415,"icon":1416,"description":1417},"GetPublicIP vs Cloudflare vs Tailscale","mdi-compare","Compare GetPublicIP, Cloudflare Tunnel and Tailscale for self-hosting servers at home or the office.",{"path":20,"title":1419,"navigation":1420},"Mac mini Home Server: Setup, Power and Remote Access",{"title":1421,"icon":40,"description":1422},"Mac mini as a Home Server","Set up a Mac mini to run unattended as a home server, choose native apps or Docker, and make it reachable from the internet.",{"path":21,"title":1424,"navigation":1425},"Port Forwarding Not Working? 6 Causes & Fixes (2026)",{"title":1426,"icon":1427,"description":1428},"Port Forwarding Not Working?","mdi-lan-disconnect","Diagnose the 6 most common reasons port forwarding fails and learn how to fix each one, including the hidden CGNAT problem.",{"path":22,"title":1430,"navigation":1431},"How to Self-Host Behind CGNAT: Bypass It (2026)",{"title":1432,"icon":1433,"description":1434},"What is carrier grade NAT?","mdi-lan-pending","Learn what CGNAT is, how to check if you're behind it, which ISPs use it, and how to self-host a real public IP bypassing carrier-grade NAT.",{"path":23,"title":1436,"navigation":1437},"WireGuard Simple Watchdog Script",{"title":1438,"icon":1439,"description":1440},"WireGuard Watchdog Script","mdi-shield-check","A simple watchdog script to monitor and restart WireGuard connections when network conditions change.",{"path":26,"title":1442,"icon":1378,"children":1443},"Static Public IP Address",[1444,1450],{"path":24,"title":1445,"navigation":1446},"How to Get a Public IP Address (4 Methods, 2026)",{"title":1447,"icon":1448,"description":1449},"How to get a public IP address","mdi-earth","What a public IP is, how to check yours, and 4 ways to get a dedicated public IP for self-hosting.",{"path":25,"title":1451,"navigation":1452},"How to get a static IP address",{"title":1451,"icon":1453,"description":1454},"mdi-ip-network","We discuss what a static IP address is, what your options are to get one, and the best way to get a static IP address.",{"path":1456,"title":1457,"icon":1378,"children":1458},"\u002Fguides\u002Fuse-cases","Use Cases",[1459,1465],{"path":27,"title":1460,"navigation":1461},"Self-Hosting at Home - Privacy & Independence",{"title":1462,"icon":1463,"description":1464},"Home Server Solutions","mdi-home-account","Build a sovereign personal cloud. Get a public IP address delivered to your home server so you can run your own email and chat services.",{"path":28,"title":1466,"navigation":1467},"Office Server Solutions & Benefits",{"title":1468,"icon":1410,"description":1469},"Office Server Solutions","Discover why forward-thinking companies are moving specific workloads back to the office to reduce cloud spend and increase agility.",1793914025189]