Promoted to captain on 17 July 1824, Dundas took command of the sixth-rate HMS "Volage" on the North America and West Indies Station in September 1825 and then of the third-rate HMS "Warspite" on the East Indies Station in December 1826. He became secretary to his father, who was serving a second term as First Lord of the Admiralty, in 1828. He went on to take command of the fifth-rate HMS "Belvidera" in the Mediterranean Fleet in November 1830 and the third-rate HMS "Melville", Flagship of the East Indies Station, in September 1837. In HMS "Melville" he took part in the capture of the Bogue forts in January 1841 during the First Opium War. He was appointed a Companion of the Order of the Bath on 29 June 1841.