Probably they're old friends, but there is a possibility of a fight between the two, because they've participated in both Second and Third Great War, in which Konoha and Iwa were enemies.
well... hiruzen might be the strongest among the gokages.. but i think the most significant attributes is his intellect and analytical abilities among the gokages.. that's what make him a fearsome chap.. even though the chapter shows he only used shuriken kage bunshin(which is not that impressive) but he used it to analyse juubito's ability and guess what, he figured out its a 4 elemental combination tech... that is something from hiruzen
Both of them knew Madara as kids.Both of them probably face each other before they were Kages and as Kages Negotiated treaties with each other and saw each other in chunin exams.
In the past, They might battled against each other in 2nd or 3rd ninja war. They were not just sitting in the village, goofing around with ladies and distributing missions.