cli: introduce test mode and refuse firewall restart on errors