Linux Netfilter discussions
 help / color / mirror / Atom feed
* Conntrack does not Re-Fragment, defragmented packet while forwarding
@ 2016-06-14 13:09 Arunsundar
  0 siblings, 0 replies; only message in thread
From: Arunsundar @ 2016-06-14 13:09 UTC (permalink / raw)
  To: netfilter

Hi All,

As per few online documents, conntrack will defragment the received 
packets in Prerouting and it again re-fragment before packet leaves the 
machine. But I observe that conntrack defragments and forward the same 
defragmented packet, re-fragment while forwarding is not happening. 
Details below

Requirement:
Receive the fragmented packets in ingress in interface0, mark the packet 
based on IP and port and the marked packet will be sent via a particular 
TC HTB class as it is received in the interface1. IP forward is enabled.

Procedure followed:
used below commands to mark the packet.
     iptables -t mangle -A PREROUTING -i em1 -d 192.xxx.xxx.xxx -p udp 
--dport xxxx -j MARK --set-mark 0x400
     iptables -t mangle -A PREROUTING -i em1 -d 192.xxx.xxx.xxx -p udp 
--dport xxxx -j CONNMARK --save-mark
     iptables -t mangle -A PREROUTING -i em1 -p udp -d 192.xxx.xxx.xxx 
--dport xxxx -j CONNMARK --restore-mark

These above commands work fine for my requirement. As per these 
commands, Contrack defragment the received packets and mark it correctly 
based on IP and port. But when the packet is forwarded to the next 
interface, the defragmented packet is forwarded as it is instead of 
sending the received packets.

Can some one let me know how to re-fragment the packets after 
defragmentation done by conntrack.

Other Info:
iptables v1.4.21
conntrack v1.4.1
Linux Kernel - 4.4.6


-- 
Regards,
Arunsundar.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-14 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-14 13:09 Conntrack does not Re-Fragment, defragmented packet while forwarding Arunsundar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox