News for hackers. Stuff that matters.
Re:A New Future for Icanhazip by SilverRed on Sunday June 06, 2021 @09:06PM (#27417909)
`ip a` will tell you your IP addresses. As far as I can tell, for IPv6 it actually does know it's public address since that is globally unique with no need for a public/private split.
Re:A New Future for Icanhazip by andrewmcwatters on Sunday June 06, 2021 @09:11PM (#27417946)
The issue is that ifconfig and ip do not recognize the Private-Use Networks under any flag and thusly query DHCP for the public address, nor does DHCP have such a query. (To my knowledge.)
Re:A New Future for Icanhazip by Symbiote on Monday June 07, 2021 @08:08AM (#27421587)
When the host has a private-use address, there's not necessarily a single public IP (through NAT etc). Packets from my computer will currently appear from two possible public addresses, depending if they've been routed through the work VPN.

When the host has a non-private-use address, there might still be NAT, or there might be no Internet access. I have servers in 128...* without Internet access.

The "public" address might differ depending on the destination or anything else.

"ip ad" shows the address(es) the network interfaces has, nothing more.