mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-12 11:21:55 +00:00
72 lines
2.3 KiB
Diff
72 lines
2.3 KiB
Diff
diff --git a/luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js b/luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js
|
|
index d891526..04fd5af 100644
|
|
--- a/luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js
|
|
+++ b/luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js
|
|
@@ -672,26 +672,12 @@ return view.extend({
|
|
return node;
|
|
},
|
|
|
|
- checkLegacyRules: function(ipt4save, ipt6save) {
|
|
- if (ipt4save.match(/\n-A /) || ipt6save.match(/\n-A /)) {
|
|
- ui.addNotification(_('Legacy rules detected'), [
|
|
- E('p', _('There are legacy iptables rules present on the system. Mixing iptables and nftables rules is discouraged and may lead to incomplete traffic filtering.')),
|
|
- E('button', {
|
|
- 'class': 'btn cbi-button',
|
|
- 'click': function() { location.href = 'nftables/iptables' }
|
|
- }, _('Open iptables rules overview…'))
|
|
- ], 'warning');
|
|
- }
|
|
- },
|
|
-
|
|
render: function(data) {
|
|
var view = E('div'),
|
|
nft = data[0],
|
|
ipt = data[1],
|
|
ipt6 = data[2];
|
|
|
|
- this.checkLegacyRules(ipt, ipt6);
|
|
-
|
|
if (!Array.isArray(nft.nftables))
|
|
return E('em', _('No nftables ruleset loaded.'));
|
|
|
|
diff --git a/luci/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json b/luci/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
|
|
index 190eef0..e9cf485 100644
|
|
--- a/luci/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
|
|
+++ b/luci/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
|
|
@@ -39,20 +39,33 @@
|
|
}
|
|
},
|
|
|
|
- "admin/status/nftables": {
|
|
+ "admin/status/firewall": {
|
|
"title": "Firewall",
|
|
"order": 3,
|
|
+ "action": {
|
|
+ "type": "alias",
|
|
+ "path": "admin/status/firewall/nftables"
|
|
+ },
|
|
+ "depends": {
|
|
+ "acl": [ "luci-mod-status-firewall" ]
|
|
+ }
|
|
+ },
|
|
+
|
|
+ "admin/status/firewall/nftables": {
|
|
+ "title": "NFtables Firewall",
|
|
+ "order": 1,
|
|
"action": {
|
|
"type": "view",
|
|
"path": "status/nftables"
|
|
},
|
|
"depends": {
|
|
- "acl": [ "luci-mod-status-firewall" ],
|
|
"fs": { "/usr/sbin/nft": "executable" }
|
|
}
|
|
},
|
|
|
|
- "admin/status/nftables/iptables": {
|
|
+ "admin/status/firewall/iptables": {
|
|
+ "title": "IPtables Firewall",
|
|
+ "order": 2,
|
|
"action": {
|
|
"type": "view",
|
|
"path": "status/iptables"
|