Skip to content

Error when creating VPN tunnels with same Outside IP #14706

@markkuleinio

Description

@markkuleinio

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.9

Steps to Reproduce

Setup for test device:

  1. Create site MySite
  2. Create manufacturer Test
  3. Create device type TestModel
  4. Create device role VPN
  5. Create device TestDevice (using the attribute values above)
  6. For the device, create interfaces tunnel.[1-2] (type = virtual)
  7. For the device, create interface Internet (type = f.ex. 1000base-T)
  8. For the Internet interface, add IP address 123.123.123.123/32

Now the actual VPN tunnels:

  1. Create VPN tunnel Tunnel1:
    • encap = IPsec - Tunnel
    • first termination:
      • Role = Hub
      • Type = Device
      • Device = TestDevice
      • Interface = tunnel.1
      • Outside IP = 123.123.123.123/32
  2. Create another VPN tunnel Tunnel2:
    • encap = IPsec - Tunnel
    • first termination:
      • Role = Hub
      • Type = Device
      • Device = TestDevice
      • Interface = tunnel.2
      • Outside IP = 123.123.123.123/32

Expected Behavior

Both tunnels and terminations are created successfully, as they will both terminate on the same Outside IP. That is the usual way of using several tunnels on the same device.

Observed Behavior

When pressing the Create button for the second tunnel:

"
Server Error

There was a problem with your request. Please contact an administrator.
The complete exception is provided below:
<class 'django.db.utils.IntegrityError'>

duplicate key value violates unique constraint "vpn_tunneltermination_outside_ip_id_key"
DETAIL: Key (outside_ip_id)=(14) already exists.

Python version: 3.9.2
NetBox version: 3.7.0
Plugins: None installed
"

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions