Ali is a personal name that was borne by several historical figures. The word "Tun" was an ancient honorific title used by nobility or people of royal lineage.
Tun Ali of Malacca, 15th century Bendahara of the Malacca sultanate of Tamil-Malay ethnicity Tun Ali bin Tun Tahir, grandson of the above, son to Tun Tahir