If you are receiving error like:

Failed to add rule 'xxx.xxx.xxx.xxx to xxx.xxx.xxx.xxx' to firewall. Please add it manually.

Then first go to SQL databases, like on the picture:

After go to servers, and click on the server which you want to configure:

Then click configure:

And here you can add your rule: