This script automatically adds IP address as tags to LXC containers using a Systemd service. The service also updates the tags if a LXC IP address is changed.
Configuration: nano /opt/lxc-iptag/iptag.conf
. iptag.service must be restarted after change.
The Proxmox Node must contain ipcalc and net-tools. apt-get install -y ipcalc net-tools
To use the Proxmox VE LXC IP-Tag script, run the command below within the Proxmox shell
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/add-lxc-iptag.sh)"