netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* masquerade
@ 2020-02-05 15:20 Serguei Bezverkhi (sbezverk)
  2020-02-05 15:41 ` masquerade Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Serguei Bezverkhi (sbezverk) @ 2020-02-05 15:20 UTC (permalink / raw)
  To: netfilter-devel

Hello,

I was addressing kubernetes hairpin case when a container connects to itself via exposed service.

Example pod with ip 1.1.1.1 listening on port tcp 8080 and exposed via   service 2.2.2.2:8080, if curl is run from inside the pod, like curl http://2.2.2.2:8080 then the packet would be first dnat to 1.1.1.1:8080 and then its source needs to be masqueraded. In iptables implementation it seems it is automatically masqueraded to host's IP whereas in nftables (all rules are equivalent) source gets masqueraded into POD's interface.

I would appreciate if somebody could confirm this behavior and different in masquerading between iptables and nftables for containers.

Thank you
Serguei


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-05 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 15:20 masquerade Serguei Bezverkhi (sbezverk)
2020-02-05 15:41 ` masquerade Florian Westphal

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).