1
General Discussion / Re: Policy routing not working on replies (works on host initiated trafic)
« on: December 13, 2020, 09:07:05 pm »
I don't think my configuration is that common, and they do port forward like I do SNAT, exactly the same thing in the end.
The point is Site B of the VPN gets connections from internet through the tunnel, and replies *must* go through the same path, if it goes back Site B's internet it won't do.
FreeBSD has apparently that limitation that reply-to for virtual interfaces (VPNs) isn't functional so unless there is a route that send the packets through the VPN, it doesn't seem to be possible to achieve. And I cannot setup such route because the reply to address is any kind of public IP : it has to be the default route which means a dedicated OPNsense has to be setup.
This user has another shot at it :
I'm sorry if it looks my I'm trying to be the smart a**, I'm not, but I'm pretty confident now and that would be a lot of my time to recreate the configuration and it's just not worth it !
The point is Site B of the VPN gets connections from internet through the tunnel, and replies *must* go through the same path, if it goes back Site B's internet it won't do.
FreeBSD has apparently that limitation that reply-to for virtual interfaces (VPNs) isn't functional so unless there is a route that send the packets through the VPN, it doesn't seem to be possible to achieve. And I cannot setup such route because the reply to address is any kind of public IP : it has to be the default route which means a dedicated OPNsense has to be setup.
This user has another shot at it :
Quote
Code: [Select][Internet] ----(WAN)---- [Firewall DC1]
Hi
|
|
(IPSEC VTI)
|
|
[Internet] ----(WAN)---- [Firewall DC2]
|
|
(Transit Network)
|
|
[Internal LAN] ------- [Web Servers]
This is a known PF problem, and it has been discussed here many times. Via virtual interfaces (VTI, GRE,OpenVPn,...) the function "Reply-to" does not work. Therefore, all external traffic will ALWAYS return through the default gateway DC2 (WAN interface DC2). To solve this problem you need to:
Use NAT Outbound on the interface VTI DC1 for all external traffic that is forwarded for the WEB server (DC2 side)
or change the default gateway to VTI DC1 (DC2 side)
I'm sorry if it looks my I'm trying to be the smart a**, I'm not, but I'm pretty confident now and that would be a lot of my time to recreate the configuration and it's just not worth it !