Am I doing this right ?
I crept up with a heavy infantary under a bluff. I attack the widerstandsnest above.(using the weapons for ranged attack) while a HQ is adjacent to that unit. A tank unit is also in command of the HQ and joins the attack. All free actions.
I'm going to go on a couple of assumptions, I'm sorry but some important details are missing in the way you have written this. I don't mean an insult if I have ...
I'm assuming because your "using the weapons for ranged attack" your heavy infantry is not adjacent to the WN position.
Do you have a unit adjacent to the WN position also involved in the attack? If not the attack is not valid.
I'm at work and do not have my rules in front of me but... re-read the section about attacking. You will see that in order for an attack to be valid you have to have at least one unit adjacent to the position attacking with the Heavy Infanty to be able to use it's range ability.
As for your question about free actions.... Yes the Heavy Infantry and the Tank would act for free if adjacent to the HQ. They would support an attack on the WN that was being conducted by another unit that is adjacent to the WN.