* Netfilter rules to replicate, consume ingress packet locally and forward clone packet.
@ 2021-06-29 9:47 rakesh goyal
0 siblings, 0 replies; only message in thread
From: rakesh goyal @ 2021-06-29 9:47 UTC (permalink / raw)
To: netfilter-devel
Hi,
I am looking for netfilter rules to accomplish the following requirements.
1. every UDP packet received on the interface i.e. eht0 should be
consumed locally.
2. replicate same packet and Forward to other interface i.e. enp7s0
experiment done.
1 .Host PC IP 192.168.1.3 which is connected to DUT eth0.
2. DUT eth0 - 192.168.1.4
enp7s0 10.40.197.108
3. Another Host which is in 10.40... network having IP 10.40.198.9
connected to enp7s0 of DUT.
Rules :
sudo iptables -t mangle -A PREROUTING -d 192.168.1.4 -j TEE --gateway
10.40.198.9
sudo iptables -t nat -A OUTPUT -s 192.168.1.3 -j DNAT --to-destination
10.40.198.9
sudo iptables -t mangle -A INPUT -s 192.168.1.3 -j ACCEPT
Issue Seen with this rule:
1. packets from #1 Host PC get cloned until TTL becomes 1/0. So there
are multiple replications.
please help here to understand the correct rules for the requirement.
Regards,
Rakesh
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-29 9:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 9:47 Netfilter rules to replicate, consume ingress packet locally and forward clone packet rakesh goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).