FumbleFingers is right, we don't "forward out" messages.
But your question, despite its title, is not really about the phrase "forward out." It's about ending sentences with prepositions (and possibly about phrases containing "out of"). Most people on this site are likely to agree that English grammar does not have a rule prohibiting you from ending a sentence with a preposition. There are people who believe such a rule exists, and sometimes those people are our teachers, or editors. If you're in such a situation, you may need to contort this sentence to fit that made up rule. Hopefully that's not the case.
All messages arrive at the same destination regardless of out which ports they are forwarded.
All messages arrive at the same destination, regardless of which port they are sent from.
Or, if you need to please one of those confused people:
All messages arrive at the same destination, regardless of from which port it was sent.
But that's horribly awkward. To avoid that awkwardness, you cannot just drop the preposition. You've attempted this in: "regardless of out which ports they are forwarded." It should have been: "regardless of out of which ports they are forwarded."
You would need to rephrase the sentence to avoid having too many conjunctions and prepositions stacked up. Something like, "All messages arrive at the same destination, irrespective of the port from which they are sent." Similarly, with a phrase using "out of": "All people are greeted with a wave, irrespective of the door out of which they came."
These contortions demonstrate why so many of us are so annoyed by the artificial rule prohibiting prepositions at the end of sentences. So much of the time, the sentence would be far easier to understand if you left the preposition at the end.