Add firewall rule via command line

edited January 2022 in General Topics

I need remote access to my computer, and I have set a custom port on Remote Desktop to deter hackers. I created a rule in the firewall set to just that port number. All was well.

Last week Bitdefender needed the computer to be rebooted. When that happened, it apparently deleted that rule from the firewall. I consider this a bug. Nonetheless, I didn't discover it until I was unable to access the computer remotely. I had to make an unscheduled trip back to the computer's location to restore the deleted rule

To deal with this in the future, I need a non-GUI, command line program which can add firewall rules. I would call it from the task scheduler, to be triggered when the computer boots up. Does Bitdefender have this utility, or is considering providing one in the near future?

This utility would also be useful as an import/export tool to archive multiple firewall rules, and for rapid/consistent deployment to multiple computers.