I see. When this happens, in your router, do you have anything that can detect this.
If yes you can write a script to restart your firewall.