OPNsense Forum

English Forums => Development and Code Review => Topic started by: eshield on October 27, 2017, 11:24:06 am

Title: Feature request: Shellcmd like GUI plugin
Post by: eshield on October 27, 2017, 11:24:06 am
Hello,

2 years ago Shellcmd was deleted from OPNsense, but nothing was added instead. It would be extra great and uber awesome to have some nice and sweet replacement for 2 years dead Shellcmd GUI.

Thanks.
Title: Re: Feature request: Shellcmd like GUI plugin
Post by: franco on October 27, 2017, 12:14:36 pm
Hi,

We are not fond of arbitrary commands in the config models to proactively prevent faulty or malicious injection.

You can, however, persistently modify your system to meet your requirements:

https://docs.opnsense.org/development/backend/autorun.html
https://docs.opnsense.org/development/backend/configd.html

These two facilities can also be used to build plugins for easier distribution of your custom commands. Plugin repositories can be registered alongside official repositories if need be.

No quick fix, but really a lot of flexibility and scalability. :)


Cheers,
Franco
Title: Re: Feature request: Shellcmd like GUI plugin
Post by: xinnan on October 27, 2017, 12:37:57 pm
When on windows, I run a small ubuntu server VM with 256mb of ram and a single core on my desktop if I suddenly need access to the console. I ssh in and execute commands from there.  Optionally, a VM with a desktop is nice because it allows web access in the VM, easy cut/copy/paste etc.  And your firewall remains unmolested.  These can be opened and closed as easily as opening a word document. 
Title: Re: Feature request: Shellcmd like GUI plugin
Post by: eshield on October 27, 2017, 03:10:08 pm
Hi,

We are not fond of arbitrary commands in the config models to proactively prevent faulty or malicious injection.

You can, however, persistently modify your system to meet your requirements:

https://docs.opnsense.org/development/backend/autorun.html
https://docs.opnsense.org/development/backend/configd.html

These two facilities can also be used to build plugins for easier distribution of your custom commands. Plugin repositories can be registered alongside official repositories if need be.

No quick fix, but really a lot of flexibility and scalability. :)


Cheers,
Franco

Awesome! Thanks. Just played with configd and it works! Is it possible to run my action after boot or I should use autorun?
Title: Re: Feature request: Shellcmd like GUI plugin
Post by: franco on October 27, 2017, 03:52:45 pm
Hi there,

You can use both of them in tandem, if you need them to (early) start.

Just make sure you are not running a configd command in early start when configd is not yet running.


Cheers,
Franco