The Ben Ish Chai in his halachot of Birchat Hamazon writes the following:
ארבע ברכות של ברכת המזון דינם כתפילת שמונה עשרה, ואין לענות בהם אפילו קדיש וקדושה וברכו וכן לשאול בברכת המזון מפני היראה ומפני הכבוד דינו כתפלת שמונה עשרה, ואם ביתו סמוך לבית הכנסת או היו מתפללים מנין בתוך ביתו ושמע מודים ירכין ראשו לצד שהקהל משתחוים, ובשמעו קדיש וקדושה ישתוק וישמע כדין תפלת שמונה עשרה:
From his words we see that there is a specific direction that the kehila is bowing during Modim, and anyone who joins them, wherever that may be, should also bow to that direction.
This is a slightly ambiguous source, as he doesn't actually say they were bowing eastward. However, once we agree that there is a specific direction that all should bow, I'm willing to assume it was toward Yerushalaim, the direction most kehilos face.
As for bowing during Barchu which he does not mention, see here #2 with the footnote.