As the comments have stated; Gentile ancestry is tribal, and therefore strictly paternally-traced as far as halacha is concerned. Halacha doesn't really care if someone's a Dudanite or Caphtorite; but it does matter if they're Ammonite, Moabite, Edomite, or Egyptian. Regardless, it follows the father.
However it's kind of a moot point today, as we operate with the assumption that all the ancestral lines as of Moses' time have since been sufficiently mixed up that no one is a certified Ammonite, Moabite, or the like anymore.
Any non-Jew, should s/he convert and accept the mitzvot ... is a
full-fledged Jew ... and may marry into the Jewish mainstream, with
four exceptions: Amon, Moab, Egypt, and Edom -- a convert from these
nations is a full-fledged Jew except regarding marrying into the
Jewish mainstream.
Amon and Moab -- their converts may never marry into the Jewish
mainstream ... however this only applies to a male convert marrying a
mainstream Jewish female; the reverse is permitted.
Egyptian and Edomite -- male or female, the first two generations may
not marry into the Jewish mainstream.
An Ammonite male convert who married an Egyptian woman, the
child is considered Ammonite; if an Egyptian male convert married a
Ammonite woman, the offspring is considred Egyptian. This
is the rule: the offspring with regards to non-Jewish nations always
follows the father. ...
When Saneireb the King of Assyria rose to power, he mixed up all the
peoples and exiled them from their places. We assume that the
current-day residents of Egypt are different than the "Egyptians" of
the prohibition, and the same goes for today's Edomites in Edom. As
these four prohibited nations have been mixed up with the other
nations of the world, who have no prohibitions -- everything is
permitted, as if a single individual comes out of that mix and seeks
to convert, it assumed s/he came from the [permitted] majority.
Therefore, when a convert of any ancestry converts today, whether Edomite, Egyptian, Ammonite, Moabite, Kushite -- any nation at all --
male or female -- s/he may marry immediately into the Jewish
mainstream.
יג [יז] כל הגויים כולם, כשיתגיירו ויקבלו עליהן כל המצוות של תורה,
והעבדים, כשישתחררו--הרי הן כישראל לכל דבר, שנאמר "הקהל, חוקה אחת לכם"
(במדבר טו,טו); ומותרין להיכנס בקהל ה' מיד--והוא שיישא הגר או המשוחרר
בת ישראל, ויישא הישראלי גיורת ומשוחררת: חוץ מארבעה עממין בלבד, והם
עמון ומואב ומצריים ואדום--שהאומות האלו, כשיתגייר מהן אדם--הרי הוא
כישראל לכל דבר, אלא לעניין ביאה בקהל.
יד [יח] וכיצד דינן: עמון ומואב--איסורן איסור עולם, זכרים ולא נקבות:
שנאמר "לא יבוא עמוני ומואבי . . ." (דברים כג,ד). והלכה למשה מסיניי,
שהעמוני הזכר והמואבי הזכר--הוא שאסור לעולם לישא בת ישראל, אפילו בן בן
בנו עד סוף העולם; אבל עמונית ומואבית, מותרת מיד כשאר האומות.
טו [יט] מצרי ואדומי, אחד זכרים ואחד נקבות--דור ראשון ודור שני, אסורין
לבוא בישראל; ודור שלישי מותר, שנאמר "בנים אשר ייוולדו להם, דור שלישי"
(דברים כג,ט). [כ] מצרית מעוברת שנתגיירה, בנה שני; מצרי שני שנשא מצרית
ראשונה, או מצרי ראשון שנשא מצרית שנייה--הוולד שני: שנאמר "בנים אשר
ייוולדו להם", הכתוב תלאו בלידה.
טז [כא] גר עמוני שנשא מצרית, הוולד עמוני; וגר מצרי שנשא עמונית, הוולד
מצרי: זה הכלל--הוולד באומות, הולך אחר הזכר; נתגיירו, הולך אחר הפחות.
...
...
יט [כה] כשעלה סנחריב מלך אשור, בילבל כל האומות ועירבם זה בזה והגלה
אותם ממקומם. ואלו המצריים שבארץ מצריים עתה, אנשים אחרים הם; וכן
האדומיים שבשדה אדום. והואיל ונתערבו ארבע אומות האסורים בכל אומות
העולם שהן מותרים, הותר הכול--שכל הפורש מהן להתגייר, חזקתו שפירש מן
הרוב.
כ לפיכך כשיתגייר הגר בזמן הזה בכל מקום--בין אדומי, בין מצרי, בין
עמוני, בין מואבי, בין כושי, בין שאר האומות--אחד הזכרים ואחד הנקבות,
מותרין לבוא בקהל מיד.