125 Commits

Author SHA1 Message Date
Ad Schellevis
b00902e46c Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
escape category option values.
2021-01-14 17:07:17 +01:00
Ad Schellevis
fab8222aea Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
remove spacing from tokenize options, Tokenize2 doesn't seem to trim values (breakng auto-complete in this case)
2021-01-13 19:05:46 +01:00
Ad Schellevis
416fc37ee9 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
o replace type ahead with tokenizer (mutli select) while here, since the type ahead needed fixes which we rather don't copy to the other firewall sections
o we might want to change the model serializeToConfig() and reload and send it to a separate function in config.inc later to ease migration later. Part of it could be separated with a callback, but it's not super needed
o hook categories into model for firewall rules
2021-01-12 18:14:50 +01:00
Ad Schellevis
06b1804a3d firewall rules, type in for for https://github.com/opnsense/core/issues/4493 closes https://github.com/opnsense/core/issues/4562 2020-12-31 17:31:16 +01:00
Ad Schellevis
c02155630e Firewall: minor validation issue (ipv6-icmp inet), closes https://github.com/opnsense/core/issues/4493 2020-11-30 17:10:27 +01:00
Ad Schellevis
323c2f8286 firewall: categories typeahead issue, closes https://github.com/opnsense/core/issues/4126
Although this isn't a great fix, we can prevent forking https://github.com/bassjobsen/Bootstrap-3-Typeahead for now and hope someone fixes the relative issue some day.
When Typeahead inputs aren't in relative containers, postition() returns the correct values, which is why our quick menu search likely still works.
2020-05-24 15:19:29 +02:00
Franco Fichtner
6bb03c1806 firewall: remove two sentences via IRC question raised
The default implies to leave it that way if unsure.  The ominous
warning means nothing without explanation, but the effect is
clear for people wanting to use another setting for direction:

o Egress rules filter on outbound, so half the performance passing
  traffic inwards is already wasted by not dropping it on inbound.

o Egress rules cannot set policy routes since policy routes set
  outbound interface on inbound and thus the decision was already
  made.
2019-09-30 09:28:39 +02:00
Ad Schellevis
04c1decd19 firewall, rules. make sure "tcp flags" input matches description. suggestion for https://github.com/opnsense/core/issues/3714 2019-09-23 18:48:37 +02:00
Ad Schellevis
01c16b0a86
Firewall, allow quick and direction on interface rules, closes https://github.com/opnsense/core/issues/3594
Currently the direction of the traffic can only be chosen in floating rules, but in some scenario's it's much easier to create outbound rules (only inbound is supported now).

When using a lot of interfaces, which should all be allowed to access devices on one specific interface, this would save quite some rules and is easier to track for the administrator.

This feature adds direction as on option and while already changing these pages, also allow to create "non quick" rules on interfaces.
Functionally the "regular" rules would be more aligned with the "floating" rules as we have now, with the exception that you can't add multiple interfaces in a normal rule due to the inability to reorder a single rule in multiple rulesets (rules are positional).

Policy based routing on outbound rules is not supported on the interface rules for now, since it would probably lead to confusion.
The old configuration defaults still apply, when writing an entry, both quick and direction are saved as well (default quick + in).
2019-08-01 09:37:24 +02:00
Ad Schellevis
34e942ad16 firewall_rules_edit.php, gateway validation issue (trying to validate groups). closes https://github.com/opnsense/core/issues/3511 2019-06-07 14:54:52 +02:00
Franco Fichtner
d9f70415fa firewall: translation fixes 2019-05-05 13:13:19 +02:00
Ad Schellevis
0ea621cab3 Routing, gateway groups, use new class methods in filter and filter edit page, for https://github.com/opnsense/core/issues/2279 2019-04-16 13:57:29 +02:00
Ad Schellevis
1a55473032 Filter, add ipv6-icmp type selection, closes https://github.com/opnsense/core/issues/3412 2019-04-15 14:54:19 +02:00
Ad Schellevis
49388ca2c6 Routing, gateways. ditch lookup_gateway_ip_by_name() usage from firewall_rules_edit.php, for https://github.com/opnsense/core/issues/2279 2019-04-12 15:05:07 +02:00
Ad Schellevis
c593906501 Routing, gateways, ditch another return_gateways_array() in firewall_rules_edit.php for https://github.com/opnsense/core/issues/2279 2019-04-11 20:51:44 +02:00
Ad Schellevis
0dddfd14cd missed a spot in previous, for https://github.com/opnsense/core/issues/2279 2019-04-10 17:49:29 +02:00
Ad Schellevis
1f6aac10a4 filter, edit rule. ditch validate_address_family(), cleanups for https://github.com/opnsense/core/issues/2279 2019-04-10 17:43:16 +02:00
Franco Fichtner
7ee5ed2a43 www: style updates 2019-03-03 10:44:38 +01:00
Franco Fichtner
0b879022ae www: d+f for #3218 2019-02-14 12:31:48 +01:00
Ad Schellevis
4a8e737ced fix some gettext() + html_safe, discussed c4c7f8d732 2019-02-03 20:04:08 +01:00
Ad Schellevis
7ad7f55bca fix some escape issues in legacy code 2019-01-29 19:05:33 +01:00
Michael Steenbeek
71774ab376 Fix implicit Javascript global variable assignments (#2945) 2018-12-03 13:17:02 +01:00
Michael Steenbeek
98247373d0 Remove nonexistant CSS properties
The table attributes 'cellspacing' and 'cellpadding' were moved inside the style attribute via a script. However, they are not valid CSS properties, so browsers should (and do) ignore them.
This commit removes them. The 'table' class, set on most tables, should take care of proper formatting anyway.
2018-12-03 12:01:41 +01:00
Michael Steenbeek
7ad3d8dff6 Replace some trivial double quotes with single ones 2018-11-23 14:36:44 +01:00
Michael Steenbeek
19ce1c57a4 Replace uncommon <> notation with != 2018-11-23 14:36:44 +01:00
Franco Fichtner
a095c72857 firewall: avoid translating "by", remove excessive markup 2018-11-22 09:04:15 +01:00
Franco Fichtner
574bd308be src: remove trailing dot workaround by removing trailing dots 2018-09-16 11:44:13 +02:00
Franco Fichtner
a0e3630364 src: unify the label printing of interfaces
This annoyed me for a long time: always print the literal description
if found, only use uppercase on the interface key if no description
is available.
2018-05-04 08:15:52 +00:00
Franco Fichtner
10cf1bbcc2 www: more of the same typo 2018-05-03 21:34:29 +02:00
Franco Fichtner
b2d4863a5a firewall: two more 2018-03-30 14:43:47 +02:00
Franco Fichtner
f3cedc2a66 firewall: remove spurious line 2018-03-30 14:41:07 +02:00
Franco Fichtner
e9c3be35d6 www: visual cleanups, unused class/style zapping #2290 2018-03-25 13:10:27 +00:00
NOYB
9d96bdcbc7 Help For - Data For Attribute
Use original element (<div>/<small>) with "data-for" attribute.

The old jquery "for" attribute selectors can be removed once conversion to "data-for" attribute is complete (including plugins).

The old jquery selectors to remove once conversion is complete.
  opnsense_ui.js & head.inc
  $("*[for='" + $(this).attr('id') + "']")....
  $('[for*="help_for"]')....
2018-03-17 16:12:55 +01:00
Franco Fichtner
dd71f72b45 src: style fix 2018-03-11 00:13:02 +01:00
NOYB
6ef9a127ff HTML Compliance - Attribute "type" on Element <script>
Warning: The type attribute is unnecessary for JavaScript resources.

HTML5: Edition for Web Authors
http://www.w3.org/TR/2014/REC-html5-20141028/scripting-1.html
The default, which is used if the attribute is absent, is "text/javascript".

The Script element
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.
2018-01-22 19:13:34 +01:00
NOYB
4a7bcae7af HTML Compliance - Attribute "for" on Element <div>
Error: Attribute "for" not allowed on element "div" at this point.
Attributes for element "div": http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-div-element

HTML attribute reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
The "Output" element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output

Attributes for element "output": http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-output-element
2018-01-06 10:52:17 +01:00
NOYB
b2f4cfa7c1 HTML Compliance - Attribute "type" on Element <i>
Error: Attribute "type" not allowed on element <i> at this point.
2018-01-05 08:36:26 +01:00
NOYB
76aab5cb52 HTML Compliance - Obsolete table attributes
width, align, valign, cellpadding, cellspacing, border, summary

Error: The width attribute on the table element is obsolete. Use CSS instead.
Error: The align attribute on the table element is obsolete. Use CSS instead.
Error: The valign attribute on the table element is obsolete. Use CSS instead.
Error: The cellpadding attribute on the table element is obsolete. Use CSS instead.
Error: The cellspacing attribute on the table element is obsolete. Use CSS instead.
Error: The border attribute on the table element is obsolete. Use CSS instead.
Error: The summary attribute on the table element is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is needed.
2018-01-04 18:26:02 +01:00
Franco Fichtner
db785c954f firewall: fix rules edit cancel menu behaviour #1928 2017-11-21 05:24:01 +00:00
Franco Fichtner
41f5a7fba4 firewall: better label for "main"; closes #1719 2017-08-06 00:24:36 +02:00
Ad Schellevis
69510a5fad legacy ui pages cleanup for https://github.com/opnsense/core/issues/1733 2017-07-22 15:01:26 +02:00
Ad Schellevis
2d2771acb3 filter, skip well-known ports for ranges, closes https://github.com/opnsense/core/issues/1605 2017-05-04 20:21:31 +02:00
Ad Schellevis
f296f6810c gwlb, found the use... 2dbc3ab259 2017-04-16 19:13:40 +02:00
Franco Fichtner
500539234d firewall: properly reload cron for scheduled rules; closes #1483 2017-03-20 08:45:18 +01:00
Franco Fichtner
87dfc1f126 firewall: add tag/tagged to port forwarding for #1423
It's a bit funny that the help text indicates we can use tag/tagged with
NAT rules as well, because this was never implemented although it really
works.
2017-03-05 20:09:27 +01:00
Ian Matyssik
d0b0ca28c2 Add modulate state as an option for state tracking 2017-02-24 14:59:23 +09:00
Franco Fichtner
eacf920fa8 firewall: feedback from @djGrrr 2017-02-13 07:50:41 +01:00
Franco Fichtner
ee0e0eaeed firewall: improve validation on previous 2017-02-12 19:33:46 +01:00
Franco Fichtner
c7ac2083f6 firewall: array_merge() throws off indices 2017-02-12 19:28:04 +01:00
Franco Fichtner
0c09631552 firewall: ints are confusing 2017-02-12 19:12:33 +01:00