Changing IP in LXC container #2023

Closed
opened 2025-11-20 05:22:02 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @brunomgrocha on GitHub (Oct 7, 2025).

📌 Task summary

Container LXC

📋 Task details

Hi,
Anyone already try to change an ip from the lxc container. This week i switch my whole lan to another network, the lxc containers respond fine with the new ips, but i keep seeing the old ip when i made a login into the container.

as an example

CasaOS LXC Container
🌐 Provided by: community-scripts ORG | GitHub: https://github.com/community-scripts/ProxmoxVE

🖥️   OS: Debian GNU/Linux - Version: 12
🏠   Hostname: casaos
💡   IP Address: 192.168.86.12

this lxc container has a new ip address in a different range and its working fine. I've checked everywhere i could remember and the new ip is there. I just dont understand were this information is coming from.

thanks

Originally created by @brunomgrocha on GitHub (Oct 7, 2025). ### 📌 Task summary Container LXC ### 📋 Task details Hi, Anyone already try to change an ip from the lxc container. This week i switch my whole lan to another network, the lxc containers respond fine with the new ips, but i keep seeing the old ip when i made a login into the container. as an example CasaOS LXC Container 🌐 Provided by: community-scripts ORG | GitHub: https://github.com/community-scripts/ProxmoxVE 🖥️ OS: Debian GNU/Linux - Version: 12 🏠 Hostname: casaos 💡 IP Address: 192.168.86.12 this lxc container has a new ip address in a different range and its working fine. I've checked everywhere i could remember and the new ip is there. I just dont understand were this information is coming from. thanks
Author
Owner

@michelroegl-brunner commented on GitHub (Oct 7, 2025):

You need to update the message of the day on your lxc

@michelroegl-brunner commented on GitHub (Oct 7, 2025): You need to update the message of the day on your lxc
Author
Owner

@MickLesk commented on GitHub (Oct 8, 2025):

Newer Scripts do this Automatic after reboot, is it an old Script edit following File:

/etc/profile.d/00_lxc-details.sh

@MickLesk commented on GitHub (Oct 8, 2025): Newer Scripts do this Automatic after reboot, is it an old Script edit following File: /etc/profile.d/00_lxc-details.sh
Author
Owner

@brunomgrocha commented on GitHub (Oct 9, 2025):

That file does not exist for instance on CasaOS LXC

/etc/profile.d# ls
bash_completion.sh

@brunomgrocha commented on GitHub (Oct 9, 2025): That file does not exist for instance on CasaOS LXC /etc/profile.d# ls bash_completion.sh
Author
Owner

@MickLesk commented on GitHub (Oct 9, 2025):

Then is your lxc very old and with the old method. It was stored in motd

@MickLesk commented on GitHub (Oct 9, 2025): Then is your lxc very old and with the old method. It was stored in motd
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#2023