These psukim teach two rules that govern our relationship with the people of Amon and Moav:
1. A male Amoni/Moavi will never be allowed to marry into Klal Yisrael. Obviously this assumes that we accept geirim from them, but even after geirus they carry their ethnic stigma forever. This rule applies only to males, but females may marry into Klal Yisrael immediately upon becoming Giyoros.
2. We are proscribed from inquiring after their welfare and from showing them friendship. The Chinuch (562) states that this only has application during a times of war. That is, although generally when we find ourselves about to declare war, we attempt to find a peaceful resolution rather than go to war, but with Amon and Moav we do not seek detente. We go to war. However, the Minchas Chinuch brings from the Sefer Yerei'im that (Chiddush #1) it is not limited to wartime. לֹא תִדְרֹשׁ שְׁלֹמָם וְטֹבָתָם tells us that it generally prohibits comity.
The Minchas Chinuch asks: Does the prohibition on comity apply even to Amonim and Moavim after they become Gerim? Perhaps the issur only applies while they are goyim, while they are part of the Moavi nation, but not when they become Geirim? He says that it appears to him that (Chiddush #3) the issur remains even after Geirus. Just as the issur to marry exclusively relates to Geirim, so, too, the issur of drishas shalom applies to geirim. The Targum Yonasan says this explicitly:
And then the Minchas Chinuch says a remarkable thing: he says that (Chiddush #4) this issur applies to both men and women. In other words, even though the issur of marriage after geirus only applies to men and not to women, the issur of Lo Sidrosh applies equally to women, and so it applies even after Geirus, as postulated in Chiddush #3). According to him, then, you would be allowed to marry a Moavi woman, but it would be assur to be nice to her. You couldn't even say good morning to your wife, unless (Chiddush #2) she had done you some special kindness that deserves hakaras hatov.
So the Minchas Chinuch makes four points. One, from the Yerei'im, that the issur applies at all times, and not only during war; Two, from the Yerei'im, that the issur does not apply when you owe them hakaras hatov; Three, that the issur applies even after Geirus, supported by the Targum Yonasan; and Four, his own, that the issur applies even to Amoni women after their geirus.
As for #3, the idea that the issur applies even after Geirus: Many achronim say that the Rambam (12 Isurei Biyah 17, and Rav Shach also brings a proof from 6 Melachim 6) contradicts the Minchas Chinuch and holds there is no issur of Lo Sidrosh after Geirus.
Chiddush #4, that the issur applies even to Amoni women after Geirus, is terribly problematic. The Yereim (296) himself, upon whom the Minchas Chinuch bases the idea that the issur applies after Geirus, says that it does not apply to females at all, not while they're goyim and certainly not when they're giyoros. Reb Aharon Volkin, in his Saviv Li'rei'av there, asks this question on the Minchas Chinuch. It's not really a question, it's a refutation.
Rav Shach, though, asks on the Minchas Chinuch a broader question- how can he say there's an issur drishas shalom after geirus, when this is contradicted by the entire Megillas Rus? Boaz obviously did great Chesed, kindnesses, to Rus, so how was that muttar according to the Minchas Chinuch?
With a little imagination, it is possible to hear this issue in the dialogue between Rus and Boaz. (Rus 2:10),
The Kesef Mishna in ו מלכים ו asks on the Yerei'im the following question: How can the Yerei'im prove from David's nichum aveilim that repaying kindness is not assur, when Chazal (מדרש רבה במדבר כ"א) say that David was punished for doing so? The Medrash (also the Tanchuma in Pinchas) says
It appears, says the Kesef Mishna, that the Medrash, which faults David for what he did, contradicts the Yerei'im, who proved from the story of David that repaying kindness is muttar.
Reb Meir Simcha answers the Kesef Mishna's question:
Reb Meir Simcha's invokes the doctrine of privity, that while it is muttar to repay kindness, that only applies to the original parties to the chesed. In this case, it was the father of Chanon who had done David a kindness, and David thought that the hetter of repayment applied to the son of the man who had been kind to him. That was an error, according to the Medrash.
a. On the other hand, David Hamelech's svara seems very good. The whole issur on Amon and Moav comes from the meanness of that one generation. If the issur stems from the behavior of ancestors and applies to their descendants, then a hetter ought to be able to stem from the ancestors and apply to their descendants.
b. The Rambam in 14 Aveil 7 says that is a chesed to the Niftar, and not just to the Aveil. If so, what was David's mistake? His nichum to Chanon was a chesed with the deceased father who had done him the kindness, and he was allowed to repay the chesed to the father! It appears that the Medrash is saying that the privity of the hetter of Tashlumin is so limited that it will not be mattir even collateral chesed that accrues to another person.
c. Now, if the Medrash is saying that tashlumin is only muttar to the party that had done the chesed, one might argue that the same concept of non-transferability should throw a monkey wrench into what we said about Rus and Boaz. What right did Boaz have to show Rus kindness when the kindness was not to him? It was to Na'ami!
I would answer that while the hetter on Lo Sidrosh does not transfer to the son of the benefactor, it is mattir Drishas Shalom to the benefactor him/herself even from other Jews, and certainly Jews that have some connection to the beneficiary, as Boaz did to Na'ami.