-
|
Hi All, My scenario looks like: Ping requests goes left to right, ping responses arrive at StrongSWAN but get blackholed: 13:43:44.322386 06:ae:3f:29:18:94 > 06:b0:89:9c:09:da, ethertype IPv4 (0x0800), length 178: 18.220.197.136.4500 > 172.25.129.204.4500: UDP-encap: ESP(spi=0xc60e1793,seq=0x4f5), length 136 root@ip-172-25-129-204:~# arp -a To the configuration: root@ip-172-25-129-204:~# ip a l root@ip-172-25-129-204:~# ip r l t all root@ip-172-25-129-204:~# cat /etc/ipsec.conf conn %default include /etc/ipsec.d/peers/*.conf root@ip-172-25-129-204:~# cat /etc/ipsec.d/peers/peer10.conf root@ip-172-25-129-204:~# ipsec statusall root@ip-172-25-129-204:~# iptables-save The interesting part is that the forward chain is being hit (counters are increasing) and a matching (as far as I can tell) policy is right there: root@ip-172-25-129-204:~# iptables -v -n -L -t mangle Chain INPUT (policy ACCEPT 2102 packets, 622K bytes) Chain FORWARD (policy ACCEPT 1420 packets, 119K bytes) Chain OUTPUT (policy ACCEPT 1357 packets, 205K bytes) Chain POSTROUTING (policy ACCEPT 2777 packets, 325K bytes) root@ip-172-25-129-204:~# ip xfrm policy but the policy is not hit (as per ip -s xfrm policy, the counters are 0) No xfrm errors are reported: root@ip-172-25-129-204:~# cat /proc/net/xfrm_stat And disable_xfrm and disable_policy are set to 0: root@ip-172-25-129-204:~# cat /proc/sys/net/ipv4/conf/eth0/disable_* Any help would be greatly appreciated. Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Looks like you don't have any VTIs that could be used. |
Beta Was this translation helpful? Give feedback.
-
|
All works fine if the MARK rules in the mangle table for the FORWARD hook go to PREROUTING. Which is a bit of a mystery to me since according to https://commons.wikimedia.org/wiki/File:Netfilter-packet-flow.svg, for instance, xfrm lookup for inside -> outside plaintext packets would take place after FORWARD and even after POSTROUTING. But none of FORWARD or POSTROUTING work. The conclusion is: PREROUTING does the marking for the packets generated by the clients and OUTPUT does the marking for the packets generated locally. Two distinct marks are required in order to set up two distinct IPsec tunnels for the same IP traffic selector. And two distinct reqid's are required (iirc) to mitigate the rekeying issue described here: https://wiki.strongswan.org/issues/3268. |
Beta Was this translation helpful? Give feedback.
All works fine if the MARK rules in the mangle table for the FORWARD hook go to PREROUTING. Which is a bit of a mystery to me since according to https://commons.wikimedia.org/wiki/File:Netfilter-packet-flow.svg, for instance, xfrm lookup for inside -> outside plaintext packets would take place after FORWARD and even after POSTROUTING. But none of FORWARD or POSTROUTING work. The conclusion is: PREROUTING does the marking for the packets generated by the clients and OUTPUT does the marking for the packets generated locally.
Two distinct marks are required in order to set up two distinct IPsec tunnels for the same IP traffic selector.
And two distinct reqid's are required (iirc) to mitigate…