Advanced > Firewall/NAT > Disable all auto-added VPN rules
I checked the box and saved settings. I already had added an IPv4 allow all rule with logging enabled. The tunnel establishes almost immediately with this change.
This confirms (if it wasn't already evident) there is a firewall rule problem at play in my set up.
When diffing /tmp/rules.debug with /tmp/rules.debug.old, I see only the VPN rules which are all set to "reply-to" and "route-to" the WAN gateway (which isn't necessary as both nodes are in the same "WAN subnet"). Maybe had I thrown another device in the middle to do the routing this would not have happened, but regardless of that fact, this is still a realistic scenario (VPN tunnels between two hosts in the same subnet).
Advanced > Firewall/NAT > Disable reply-to on WAN rules
Doesn't take effect as far as I can tell (at least not on the auto-created VPN rules which I re-enabled). Reverting the change (unchecking the checkbox) and diffing rules.debug and rules.debug.old show only the USER_RULEs are affected (though all rules probably should be affected).
If I copy the /tmp/rules.debug to another file in /tmp/ and tear out the (route-to|reply-to) keywords with vi … and reload the rules with pfctl, my tunnels magically initiate from either end (and establish).
# different per host and depends on other rules, but the gist
154,157s/ reply-to ( em0 10.9.8.1 ) //g
154,157s/ route-to ( em0 10.9.8.1 ) //g
It also appears there is a bug where the last phase1 that is saved is "latched on to" or used (I have duplicates due to testing, so I expect that is why it picks the wrong duplicate over the new one).
And another apparent bug (on my production box) which is really messed up.
ISAKMP is UDP 500 and NAT-T is UDP 4500 …
# IPSec Logs from when I click the play button on Status > IPSec page
Feb 25 20:52:34 racoon: [Self]: INFO: X.X.X.X[4500] used for NAT-T
Feb 25 20:52:34 racoon: [Self]: INFO: X.X.X.X[4500] used as isakmp port (fd=9)
Feb 25 20:52:34 racoon: [Self]: INFO: X.X.X.X[500] used for NAT-T
Feb 25 20:52:34 racoon: [Self]: INFO: X.X.X.X[500] used as isakmp port (fd=10)
# racoon.conf
listen
{
adminsock "/var/db/racoon/racoon.sock" "root" "wheel" 0660;
isakmp X.X.X.X [500];
isakmp_natt X.X.X.X [4500];
}
_This is what I've found thus far.
I would greatly appreciate it if someone would test this scenario to double check._