GithubHelp home page GithubHelp logo

phzzz / noip-renew Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neothematrix/noip-renew

0.0 0.0 0.0 420 KB

Auto renew (confirm) noip.com free hosts

Home Page: https://hub.docker.com/r/moebiuss/noip-renew

License: Apache License 2.0

Shell 37.87% Python 58.51% Dockerfile 3.62%

noip-renew's Introduction

Docker Image CI

Script to auto renew/confirm noip.com free hosts

noip.com free hosts expire every month. This script auto clicks web pages to renew the hosts, using Python/Selenium with Chrome headless mode.

NOTE: this is an up-to-date fork of loblab/noip-renew repository as it seems it's not anymore actively developed, I'll try to keep this fork up to date and working as much as possible. Feel free to contribute!

  • Platform: Debian/Ubuntu/Raspbian/Arch Linux, no GUI needed (tested on Debian 9.x/10.x/11.x/Arch Linux); python 3.5+
  • Chrome webdriver - tested up to version 120.0.6099.102-rpt1
  • Selenium - v.3.x (python 3.5+); v. 4.0.0 (python 3.7+); v.4.10.0 and above (python 3.8+); Tested up to v. 4.17.2
  • Ref: Technical explanation for the code (Chinese)
  • Created: 11/04/2017
  • Original Author: loblab
  • Fork Mantainer: neothematrix
  • Contributors: Angel0ffDeath, benyjr

noip.com hosts

Prerequisites

ENABLE 2FA authentication on your account and save the 2FA Secret key that is shared only once when you activate it

ChromeDriver is required for the script to interface with noip.com from within the script. ChromeDriver must be maintained to match the installed version of Chrome. There is no automated repository that provides ChromeDriver package beyond Ubuntu 18 LTS. Installing Chromium via Snap and then linking chromedriver to /usr/bin/chromedriver should keep chromediver sufficiently up to date without manual intervention

Usage

  1. Clone this repository to the device you will be running it from. (git clone https://github.com/neothematrix/noip-renew.git)
  2. Run setup.sh and set your noip.com account information,
  3. If you want to use randomized cronjob answer y to the question and give time interval hours, i.e. 7-18 (for instance). This will give a window from 7:00 to 18:59; Take into account it is possible script to try to run on days on which Daylight Saving Time (DST) occurs (if you have such thing in your country), so avoid hours in which this event occurs, otherwise the scrippt may not run. For instance in Europe DST events are last Sundays of March and October at 3AM (March) or 4AM (October). Script probably will not run on the DST day in March if scheduled between 3 and 4 AM. It is too complicated to incorporate such logic, but if someone would like then try.
  4. Run noip-renew-USERNAME command.

Check confirmed records from multiple log files:

grep -h Confirmed *.log | grep -v ": 0" | sort

Usage with Docker

For docker users you need to define the following ENV variables:

'NOIP_USERNAME = <your username>'
'NOIP_PASSWORD = <your password (plain not base64 encoded)>'
'NOIP_2FA_SECRET_KEY = <your 2FA secret key that appeared when you setup 2FA>'
NOIP_DEBUG = <optional, defaults to 1>

so you can run the following:

echo -e "$(crontab -l)"$'\n'"12  3  *  *  1,3,5  docker run --rm --network host -e 'NOIP_USERNAME=<your_username>' -e 'NOIP_PASSWORD=<your_password>' -e 'NOIP_2FA_SECRET_KEY=<your 2fa secret key>' -e NOIP_DEBUG=2 moebiuss/noip-renew" | crontab -

NOTE: with newer versions of ChromeDriver (>v99) you might need to increase the shm size of the container otherwise ChromeDriver will crash and throw an exception. To do it, you can just add the "--shm-size="512m" flag to the docker run command.

Remarks

The script is not designed to renew/update the dynamic DNS records, but only to renew the hostnames expiring every 30 days due to the free tier. Check noip.com documentation for that purpose. Most wireless routers support noip.com. For more information, check here. You can also check DNS-O-Matic to update multiple noip.com DNS records.

noip-renew's People

Contributors

neothematrix avatar loblab avatar idemixi avatar angel0ffdeath avatar benyjr avatar ikerurle avatar cactooz avatar snakuzzo avatar lorenzoracca avatar tomoli75 avatar ray1025 avatar ridgarou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.