OMVEXTRAS - OpenVPN - change wish

  • Hello, community!

    I want to use OMVExtras OpenVPN, but I need to use UDP + bridge mode + TAP adapter (all clients are Windows machines, no Android). All I want is L2 networking over VPN. When I try to modify server.conf, it change back to TUN every time I commit any change over configuration webpage. Can anyone help what can I edit so my change to TAP persist - or better, is there any possibility that we can get this setting available and working over web config?


    Thank you!


    Best regards, Jan

  • jimmy_cr

    Hat den Titel des Themas von „OMVEXTRAS - OpenVpn - TAP adapter + bridge mode“ zu „OMVEXTRAS - OpenVpn - TAP adapter + bridge mode (OMV 5.5.15-1)“ geändert.
  • I will try to answer myself :) It's nearly impossible to fullfill my wish without tweaking plugin itself :). I found where I can change all settings, but after every plugin upgrade it reverts to "default state". I am asking thich changes because sometimes we need to connect two or more clients together without need to access internal network of OMV. So I would like to to ask "ryecoaaron" kindly (I think he's the one who can help), if there's possibility to modify OMVExtras-OpenVPN plugin like this:


    - add selection for TUN / TAP device


    config for TUN:

    Code
    dev tun
    persist-tun

    config for TAP ("persist-tun" shouldn't be in config)

    Code
    dev tap


    - split "Default gateway" setting to "Default gateway" and "Static route" (static route is doing troubles - someone mentioned it on "github issues" also). I'm almost 99% sure, that you do not need to add line push "route $vpn_network $vpn_mask" also (I never used this).


    - add option to use "Duplicate CN" - so user can connect several times using only 1 certificate. Disvantage is, your IP address will not persist on every reconnect. ("duplicate-cn" and "ifconfig-pool-persist" cannot be used together)


    config for "Duplicate CN" enabled

    Code
    duplicate-cn

    config for "Duplicate CN" disabled

    Code
    ifconfig-pool-persist ipp.txt

    - everything else we can do using "Extra options" field I think (per user folders with push directives, etc).



    Thank you for your effort!


    Best regards, Jan

  • jimmy_cr

    Hat den Titel des Themas von „OMVEXTRAS - OpenVpn - TAP adapter + bridge mode (OMV 5.5.15-1)“ zu „OMVEXTRAS - OpenVPN - change wish“ geändert.
    • Offizieller Beitrag

    So I would like to to ask "ryecoaaron" kindly (I think he's the one who can help), if there's possibility to modify OMVExtras-OpenVPN plugin like this:

    Those are a lot of changes to a plugin I don't use and can't test. I minimally ported it to OMV 5.x but really don't want to start making big changes. If you submit a pull request, I would prefer that.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    I am a little bit "n00b" using github :) I can try rework script and post it here maybe, but never did anything like this on github :-/

    I guess I don't need a github pull request. I just really need the code changes. The plugin's web interface needs to be changed as well.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    if [ $device -eq "tun" ]; then

    Even better:

    if [ ${device^^} -eq "TUN" ]; then

    • Offizieller Beitrag

    You also need a migration file in /usr/share/openmediavault/confdb/migrations.d/ to add the new database fields when updating to this version. See https://github.com/OpenMediaVa…vault/confdb/migrations.d as an example.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    f its possible to prepare "testing" version and help me how to install it, I can do tests as well for you!


    Thanks!!


    edit: not translated to all languages :-/

    I can create a testing version.


    Language translation is automated. The translations should be entered on transifex. - https://www.transifex.com/openmediavault-plugin-developers/

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    As i can see, there is a check if "new" variable exists or not. If not, create with default value - am I right?

    yep.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Here we go (added 3 variables):

    • Offizieller Beitrag
  • Error #0:
    RuntimeException: Failed to index key 'device' of 'device.0' because it has no children. in /usr/share/php/openmediavault/dictionary.inc:145
    Stack trace:
    #0 /usr/share/php/openmediavault/config/configobject.inc(194): OMV\Dictionary->set('device.0', 'tun')
    #1 /usr/share/php/openmediavault/config/configobject.inc(272): OMV\Config\ConfigObject->set('device.0', 'tun', false)
    #2 /usr/share/php/openmediavault/config/configobject.inc(234): OMV\Config\ConfigObject->setFlatAssoc(Array, false, false)
    #3 /usr/share/php/openmediavault/config/database.inc(99): OMV\Config\ConfigObject->setAssoc(Array, false)
    #4 /usr/share/openmediavault/engined/module/openvpn.inc(68): OMV\Config\Database->get('conf.service.op...')
    #5 /usr/share/openmediavault/engined/rpc/services.inc(60): OMV\Engined\Module\OpenVpn->getStatus()
    #6 [internal function]: Engined\Rpc\Services->getStatus(Array, Array)
    #7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #8 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getStatus', Array, Array)
    #9 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Services', 'getStatus', Array, Array, 1)
    #10 {main}

    • Offizieller Beitrag

    I forgot that device is a reserved word. I will have to change that. What is a different descriptive word for device in this plugin?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    how about change everything to "device_type" or maybe better "device_ovpn"

    I will change to deviceovpn (underscores and dashes can be troublesome).

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    The package is updated.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!