Skip to content

Change PHP session name to be dynamic #8365

@Kage

Description

@Kage

Important notices

Is your feature request related to a problem? Please describe.

When running multiple OPNSense instances on the same hostname (e.g. SSH tunnel port forwards), you can only be logged into only one OPNSense at a time due to PHP using the default PHPSESSID session name.

Describe the solution you like

As a workaround, I have added the following to the last line of src/opnsense/service/templates/OPNsense/WebGui/php.ini:

session.name={{system.hostname}}

Describe alternatives you considered

  1. Obviously, using different hostnames or different browsers, however this adds unnecessary overhead for simple use-cases.
  2. Set the session name in the web UI, however that was beyond the scope of my needs.

Additional context

Steps to reproduce:

  1. Have multiple instances of OPNSense running
  2. SSH into two or more instances with port forward tunneling enabled (ssh -L 8443:127.0.0.1:443 ..)
  3. Connect to all instances in the same web browser
  4. Login to multiple instances and attempt to navigate around all of them
  5. The last logged-in instance is the only one you will be able to continue using

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributor missing / timeout

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions