8
lorentz
6y

Today I wrote a python messenger bot which listens to only one command;
get ip
It then replies with its public IP address. I figured this would be the easiest hotfix until I fix my dynamic DNS client.

Now thinking of it I could also make an "update domain" command for doing the API call, and then link the two with a loop and minute delay. Marvelous.

Comments
  • 2
    I like overengineered solutions....
    But why don't you just setup another ddns domain powered by a different provider (if yours is offline for any reason?)

    DuckDNS is good.
  • 1
    @shelladdicted There's nothing wrong on the provider side (I use dynu btw) I just failed to set up ddclient (probably didn't start the Daemon. Would totally be me.). The biggest problem is that I only get to test the whole thing every few days at random, and since I don't live there, if it fails I can't access the whole machine until someone who does sends me the IP address.
  • 3
    curl (ipv(4|6)\.)?icanhazip\.com
  • 1
    @tokumei curl ifconfig.co
Add Comment