A police investigation is underway after a man was arrested with a gun at an Australian airport.