Skip to content

Commit

Permalink
Hidd the IP address of WAN & IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Dec 31, 2024
1 parent 6d33958 commit 622a515
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build-armbian/armbian-files/common-files/usr/sbin/armbian-fix
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,14 @@ todo_rootfs_resize="/root/.no_rootfs_resize"
tolog "92. Update the MAC address for the wireless network card"
}

# Hidd the IP address of WAN
# Hidd the IP address of WAN & IPv6
[[ -f "/etc/update-motd.d/10-armbian-header" ]] && {
# Hide the IP address of WAN
sed -i 's|curl.*akamai.*|curl --connect-timeout 2 -s http://whatismyip.akamai.com/ \| sed -E '\''s/(\.[0-9]+){2}$/.\*\*\*\.\*\*\*/'\''|' \
/etc/update-motd.d/10-armbian-header
tolog "93. Hide the IP address of WAN"
/etc/update-motd.d/10-armbian-header 2>/dev/null
# Hide the IPv6 address
sed -i 's|IPv6: \\x1B.*\\x1B\[0m||g' /etc/update-motd.d/10-armbian-header 2>/dev/null
tolog "93. Hide the IP address of WAN & IPv6"
}

# Show end message
Expand Down

0 comments on commit 622a515

Please sign in to comment.