Score:0

Do I need to restart a daemon after creating a Windows Firewall rule?

cn flag

I have a daemon running in a Windows Server 2019 with blocked outbound traffic.

I have a firewall rule for the daemon's executable that allows outbound traffic and it is working well. But as part of a periodic automatic environment refresh, I delete this firewall rule and create it again with exactly the same configuration and name. When I remove the rule, the daemon stops having external access. But after the recreation, the daemon don't get external access back until I restart it (the daemon, not the server).

Coming from other SOs, so I'm not used to this. Is this the normal behaviour? I already tried to do a flush on ARP table but doesn't solve it. Is there any way I can avoid to restart the daemon?

Edit: As the accepted answer says, there is no need to reboot the process. To clarify what was happening: The binary was located in a VHD. Windows Firewall uses the binary's path to setup the rule, but the path is stored using its internal name, e.g. device\harddiskvolume0\ instead of D:. Every time the VHD was recreated the rule's internal name changed, making the rule ineffective until we restart the daemon. Restarting the daemon after the creation of the rule fixed the issue.

Score:1
cn flag

That depends. The firewall will opened the port in the second 'ok' is clicked.

But: if the initial connection was blocked and the deamon does not initiate a new one by itself, all ports remain in TCPSTATE_CLOSED state. Some apps do this and need a restart to initiate a new socket.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.