* Ipsec with mark encryption decision made before mangle output chain
@ 2015-02-04 19:06 Bill Shirley
0 siblings, 0 replies; only message in thread
From: Bill Shirley @ 2015-02-04 19:06 UTC (permalink / raw)
To: netdev
I'm setting up a pair of Ipsec tunnels (to the same destination) and using ip xfrm policy marks (no state marks).
The following doesn't work, the packet never gets incrypted:
ping 192,168.4.1
However, this works:
ping -m 80896 192.168.4.1
I have rules in my iptables -t mangle output to set the mark:
0 0 RETURN esp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x13c00/0x3ff00 /* esp
with a mark */
0 0 RETURN esp -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x12c00/0x3ff00 /* esp
with a mark */
4 336 CONNMARK !esp -- * * 0.0.0.0/0 192.168.4.0/24 ctstate NEW /* -vpn- new outgoing */
CONNMARK xset 0x10700/0x3ff00
4 336 MARK !esp -- * * 0.0.0.0/0 0.0.0.0/0 connmark match 0x10700/0x3ff00
match-set sfn_ctel_up dst /* -vpn- mark for encryption */ MARK xset 0x13c00/0x3ff00
4 336 MARK !esp -- * * 0.0.0.0/0 0.0.0.0/0 connmark match 0x10700/0x3ff00
match-set sfn_pwrbd_up dst /* -vpn- mark for encryption */ MARK xset 0x12c00/0x3ff00
The numbers are from the ping without the mark. As you can see, it does encrypt the packet (no esp matches).
Is it possible that the encryption mark is selected before the output chain?
Is this the right place to post for this type of problem?
Thanks,
Bill
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-04 19:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 19:06 Ipsec with mark encryption decision made before mangle output chain Bill Shirley
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).