Right now, iptables and port mapping are updated when a container is created, but now when it is DELETED. This becomes a problem when custom routing is assigned to ports that are never used, since the container does not exist. Additionally, users can not use the same name for a container as a previously deleted container, since that container still exists in port_map.json.
Solution: Write a script on pct destroy (if possible) or a CRON job that automatically detects deleted containers and updates iptables and port maps.
Right now, iptables and port mapping are updated when a container is created, but now when it is DELETED. This becomes a problem when custom routing is assigned to ports that are never used, since the container does not exist. Additionally, users can not use the same name for a container as a previously deleted container, since that container still exists in
port_map.json.Solution: Write a script on pct destroy (if possible) or a CRON job that automatically detects deleted containers and updates iptables and port maps.