[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cron job for inxi -i reports WAN IP: <filter>



Hello,

On Sat, Sep 06, 2025 at 09:58:57AM -0400, Greg Wooledge wrote:
> On Sat, Sep 06, 2025 at 12:36:15 +0000, Andy Smith wrote:
> > "inxi" sounds like a terrible way to programmatically find your IP
> > address. I would most likely use the "ip" command and any of its
> > machine-readable output formats.
> 
> How would that work?  "ip" only know about the IP addresses of the
> machine it runs on, right?

You're right, I didn't spot the "WAN" part and thought it was just the
IP address on the interface.

It still seems a bit odd to use inxi for it but I suppose it's a very
simple way for people that don't want to do any scripting of any kind.

It's a pity that there's no way to do it without consulting some remote
device — I assume inxi is also doing it this way. I can think of some
ways to do it but they all depend too much on how your network is
working.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: