networking:ziggo:changed-ip
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| networking:ziggo:changed-ip [2024/09/13 11:51] – oscar | networking:ziggo:changed-ip [2026/08/30 06:48] (current) – oscar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Changed Ziggo IP ====== | ====== Changed Ziggo IP ====== | ||
| - | ===== IPv6 change ===== | + | |
| + | ---- | ||
| + | ===== Introduction ===== | ||
| + | |||
| + | On the main OpenWrt router a sccript is running every 2 hours to detect a change in assigned IPv4 and IPv6 addresses. It compares the current system IP addresses with what is recorded in the DNS. Information about the installation, | ||
| + | |||
| + | ===== IPv4 Change - Actions ===== | ||
| + | When Ziggo change our IPv4 address. The following steps are required: | ||
| + | - Check via external website what our used IPv4 is | ||
| + | - Check if our router has this already new IP address: Network/ | ||
| + | - Update the TransIP A record with the new IP of the webserver | ||
| + | |||
| + | ===== IPv6 Change - Actions | ||
| When Ziggo change our IPv6 range/ | When Ziggo change our IPv6 range/ | ||
| The following steps are required: | The following steps are required: | ||
| Line 8: | Line 20: | ||
| - On the router update: network/ | - On the router update: network/ | ||
| - | ===== IPv4 change ===== | + | Note that the routers |
| - | When Ziggo change our IPv4 address. The following steps are required: | + | |
| - | - Check via external website what our used IPv4 is | + | |
| - | - Check if our router has this already new IP address: Network/ | + | |
| - | - Update the TransIP A record with the new IP of the webserver | + | |
| - | + | ||
| - | ====== Monitor ====== | + | |
| - | On the main OpenWRT router a script is running to monitor changed IP addresses. It compares | + | |
| - | * DNS as registered at TransIP with: nslookup -type=a | + | |
| - | * IP address as observed by external websites, with: wget -4 --quiet -O - https:// | + | |
| - | ===== ip-change-detect.sh ===== | + | |
| - | The following script | + | |
| - | < | + | |
| - | # nano /root/ | + | |
| - | ------------------------------------ | + | |
| - | # | + | |
| - | # | + | |
| - | # OdG 13/ | + | |
| - | # | + | |
| - | DNS_1=" | + | |
| - | DNS_2=" | + | |
| - | DNS_3=" | + | |
| - | STATUS_V4=" | + | |
| - | STATUS_V6=" | + | |
| - | MAIL_FILE="/ | + | |
| - | MAIL_HEADER=">> | + | |
| - | + | ||
| - | # Get the IPv4 DNS registrations & currenty used IP | + | |
| - | IP4_DNS=$(nslookup -type=a | + | |
| - | RESPONSE=$(wget -4 --quiet -O - https:// | + | |
| - | RESPONSE=${RESPONSE: | + | |
| - | IP4_1=$(echo $RESPONSE | cut -d . -f 1 ) | + | |
| - | IP4_2=$(echo $RESPONSE | cut -d . -f 2 ) | + | |
| - | IP4_3=$(echo $RESPONSE | cut -d . -f 3 ) | + | |
| - | IP4_4=$(echo $RESPONSE | cut -d . -f 4 ) | + | |
| - | IP4_CURRENT=$IP4_1" | + | |
| - | + | ||
| - | # Get the IPv6 DNS registrations & currenty used IP | + | |
| - | RESPONSE=$(nslookup -type=aaaa | + | |
| - | IP6_DNS=${RESPONSE: | + | |
| - | RESPONSE==$(wget -6 --quiet -O - https:// | + | |
| - | IP6_CURRENT=${RESPONSE: | + | |
| - | + | ||
| - | if [[ $IP4_DNS != $IP4_CURRENT ]] ; then | + | |
| - | | + | |
| - | fi | + | |
| - | if [[ $IP6_DNS | + | |
| - | STATUS_V6=" | + | |
| - | fi | + | |
| - | #if [[ $STATUS_V4 == " | ||
| - | if [[ 1 ]] ; then | ||
| - | | ||
| - | echo " | ||
| - | echo " | ||
| - | echo " | ||
| - | echo " | ||
| - | echo "" | ||
| - | echo " | ||
| - | echo " | ||
| - | echo " | ||
| - | echo " | ||
| - | | ||
| - | mailsend -f root@openwrt -t oscar@oscardegroot.nl -smtp 192.168.178.83 -sub " | ||
| - | rm $MAIL_FILE | ||
| - | fi | ||
| - | | ||
| - | exit 0 | ||
| - | </ | ||
| - | ===== Crontab Scheduling ===== | ||
| - | Add the following line via the OpenWRT GUI (System/ | ||
| - | 0 0-23/3 * * * / | ||
| - | This runs the check every 3 hours between 0-23 hours every day | ||
networking/ziggo/changed-ip.1726228275.txt.gz · Last modified: by oscar
