{"id":13571840,"url":"https://github.com/theonemule/no-ip","last_synced_at":"2025-04-04T08:32:39.290Z","repository":{"id":28885360,"uuid":"32409970","full_name":"theonemule/no-ip","owner":"theonemule","description":"A shell script that works as Dynamic Update Client (DUC) for noip.com","archived":false,"fork":false,"pushed_at":"2024-03-16T00:11:18.000Z","size":18,"stargazers_count":119,"open_issues_count":1,"forks_count":47,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-02T14:10:37.368Z","etag":null,"topics":["dynamic-dns","dynamic-update-client","no-ip"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zeit/micro-dev","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theonemule.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-17T17:44:19.000Z","updated_at":"2024-07-20T17:42:51.000Z","dependencies_parsed_at":"2022-08-05T13:34:41.194Z","dependency_job_id":null,"html_url":"https://github.com/theonemule/no-ip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theonemule%2Fno-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theonemule%2Fno-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theonemule%2Fno-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theonemule%2Fno-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theonemule","download_url":"https://codeload.github.com/theonemule/no-ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223118378,"owners_count":17090259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamic-dns","dynamic-update-client","no-ip"],"created_at":"2024-08-01T14:01:07.074Z","updated_at":"2024-11-05T04:31:49.427Z","avatar_url":"https://github.com/theonemule.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"I'm probably not the first one to do this, but I had a need to use NO-IP's dynamic DNS service so I could easily configure devices and computers to access resources on my LAN when I'm away. For those less familiar with NO-IP, it is a free dynamic DNS service. Most home and small office connections to the Internet have a dynamic IP, which means the IP addresses changes most every time the connection from the router is established. Typically, a domain name requires a static IP address to work. Dynamic DNS  allows  a domain name (i.e subdomain.example.com) to use a dynamic IP by updating NO-IP with a new IP address when the IP address changes. NO-IP then associates that IP with the domain name so services can be setup against the domain rather than the IP that changes. This makes configuring things easier.\n\nMany routers have a built in NO-IP client, but my router doesn't support NO-IP, and for whatever reason, I could never get the client that NO-IP recommended for a Linux host to work. I downloaded the source and compile it following the instructions, and it appeared to be running, but it never updated my IP address. There was no output to the console or to a log file either to diagnose the problem that I could find, so I decided to go about writing my own, which really wasn't that hard to do using a bash script and a few simple utilities on my Linux box. Here is my how-to guide and documentation for setting this up. I'm running Ubuntu server so I'm using apt and nano, but this should work on anything POSIX based such as Mac OS X, BSD, any flavor of Linux -- even the Raspberry Pi.\n\nThe script can be run as a single instance with command line parameters, as a daemon, using crontabs (a utility for running programs on a schedule) or as a Linux service. \n\nThis script has one dependency, which is wget. This is usually installed by default on most Linux and BSD distros, but if not use your package manager to install it.\n\n      sudo apt-get install wget\n\n-or-\n\n      sudo yum install wget\n\n\nUsage:\n------\n\n      no-ip.sh -u=username -p=password -h=host.sample.com -d=true -l=/path/to/logfile.log\n\n\nParameters:\n\n    -u, --username \n\nUsername to logon to no-ip.com.\n\n    -p, --password\n\nPassword to logon to no-ip.com.\n\n    -h, --hostname\n\nThe domain name to update.\n\n    -d, --detectip\n\nTells the script to detect your external IP address. This takes precedence over -i.\n\n    -i, --ip\n\nMaually sets the IP address to update. If neither -d or -i are specified, no-ip will use the IP address it detects.\n\n    -n, --interval\n\nWhen running the script as a daemon/service (see Installation), this will update no-ip every n minutes.\n\n    -l, --logfile\n\nSets the path to a log file. This file must be writable.\n\n    -c, --config\n\nSets the path to a config file. This file must be readable. Config file parameters take precedence over command line parameters.\n\n\n\nExamples:\n---------\n\n    no-ip.sh \n\nRuns the script with the settings in the config file in the default locaion /etc/no-ip/no-ip.conf\n\n    no-ip.sh -u=username -p=password -h=host.sample.com -d=true -l=/path/to/logfile.log\n\nDoes a one-time update, detecting the UP and logging the results\n\n    no-ip.sh -c=/home/username/no-ip.conf\n\nRun the script with the settings in the config file.\n\n    no-ip.sh /dev/null 2\u003e\u00261 \u0026\n\nRuns the script as a daemon with the settings in the config file in the default locaion /etc/no-ip/no-ip.conf.\n\nConfig File:\n------------\n\nThe config file uses a simple syntax to define parameters. Any command line parameter (except --config) can also be specified in the config file. The same rules apply for the config file parameters as caommand line parameters (ie. \"detectip\" overrides \"ip\" if both are specified).\n\nExample:\n\n    user=username \n    password=password \n    hostname=hostname.example.com\n    logfile=/var/log/no-ip.log\n    interval=10\n    detectip=true\n\n\nInstallation:\n-------------\n\n**Before installing the script, download and extract the files to your local machine. The instructions assume your are in the no-ip-master folder.**\n\n      cd ~\n      wget https://github.com/theonemule/no-ip/archive/master.zip\n      unzip master.zip\n      cd no-ip-master\n      \n\nMethod 1: crontabs\n\nCrontabs allows you to specify a schedule to run the script and it will also run the script as the user the crontab is configured for. Make sure that the user has execute permissions on the script, read permissions on the config file, and write permissions to the log file. **Crontabs will run the script on a scheduled basis so there is no need to specify an interval.**\n\nHere's how to run the script as root.\n\n1.) Create a folder in etc.\n\n    sudo mkdir /etc/no-ip\n\n2.)  Create a config file.\n\n    sudo touch /etc/no-ip/no-ip.conf\n\n3.) Set the parameters with your favorite editor. I use nano.  See the Config File section above for details.\n \n\n    sudo nano /etc/no-ip/no-ip.conf\n    \n    user=username \n    password=password \n    hostname=hostname.example.com\n    logfile=/var/log/no-ip.log\n    detectip=true\n\n4.) Copy no-ip.sh to /usr/sbin\n\n    sudo cp no-ip.sh /usr/sbin/no-ip.sh\n\n5.) Make the script executable\n\n    sudo chmod +x /usr/sbin/no-ip.sh\n\n6.) Logon as root\n\n    sudo -i\n\n7.) Edit root's crontab\n\n    crontab -e\n\n8.) Add the entry to the bottom. */10 tells crontab to run the script every time the current time is divisble by 10, or every 10 minutes and save the crontab.\n\n    */10 * * * * /usr/sbin/no-ip.sh\n\n\nMethod 2: Linux Service (written for Debian-based distros. This will vary for other distros)\n\nMake sure root has execute permissions on the script, read permissions on the config file, and write permissions to the log file. \n\n1.) Create a folder in /etc.\n\n    sudo mkdir /etc/no-ip\n\n2.) Create a config file.\n\n    sudo touch /etc/no-ip/no-ip.conf\n\n3.) Set the parameters with your favorite editor. I use nano.  See the Config File section above for details.\n\n    sudo nano /etc/no-ip/no-ip.conf\n    \n    user=username \n    password=password \n    hostname=hostname.example.com\n    logfile=/var/log/no-ip.log\n    interval=10\n    detectip=true\n\n4.) Copy no-ip.sh to /usr/sbin\n\n    sudo cp no-ip.sh /usr/sbin/no-ip.sh\n\n5.) Make the script executable\n\n    sudo chmod +x /usr/sbin/no-ip.sh\n\n6.) Copy no-ip-service to init.d\n\n    sudo cp no-ip-service /etc/init.d/no-ip-service\n\n7.) Make no-ip-service executable\n\n    sudo chmod +x /etc/init.d/no-ip-service\n\n8.) Start the service\n\n    sudo service no-ip-service start\n\n9.) Add the service to start at boot.\n\n    update-rc.d no-ip-service defaults\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheonemule%2Fno-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheonemule%2Fno-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheonemule%2Fno-ip/lists"}