Dutchman Ten Hag coached Bayern's reserves from 2013 to 2015 before returning to his homeland to join FC Utrecht.
The 49-year-old then moved to Ajax and led the powerhouse to the Eredivisie title last term, as well as the Champions League semi-finals.
Bayern have struggled for consistency in the Bundesliga this season and sit third in the table, just one point above ninth-placed Bayer Leverkusen.
As a result, Bayern coach Niko Kovac's future has been the subject of speculation, and when asked by Kicker if he would be open to going back to the Bundesliga giants, Ten Hag said: "I do not exclude anything."
"But I'm almost 50 and [I am] not a dreamer. It comes - or it does not come."
Asked to comment on his time in Munich, Ten Hag added: "For me, it was about coming to an association like Bayern.
"Pep Guardiola was there, and more importantly, [sporting director] Matthias Sammer with his strategic approach and mentality, which he brings to a club.
"Under Guardiola, Bayern played dominant [football] … everyone on the pitch knew what he had to do."
Despite the big-money departures of Matthijs de Ligt and Frenkie de Jong, Ajax have started the 2019-20 campaign in good fashion, winning eight of a possible 10 Eredivisie matches to top the table, three points ahead of rivals PSV.