[pve-devel] [PATCH] Added Firewall Forward rules and policy (needs updated Firewall API)
Flavius Bindea
flav at flav.com
Sat May 9 19:27:12 CEST 2015
---
www/manager/grid/FirewallOptions.js | 17 +++++++++++++++++
www/manager/grid/FirewallRules.js | 4 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/www/manager/grid/FirewallOptions.js b/www/manager/grid/FirewallOptions.js
index f94be6c..fcd1600 100644
--- a/www/manager/grid/FirewallOptions.js
+++ b/www/manager/grid/FirewallOptions.js
@@ -111,6 +111,7 @@ Ext.define('PVE.FirewallOptions', {
add_integer_row('nf_conntrack_tcp_timeout_established',
'nf_conntrack_tcp_timeout_established', 250, 7875);
add_log_row('log_level_in');
+ add_log_row('log_level_forward');
add_log_row('log_level_out');
add_log_row('tcp_flags_log_level', 120);
add_log_row('smurf_log_level');
@@ -141,6 +142,22 @@ Ext.define('PVE.FirewallOptions', {
}
};
+ rows.policy_forward = {
+ header: gettext('Forward Policy'),
+ required: true,
+ defaultValue: 'ACCEPT',
+ editor: {
+ xtype: 'pveWindowEdit',
+ subject: gettext('Forward Policy'),
+ items: {
+ xtype: 'pveFirewallPolicySelector',
+ name: 'policy_forward',
+ value: 'ACCEPT',
+ fieldLabel: gettext('Forward Policy')
+ }
+ }
+ };
+
rows.policy_out = {
header: gettext('Output Policy'),
required: true,
diff --git a/www/manager/grid/FirewallRules.js b/www/manager/grid/FirewallRules.js
index ae53637..bece8ed 100644
--- a/www/manager/grid/FirewallRules.js
+++ b/www/manager/grid/FirewallRules.js
@@ -90,7 +90,7 @@ Ext.define('PVE.FirewallRulePanel', {
xtype: 'pveKVComboBox',
name: 'type',
value: 'in',
- data: [['in', 'in'], ['out', 'out']],
+ data: [['in', 'in'], ['out', 'out'], ['forward', 'forward']],
fieldLabel: gettext('Direction'),
allowBlank: false
},
@@ -512,7 +512,7 @@ Ext.define('PVE.FirewallRules', {
var type = rec.data.type;
var editor;
- if (type === 'in' || type === 'out') {
+ if (type === 'in' || type === 'out' || type === 'forward') {
editor = 'PVE.FirewallRuleEdit';
} else if (type === 'group') {
editor = 'PVE.FirewallGroupRuleEdit';
--
1.7.10.4
More information about the pve-devel
mailing list