Excellent post! This really helped a lot!
I'm using a Mac and I'm using AFP in order to set-up my time-machine backups. The only issues I faced is that when I'm at home and connected to the local network, the AFP drive is connected based on IP: 196.168.X.X.
However, when using the remote access as below:
ssh -L 15548:192.168..X.X:548 -p 13579
username@XXX.hopto.org
The AFP drive is connected to the hostname 'localhost'.
This creates as issue as Time Machine thinks that they're not the same, and wouldn't back-up.
Do you have any idea how I can configure remote access to AFP and yet still keep the existing IP address (192.168.X.X) when connecting to the AFP?