* IP SNAT in a bridge
@ 2022-03-03 20:45 Marc SCHAEFER
2022-03-04 8:10 ` Marc SCHAEFER
0 siblings, 1 reply; 3+ messages in thread
From: Marc SCHAEFER @ 2022-03-03 20:45 UTC (permalink / raw)
To: netfilter
Hello,
I have two containers connected to a bridge. Let's assume the following
IP packet goes through the bridge:
192.168.101.3:80 > 192.168.101.4:12345
I would like to change the packet as follows:
1.2.3.4:80 > 192.168.101.4:12345
am I right that this has to be done as a -t nat POSTROUTING -j SNAT
iptables, but that will only work if ebtables forces the packet into
BROUTE mode first?
Something like:
ebtables -t broute -I BROUTING -p 0x800 -i bridge \
--ip-proto tcp --ip-sport 80 --ip-src 192.168.101.3/32 \
-j DROP
iptables -t nat -I POSTROUTING -s 192.168.101.3/32 -p tcp --sport 80 \
-j SNAT --to-source 1.2.3.4:80
Or am I completely mistaken?
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-04 14:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-03 20:45 IP SNAT in a bridge Marc SCHAEFER
2022-03-04 8:10 ` Marc SCHAEFER
2022-03-04 14:25 ` Marc SCHAEFER
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.