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 12:01] – [ip-change-detect.sh] oscar | networking:ziggo:changed-ip [2026/08/30 06:48] (current) – oscar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Changed Ziggo IP ====== | ====== Changed Ziggo IP ====== | ||
| - | ===== IPv6 change ===== | ||
| - | When Ziggo change our IPv6 range/ | ||
| - | The following steps are required: | ||
| - | - Get the new IP address that our webserver assigned himself via SLAAC. | ||
| - | - Update the TransIP AAAA record with the new IP of the webserver | ||
| - | - On the router update: network/ | ||
| - | - On the router update: network/ | ||
| - | ===== IPv4 change ===== | + | ---- |
| + | ===== Introduction ===== | ||
| + | |||
| + | On the main OpenWrt router a sccript is running every 2 hours to detect a change in assigned | ||
| + | |||
| + | ===== IPv4 Change - Actions | ||
| When Ziggo change our IPv4 address. The following steps are required: | When Ziggo change our IPv4 address. The following steps are required: | ||
| - Check via external website what our used IPv4 is | - Check via external website what our used IPv4 is | ||
| Line 14: | Line 12: | ||
| - Update the TransIP A record with the new IP of the webserver | - Update the TransIP A record with the new IP of the webserver | ||
| - | ====== Monitor ====== | + | ===== IPv6 Change - Actions |
| - | On the main OpenWRT router a script is running to monitor changed | + | When Ziggo change our IPv6 range/ |
| - | | + | The following steps are required: |
| - | | + | - Get the new IP address that our webserver assigned himself via SLAAC. |
| - | ===== OpenWRT prerequisites ===== | + | |
| - | For sending notification email install the following package on the router: | + | - On the router update: network/ |
| - | mailsend | + | |
| - | ===== ip-change-detect.sh ===== | + | Note that the routers IPv6 WAN address |
| - | 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.1726228868.txt.gz · Last modified: by oscar
