How to get public ip. No access to config files

Edit: I’m 300 miles away and not on the home network, sorry I typed that at one point but had to start post over.

As title states I need get my public IP of my house, and so far everything I see requires me to edit the ymal files which I currently don’t have access remotely (hence needingpublic IP)

Also I’m running it in a Docker container so I don’t have the ability to install the file editor (at least couldn’t in past)

Attempting to install DNSIP results in an Unknown error.

I do have NabuCasa so i can get to the interface.
Any suggestions would be greatly appreciated

Hello,
I don’t know if I undestand well your issue but you can try to go to this site : https://ifconfig.co/ with your browser or a command line tool like curl for example.

It will display your public ip address.

https://ifconfig.me/ works the same way.

Regards.

So many questions.

To answer your most basic question. Without getting your specific setup most people sit behind a router and use network address translation. Short version - means everything at your house uses the same ip address and everyone behind the router gets the same one and unless you set it up manually in one of your integrations it likely isn’t listed in your HA confg… If you are currently on a device or computer with a web browser and on the same network as your HA install. The just go to any of the publicly available websites that will reflect your IP addresses… Like this website :

https://whatismyipaddress.com/

If you’re not at home then you’re going to need to figure out how to get to your router. Remotely.

If you have the SSH add-on then curl api.ipify.org will give your public IP.

1 Like

I’m 300 miles away and not on the home network, sorry I typed that at one point but had to start post over.

I’m 300 miles away and not on the home network, so trying to do this remotely

Trying to do this remotely as I’m 300 miles from home at the moment

Then before we all say you’re hosed… what DO you have access to.

I have Unifi access, but not able to find the IP there. I have NabuCasa, so I can access my Home assistant remotely, but nothing that requires command line access. It’s also a Docker Container so some things like SSH/Configuration Editor can’t be installed.

I have found this Rest/Json result Service that just returns public API, though not been able to figure out how to call it without setting up a sensor in the configuration.yaml

Been a while since I’ve left the house and forgot to get the IP before hand so I can access my VPN.

What’s your install type. If you can install addons you can install the SSH addon and run @FriedCheese 's suggestion

Docker, can’t install the AddOns

Gotcha. I’m Running through this thread for various methods to create a command line sensor to grab your IP…

Im sure something here will do the trick.

Are you not getting your public IP from Settings → Internet?

Yes, but the IP I’m getting there doesn’t seem correct. I’m guessing the IP here is the one the Router is assigning to the Unifi system internally.

image

Double NAT, big oof, but that’s besides your issue.

thank you for the suggestion, seems like it all revolves around the editing of config files which I can’t do remotely. Also the DNSip, which still fails to install for me for some reason (nothing in logs)

From the Unifi UI go to Settings → System and under the Advanced section, enabled debug tools:

Go to the devices page and select one of your devices. Go to the settings tab and select Debug. In the terminal window, use the curl command I provided above.

I don’t think Unifi Access will give it if op is behind double NAT. The network controller definitely does but im not sure about Access. Protect and Talk definitely don’t (i just checked)

The curl command is using the API call to get the IP that the website sees. Doesn’t matter about double nat and whatnot.

1 Like

Agreed that’s the way to do it. But if op can’t edit files and can’t VPN in to be behind the firewall I just don’t see how they get it.