Skip to content

OpenVPN: public IP field missing when public IP detection fails #1951

Open
NethServer/nethsecurity-ui
#839

Description

@m-dilorenzi

NethSecurity detects the firewall public IP address to pre-fill the public endpoint fields of VPN configurations. When the detection fails, the API returns an empty list and the UI does not show any input field for the public IP: only the "Add" button is displayed.

Steps to reproduce

  • Enable DNS Threat Shield with the doh_vpn_tor_proxy blocklist (or any condition that makes resolver1.opendns.com unresolvable/unreachable)
  • OpenVPN tunnel: go to VPN > OpenVPN Tunnel > Server tunnels and click "Add server tunnel"
  • OpenVPN Road Warrior: go to VPN > OpenVPN Road Warrior and configure a new server

Expected behavior

The public IP field is always shown with at least one input. The public IP is mandatory: the configuration can't be saved without it and the last remaining field can't be deleted.

Actual behavior

OpenVPN tunnel (server):

  • the get default API returns an empty array, so no public endpoint field is shown, only the "Add endpoint" button
  • the drawer validation only iterates over the endpoint list, so an empty list passes validation: the tunnel can be saved without any public endpoint and it will never work
  • the fields are not marked as required, so all endpoint fields can be deleted
  • when editing an existing tunnel without ns_public_ip, no field is shown either

OpenVPN Road Warrior:

  • the get configuration API returns an empty array of public IPs when the option is not yet configured, so no public IP/hostname field is shown, only the "Add" button
  • saving is blocked by the validation ("Required" error), but the user has to add the field manually
  • the fields are not marked as required, so all fields can be deleted

Activity

  1. self-assigned this
    on Oct 21, 2026
  2. added theissue type on Oct 21, 2026
  3. added this to the 8.8.1 milestone on Oct 21, 2026
  4. moved this from ToDo 🕐 to In Progress 🛠 in NethSecurityon Oct 21, 2026
  5. m-dilorenzi commented on Oct 21, 2026

    @m-dilorenzi
    CollaboratorAuthor

    QA

    Image: latest dev

    QA

    1. Install NethSecurity with the current stable image (without the fix)
    2. Enable DNS Threat Shield with the doh_vpn_tor_proxy blocklist, so the DNS server used to detect the public IP is not reachable
    3. Open the OpenVPN Tunnel server drawer and the OpenVPN Road Warrior server drawer: the public IP field is not shown, only the "Add endpoint" button
    4. Update the machine to the latest image
    5. Open the drawers again: an empty public IP field is now shown
    6. In both drawers, verify that the public IP is mandatory:
      • saving with an empty field shows "Required" and the configuration is not saved
      • with a single field, the delete button is disabled
      • after adding more fields, they can be deleted until only one is left
      • an invalid value (not an IP address or hostname) is rejected
    7. Fill in a valid public IP and save: the tunnel and the Road Warrior server are created correctly
    8. Edit the tunnel and the Road Warrior server: the configured public IPs are shown and the same rules apply
    9. Disable DNS Threat Shield and open the drawers to create a new configuration: if the public IP is detected, the field is pre-filled; otherwise an empty field is shown
    10. Download the client configurations: they contain the configured public IPs
  6. added
    testingPackages are available from testing repositories
    on Oct 23, 2026
  7. moved this from In Progress 🛠 to Testing in NethSecurityon Oct 23, 2026
  8. Tbaile commented on Oct 23, 2026

    @Tbaile
    Collaborator

    Verified

  9. added
    verifiedAll test cases were verified successfully
    and removed
    testingPackages are available from testing repositories
    on Oct 23, 2026
  10. removed their assignment
    on Oct 23, 2026
  11. moved this from Testing to Verified in NethSecurityon Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    verifiedAll test cases were verified successfully

    Type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions