IPSec VTI 0.0.0.0/0
-
Hello,
I was wondering, can I use 0.0.0.0/0 in a routed (VTI) IPSec tunnel? From my understanding, the answer would be no, because it needs an IP to set the static routes but I haven't found any official documentation.
Thank you!
-
@silviub Routing is established via Phase 1 peer addresses. Therefore yes,
0.0.0.0/0(i.e., route all client traffic through the tunnel) is a valid Phase 2 route. -
@tinfoilmatt Is this tried and tested? I'm asking because when I add a static route and run
netstat -4rn | grep <route>I see something like:Internet: Destination Gateway Flags Netif Expire 10.41.62.0/24 10.254.254.26 UGS ipsec3My P2 routes for this tunnel are:
Local: 10.254.254.25 Remote: 10.254.254.26Wondering if I set them to
0.0.0.0/0what would happend :D
Since this is a production system, I'd have to replicate the setup in order to be able to test it out, and I was hoping someone else already tried it before me :D -
@silviub There is comprehensive official documentation on the subject.
-
You can just set the VTI gateway as default if that's what you want.
-
@tinfoilmatt there is and I've read a fair bit of it, but the issue is that I haven't found any mention of 0.0.0.0/0 in Phase 2 config. That's why I'm asking.
@stephenw10 I don't. I don't want the VTI as the default gateway, but I'm linking it to a Fortigate who's using 0.0.0.0/0 and I get messages in the logs saying that the P2 doesn't match, but it establishes the tunnel.I guess I'll just setup a test env and see what happens.
-
Back with an answer: In an IPSec where P2 is set to VTI you CANNOT set 0.0.0.0/0 as the local/remote gateway, as it will not work.
What I've tried:
Add an IPSec tunnel with P2 as 10.10.10.1 and 10.10.10.2 and push a route via that tunnel gateway, everything worked.
I've edited the P2 and set both the local and remote to 0.0.0.0, applied, restarted the tunnel, checked the routes - not present. I tried rebooting the VM, restarting the tunnel from the other side, etc. Unless there's a valid IP address, it seems that the route cannot be added. -
Is the Fortigate not using VTI mode then? The only reason have 0/0 in the P2 is to allow it to carry all traffic in policy mode usually.
-
@stephenw10 on the Fortigate, I don't see a way to pick VTI / Tunneled. The Fortigate seems to behave as a VTI when using 0.0.0.0/0 as I need to set routes for the traffic to be sent via a specific interface.
Anyways, I've got the answer to my question: if I set 0.0.0.0/0 to P2 in the PFSense, it won't work. It needs an IP address (one that's not in the same VLAN as your LAN / WAN / known routes) to be used as a route gateway. -
@silviub said in IPSec VTI 0.0.0.0/0:
Anyways, I've got the answer to my question: if I set 0.0.0.0/0 to P2 in the PFSense, it won't work. It needs an IP address (one that's not in the same VLAN as your LAN / WAN / known routes) to be used as a route gateway.
This specific point is contemplated by the official documentation as expected behavior—more specifically discussing routed IPsec caveats with the platform here.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy