Sample script for updating current IP in dd-wrt, open-wrt and other linux based OS

Sample Script (Cloudflare) #!/bin/bashGET_LATEST_IP=”curl ifconfig.co”LATEST_IP=`$GET_LATEST_IP`#echo $LATEST_IPCLOUDFLARE=”curl -X PUT \”https://api.cloudflare.com/client/v4/zones/ZONE-ID/dns_records/DNS-RECORD-ID\” -H \”X-Auth-Email: AUTH-EMAIL-ADDRESS\” -H \”X-Auth-Key: AUTH-KEY\” -H \”Content-Type: application/json\” –data ‘{\”type\”:\”A\”,\”name\”:\”DOMAIN-NAME\”,\”content\”:\”$LATEST_IP\”,\”ttl\”:1,\”proxied\”:false}'”RESPONSE=`$CLOUDFLARE`#echo $RESPONSE Sample ID format:ZONE-ID: xxx517f1e30dbxxxc1f8be73xxx6ab2aDNS-RECORD-ID: xxxd3db8axxx026xxx95876a77703fe1AUTH-EMAIL-ADDRESS: name@email.comAUTH-KEY: xxxa30184b74axxx8b3e67xxx5d426fe7xx16DOMAIN-NAME: xxx.yyy.com Get Latest IP curl ifconfig.co > /root/ip Get ZoneID curl -X GET “https://api.cloudflare.com/client/v4/zones” \-H “X-Auth-Email: AUTH-EMAIL-ADDRESS” \-H “X-Auth-Key: AUTH-KEY´╗┐” \-H “Content-Type: application/json” List DNS Records curl […]

Reset Debian Password

In the boot menu, edit the default kernel scripts by pressing “e” (select the kernel file you need to edit). Local the line with the keyword starting with “kernel” or “linux”, at the end of the line, insert: init=/bin/bash Then save and reboot (usually Ctrl-X or F10). You can then mount the harddrive in the […]