Skip to contentSkip to conversation

SNAT multicast traffic

DISCUSSION Paolo Rossi 4 participants 5 messages Feb 8, 2005 – Feb 9, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi all,

I have a trouble with netfilter. I need to perform a SNAT to outgoing multicast packet. Multicast packet come from private network and i can't annunce this private network in my routing domain. Becauseour routers manage multicast traffic with PIM-SM protocol and PIM perform RPF (reverse path forwarding), the clients can't see the multicast traffic. I've read that netfilter don't support multicast SNAT, why?

Is there someone can hel me?

Thanks

Best wishes

Paolo

#1 lore raw
Quoted 9 lines · Paolo Rossi

Hi all,

I have a trouble with netfilter. I need to perform a SNAT to outgoing multicast packet. Multicast packet come from private network and i can't annunce this private network in my routing domain. Becauseour routers manage multicast traffic with PIM-SM protocol and PIM perform RPF (reverse path forwarding), the clients can't see the multicast traffic. I've read that netfilter don't support multicast SNAT, why?

netfilter/iptables doesn't implement multicast NAT at all. this is due to it's strictly stateful fully-symmetric implementation, which obviously doesn't fit the multicast paradigm (where 'reply' packets of a multicast 'connection' don't have the inverted sourceip<->destinationip).

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#2 lore raw
Quoted 10 lines · Harald Welte
Quoted 6 lines · Paolo Rossi

Hi all,

I have a trouble with netfilter. I need to perform a SNAT to outgoing multicast packet. Multicast packet come from private network and i can't annunce this private network in my routing domain. Becauseour routers manage multicast traffic with PIM-SM protocol and PIM perform RPF (reverse path forwarding), the clients can't see the multicast traffic. I've read that netfilter don't support multicast SNAT, why?

Quoted 8 lines

netfilter/iptables doesn't implement multicast NAT at all. this is due to it's strictly stateful fully-symmetric implementation, which obviously doesn't fit the multicast paradigm (where 'reply' packets of a multicast 'connection' don't have the inverted sourceip<->destinationip).

Thank you very much Harald.
Is it possible to perform stateless nat in Linux ?

#3 lore raw
Quoted 1 line · Paolo Rossi

Is it possible to perform stateless nat in Linux ?

No, the NAT subsystem works on the behalf of conntrack subsystem. There's no NAT without conntrack.

Also, once the conntrack knows the NAT action for a particular tuple; the packet doesn't hit PREROUTING of nat table anymore.

HTH,
Samuel

#4 lore raw
Quoted 9 lines · Samuel Jean
Quoted 1 line · Paolo Rossi

Is it possible to perform stateless nat in Linux ?

No, the NAT subsystem works on the behalf of conntrack subsystem. There's no NAT without conntrack.

Also, once the conntrack knows the NAT action for a particular tuple; the packet doesn't hit PREROUTING of nat table anymore.

Well, there is "route nat" in 2.4 (see iproute documentation). However, it was broken by the IPsec changes to 2.6, and subsequently removed from the 2.6 kernel.

Alternatives with 2.6 include queuing to userspace (slow), some form of low-level packet mangling using the new tc pedit action interface (obscure, as with everything tc ;-p), or convincing someone to fix and readd route nat.

Regards,

Bill Rugolsky