Project

General

Profile

Actions

Bug #8674

closed

Switching IPsec phase one to vti from Tunnel IPv4 and back yields unexpected behavior

Added by Anonymous almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
IPsec
Target version:
Start date:
07/20/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4
Affected Architecture:

Description

On 2.4.4.a.20180720.1418, create a site-to-site IPsec tunnel, with Tunnel IPv4 selected as the mode for the phase two. After saving and applying changes, confirm the tunnel established correctly.

Add a rule on the IPsec interface to allow any traffic.

Initiate a ping across the tunnel from a host on one side, to the firewall itself or another host on the other side. The ping will succeed.

Change the phase two's mode to vti, save, apply changes, stop and start the service.

The pings will fail. (as expected)

Visit Interfaces > Assignments and see that the ipsec1000 interface is ready to be assigned. Do not assign it.

Go back to the IPsec tunnel and change the phase two mode back to Tunnel IPv4, save, apply changes, stop and start the service.

The pings will continue to fail, despite the phase two mode being changed back to Tunnel IPv4 from vti.

Visit Interfaces > Assignments and see that the ipsec1000 interface is still ready to be assigned. Although it should no longer be available for assignment since the phase two mode is no longer vti.

Go back to the IPsec tunnel and delete it.

Go back to the Interfaces > Assignment page and the ipsec1000 interface is still ready to be assigned.

Recreating the tunnel has no effect, the phase one and phase two will come up, traffic will come in from either side but it will not pass through pfSense.

Actions #1

Updated by Anonymous almost 6 years ago

  • Category set to IPsec
Actions #2

Updated by Jim Thompson almost 6 years ago

  • Assignee set to Jim Pingle
Actions #3

Updated by Jim Thompson almost 6 years ago

  • Target version set to 2.4.4
Actions #4

Updated by Jim Pingle almost 6 years ago

  • Status changed from New to Assigned
Actions #5

Updated by Jim Pingle almost 6 years ago

  • % Done changed from 0 to 70

Partially done with 2c3ac0b381a5d1ed6e81105158fa7cceb682dc95 - Still needs some input validation to prevent a user from taking an action that would remove an assigned ipsecXXXX interface.

Actions #6

Updated by Anonymous almost 6 years ago

With the patch provided, applied, the behavior appears to be corrected. That is, when you switch back to Tunnel IPv4 from vti, the (ipsec1000) interface is no longer available for assignment and traffic begins to flow again.

Actions #7

Updated by Jim Pingle almost 6 years ago

I just pushed some extra input validation which does the following:

  • Prevents from switching VTI to another P2 mode with an assigned interface
  • Prevents disabling a VTI P2 with an assigned interface
  • Prevents deleting a VTI P2 with an assigned interface
  • Prevents deleting a P1 which contains a VTI P2 with an assigned interface
Actions #8

Updated by Jim Pingle almost 6 years ago

  • Status changed from Assigned to Feedback
Actions #9

Updated by Jim Pingle almost 6 years ago

  • % Done changed from 70 to 100
Actions #10

Updated by Anonymous almost 6 years ago

On 2.4.4.a.20180724.1715, unable to switch from VTI to another P2 mode with an assigned interface; unable to disable a VTI P2 with an assigned interface; unable to delete a VTI P2 with an assigned interface; unable to delete a P1 which contains a VTI P2 with an assigned interface. Looks good.

Actions #11

Updated by Jim Pingle over 5 years ago

There was one more disable case I missed yesterday: Checking disable in the P2 settings screen instead of using the button on the P1 list. I just pushed a fix for that.

Actions #12

Updated by Jim Pingle over 5 years ago

  • Status changed from Feedback to Assigned

Looks like it's still possible to disable a P1 containing a VTI P2 which leads to the problem case. That also must be prevented. See #8691

Actions #13

Updated by Jim Pingle over 5 years ago

  • Status changed from Assigned to Feedback
Actions #14

Updated by Anonymous over 5 years ago

On 2.4.4.a.20180725.0317 with patches b66b72d0ae725392b0158de3a0ec0731d71cd793 and cc240e3259d90ed236872de5cba346fe092eda85 applied, the user is unable to disable a Phase one with a Phase two configured with VTI and it's VTI interface assigned. The user is also unable to edit the Phase two configured with VTI and it's interface assigned, to check the box to disable.

Looks good.

Actions #15

Updated by Jim Pingle over 5 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF