opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.31k stars 738 forks source link

[Feuture Request] Add templates for VLANs #1713

Closed enoch85 closed 6 years ago

enoch85 commented 7 years ago

Let's say I want to set up 200 VLANs with different settings, I'd want this process to be smooth. Right now I have to add both Interface, VLAN tag, DHCP settings, Firewall Settings and so on to all the different hosts.

This could be solved with a template that auto generates new IP address for the new host, creates and interface based on template name, prefills it with firewall settings and leaves me with a predefined VLAN. Voila, you just saved me with a ton of work. :)

It's useful in larger networks and if you just want to divide your network into larger VLANs.

fichtner commented 7 years ago

I agree. This is a traditional "wizard" use case which we should have, but not until we have replaced the old XML-based wizard for a less arcane approach using our template engine and a simple MVC application.

AdSchellevis commented 7 years ago

Maybe we could do a shortcut here, accept a range when adding a vlan "VLAN tag" 1-255 for example.

enoch85 commented 7 years ago

@AdSchellevis Sure, a shortcut would be nice, but is far from a complete solution.

What I mean is a default template where you fill in which default settings you want to apply to each host/interface using the template.

So as I mentioned, firewall settings for example. It could look something like this:

  1. Create a template with all the settings:
    • Firewall rules
    • Which subnet should be used
    • Assignment (interfaces)
    • VLAN tag number (show the next available, like if if 1003 is the latest, suggest 1004)
    • DHCP settings (range for example),
    • If you want to add a range to a specific Alias
    • and so on and so on...
  2. When adding an interface click "use template" then choose from a list.
AdSchellevis commented 7 years ago

ok, no shortcut, but keep in mind, a request this size is unlikely to mature... (needs api support for all items in your list first, then a solid wizard extension, etc, etc)....

fichtner commented 7 years ago

what if the new "wizard" is the api and we do the model handling underneath? assuming we have all required models of course...

AdSchellevis commented 7 years ago

The wizard is not the issue (for example http://www.jquery-steps.com/Examples has some nice options, which might suit our needs), its the size of the request which makes it unlikely to mature. There's still quite some complexity to migrate all requested modules, while keeping all functionality in tact... just saying, you can ask, but don't be disappointed if the request closes in 6-12 months for lack of progress..

enoch85 commented 7 years ago

@AdSchellevis Can't we at least start with something small, and build it from there? For instance, start with your "shortcut" and firewall settings...

I would be fine with a wizard (e.g "Add new VLAN") that gets better and better. At least as a start until everything is in place for a real template.

AdSchellevis commented 7 years ago

sure, we can do steps which don't break future plans, but not in a wizard to glue all together (which will get very messy if we try to pull old code in)...

So we either solve one issue (can I create multiple vlan's at once, which fits the current screen), or we wait for the module to be rebuild and take it step by step from there (which won't likely mature anytime soon because of the amount of time needed to achieve it).

If your planning to work on parts, try to keep changes small so we can guide you through the process.

enoch85 commented 7 years ago

@AdSchellevis Sorry, I don't have the skills, but I'd prefer to keep this open, even in 6-12 months.

Would be awesome if you could work on it.

AdSchellevis commented 6 years ago

timeout

enoch85 commented 6 years ago

:(

lordkitsuna commented 6 years ago

Sad that this died, its the single biggest thing i am missing from Pfsense. trying to setup the rules is insanely tedious and annoying and its filled with trial and error to see if what you are doing is even working. The documentation doesnt really help. Some nice boxes to tick for common use scenarios such as prioritizing common game networks (XBL, Steam, Battlenet etc) as well as common VOIP platforms (Discord, Skype, Slack etc) would go a long way.

enoch85 commented 6 years ago

Sad that this died

Agreed.