Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pvico/get-server-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-server-ip

version

A utility to find the (dynamic) IP of a server.

It will

  • check the Github gist file containing the IP
  • check all the dynamic DNS services addresses pointing to this IP
  • do that concurrently and with a time bound duration
  • return the IP if at least the Github gist file IP and one DDNS service IP are the same
  • return the IP matching at least two of the DDNS services if there is no match between the Github gist file IP and one dns service IP (e.g. if the Github gist file IP is not available)

These IP sources are updated by some external automation (e.g. n8n workflow, node-red, etc.).

Configuration

Configure the gist file URI and the DDNS service domains URI's in the config.json file. This file must be located in a subdirectory .get-server-ip of the cli executable location.

Usage

./get-server-ip

If using as input in another command, be sure to discard the stderr output:

ssh -p 2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$(get-server-ip 2>/dev/null)"

About

Command line utility to retrieve the dynamic IP address of a server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages