I have a Synology NAS and it's a bit tricky to configure after the DSM 7 update.
First of all, make sure that you have enabled SFTP in Control Panel, File Services. Also note down which port it's using. I will assume it's using the default port 22. You'll see why this is important.
Next up, in the Control Panel, External Access you will see that the Encrypted Terminal Services only has ports 2323 (default SSH port) and 22 (default SFTP port). However, most routers and most ISPs will block port 22 — this is what happened to me. We need to create a different public port. So click on Create, Custom Port, set the Local Port to 22 and the Router Port to 2322. If you cannot manage port forwarding through the NAS you need to do that in your router: have port 2322 accessible from the Internet forward to the NAS' port 22 (SFTP port).
Go to Control Panel, Security, Protection and click on the Allow/Block List. In the Block List remove all IP addresses used by your host. In the Allow List create a new entry with your site's IP address. This makes sure you won't be accidentally auto-banned which I suspect did happen to you since you tried too many times in a row to connect to your NAS unsuccessfully from your server.
Finally, go to Control Panel, External Access, DDNS and make sure that it's set up correctly. This is the hostname you will have to use, e.g. foobar.synology.me.
Now you can set up Akeeba Backup. Remember to use port 2322 and the hostname you saw in the DDNS section of your DSM configuration.
I have used the above with a site hosted on Linode and a Synology DS218+ sitting on the network rack in the office. I was able to transfer backups just fine. I even tried with username/password and username/SSH keys using both SSH connectors in Akeeba Backup to be perfectly sure. No problems whatsoever.
If you still have problems after following these detailed instructions the conclusion is that the problem is outside Akeeba Backup. Your host or ISP could be blocking the connection; try using a different port and talk to your host about the need to upload to an SFTP server which is on a dynamic IP address. Make sure your router forwards the port correctly to your NAS; connect your computer to your phone's 3G/4G/5G connection instead of your office/home WiFi and try connecting with FileZilla (this ensures that you are on an IP address other than the one your Synology NAS Internet connection is on).
Basically, there's nothing in our code preventing you from connecting to your NAS. It's all a question of whether you've correctly configured your NAS, your router, and Akeeba Backup as well as if you have taken into consideration and tested for any IP or port blocking which may occur at the web host or your local ISP level.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!