Score:0

How to forward UDP traffic between two interfaces using iptables

lt flag

Good morning,

I need help to forward traffic in two interfaces on a debian12 server. I have a server with two interfaces like this scheme:

INTERNET come on the ens224

  |

LAN go to the ens192

I want to redirect all the 3480/UDP traffic received by ens224 to ens192 I think to use this rule:

iptables -A FORWARD -i ens224 -o ens192 -p udp --dport 3480 -d 10.67.1.101 -j ACCEPT do you think it's maybe ok?

thanks in advance for help.

Regards,

A.B avatar
cl flag
A.B
iptables doesn't route: it's here to filter what routing/forwarding can happen. So adding a rule in iptables allowing a specific routing/forwarding to happen doesn't magically make it happen. If the target is the system (rather than an actual routing/forwarding case where both source and target are remote), you need NAT (DNAT) too. NAT doesn't route either, but will change the routing stack's vision of what to do and lead to routing in the end.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.