How to find which ports are blocked
If I just scan port 5900 from A I get
nc -v -w 1 B -z 5900
If you have a mean router in between which answers TCP requests instead of dropping them, you can find out by binding to all ports (warning, you could run out of system resources doing this! Maybe try with ~1000 ports at a time):
for i in {1..65535} ; do nc -l $i & done