@johnpoz no 127.0.0.1 is correct
its for openvpn.
wan1 has nat to 127.0.0.1:1200
wan2 has nat to 127.0.0.1:1200
openvpn is bound to localhost.
now the gateway is important to be set on failover - why?
well i have a lot of routers incomming that are not pfsense, they run openvpn 2.4 but in a very minimalistic way.
so the best failoverconfiguration so far is
Clientside: has 2 remote entrys and short reconnect timeouts. remote 1 goes to wan1 on the pfsense, remote 2 to wan2
Now the trick here is that if wan1 goes down, firewallrule with set to gateway will deny any access to openvpn via wan1
same time cut of any leftovers - thats important in cases where the failover is triggered for like packetloss. in that case clients often stay connected, on a not really useable line.
this way they are forced to reconnect. now since the firewall now blocks wan1, they will retry to wan2.
wan2 is now active and let them in.
however theres no way to bring openvpn back to wan1 once its ok again. not even an eeasy way to determine which client is connect to which wan. This is because i need to iroute my clients subnets into my own. because of this i cannot use a second instance of openvpn (cannot route back without ospf, clients dont support ospf). so i need to use once instance.
to solve this i have the gateway directive also on wan2. once failover falls back to wan1, connections will be cut off imidiatly and access to wan2 is blocked. clients now reconnect in their server list and will land eventually back on wan1 and reconnect
this works 100% and is so far the best failover for external clients with irouting.
Now back to topic, ahh i missunderstodd the gateway option, well need sleep.
well for my use case it doenst matter as it works as described, i was just curious why my test rule doenst apply, i wont need that one anyway.
i assumed he wont match the packet if gateway does not match. well looks like it does match, but my desired outcome is the same, by intentionally misconfigure the gateway :)
well... if it works...it aint stupid :)