How can I set backup from machine A to machine B (via WAN), but have the files in destination B encrypted in some level (password per folder\file)? Is there any solution (free or not) to backing up this way?
You can use CryptSync. It will sync your original files to encrypted folder, which can be in Google Drive. So it takes original files from machine A, encrypts them localy to Google Drive folder, and then Google can sync that encrypted folder to machine B.
In addition to CryptSync there is also paid software. Personally, for Windows, I like Acronis TrueImage (home edition is $50 for 1 PC or $80 for 3).
It supports backup encryption with a password and AES 128/192/256 encryption. It also supports automated backups, with incremental backups that only backup modified data and optional compression to keep bandwidth and space usage low. It handles sector-by-sector backups for partitions it is not familiar with either (e.g. Mac and Linux filesystems). You can browse the backups directly in explorer. Also their customer support is very good.
On Windows, it can back up to anything you can mount as a drive; or directly to SMB shares.
The downside is you can only browse the data in the backups from a machine with Acronis installed; since it backs up all data to one big proprietary archive file format - this may or may not be an issue, depending on where you want to access the data from.
Acronis also has backup software for Linux.
For Linux there are a few other options, too. See How to do rsync-like encrypted backup?. In particular, the recommendations there are: