/
pfblockerng_sync.xml
199 lines (199 loc) · 6.67 KB
/
pfblockerng_sync.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
<![CDATA[
/*
* pfblockerng_sync.xml
*
* part of pfSense (https://www.pfsense.org)
* Copyright (c) 2015-2024 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2015-2016 BBcan177@gmail.com
* All rights reserved.
*
* Originally based upon pfBlocker by
* Copyright (c) 2011 Marcello Coutinho
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
]]>
</copyright>
<name>pfblockerngsync</name>
<title>Firewall/pfBlockerNG</title>
<include_file>/usr/local/pkg/pfblockerng/pfblockerng.inc</include_file>
<addedit_string>pfBlockerNG: Save XMLRPC Sync settings</addedit_string>
<savehelp><![CDATA[<strong>Click to SAVE Settings and/or Rule edits. Changes are applied via CRON or
'Force Update'</strong>]]>
</savehelp>
<menu>
<name>pfBlockerNG</name>
<section>Services</section>
<url>pkg_edit.php?xml=pfblockerng.xml</url>
</menu>
<tabs>
<tab>
<text>General</text>
<url>/pkg_edit.php?xml=pfblockerng.xml</url>
</tab>
<tab>
<text>Update</text>
<url>/pfblockerng/pfblockerng_update.php</url>
</tab>
<tab>
<text>Alerts</text>
<url>/pfblockerng/pfblockerng_alerts.php</url>
</tab>
<tab>
<text>Reputation</text>
<url>/pkg_edit.php?xml=/pfblockerng/pfblockerng_reputation.xml</url>
</tab>
<tab>
<text>IPv4</text>
<url>/pkg.php?xml=/pfblockerng/pfblockerng_v4lists.xml</url>
</tab>
<tab>
<text>IPv6</text>
<url>/pkg.php?xml=/pfblockerng/pfblockerng_v6lists.xml</url>
</tab>
<tab>
<text>DNSBL</text>
<url>/pkg_edit.php?xml=/pfblockerng/pfblockerng_dnsbl.xml</url>
</tab>
<tab>
<text>GeoIP</text>
<url>/pkg_edit.php?xml=/pfblockerng/pfblockerng_TopSpammers.xml</url>
</tab>
<tab>
<text>Logs</text>
<url>/pfblockerng/pfblockerng_log.php</url>
</tab>
<tab>
<text>Sync</text>
<url>/pkg_edit.php?xml=/pfblockerng/pfblockerng_sync.xml</url>
<active/>
</tab>
</tabs>
<fields>
<field>
<name>pfBlockerNG XMLRPC Sync Settings</name>
<type>listtopic</type>
</field>
<field>
<fielddescr>LINKS</fielddescr>
<description><![CDATA[<a href="/firewall_aliases.php">Firewall Alias</a> 
<a href="/firewall_rules.php">Firewall Rules</a> <a href="status_logs_filter.php">Firewall Logs</a>]]>
</description>
<type>info</type>
</field>
<field>
<fielddescr>Enable Sync</fielddescr>
<fieldname>varsynconchanges</fieldname>
<description><![CDATA[When enabled, this will sync all configuration settings to the Replication Targets.<br /><br />
<b>Important:</b> While using "Sync to hosts defined below", only sync from host A to B, A to C
<br /> but <b>do not</b> enable XMLRPC sync <b>to</b> A. This will result in a loop!]]>
</description>
<type>select</type>
<required/>
<default_value>disabled</default_value>
<options>
<option><name>Do not sync this package configuration</name><value>disabled</value></option>
<option><name>Sync to configured system backup server</name><value>auto</value></option>
<option><name>Sync to host(s) defined below</name><value>manual</value></option>
</options>
</field>
<field>
<fielddescr>XMLRPC Timeout</fielddescr>
<fieldname>varsynctimeout</fieldname>
<description><![CDATA[Timeout in seconds for the XMLRPC timeout. Default: 150]]></description>
<type>input</type>
<default_value>150</default_value>
</field>
<field>
<fielddescr><![CDATA[Disable 'General/DNSBL tab' sync]]></fielddescr>
<fieldname>syncinterfaces</fieldname>
<description>When selected, the 'General' tab and 'DNSBL' tab customizations will not be sync'd</description>
<type>checkbox</type>
</field>
<field>
<name>pfBlockerNG XMLRPC Replication Targets</name>
<type>listtopic</type>
</field>
<field>
<fielddescr>Replication Targets</fielddescr>
<type>rowhelper</type>
<rowhelper>
<rowhelperfield>
<fielddescr>Enable</fielddescr>
<fieldname>varsyncdestinenable</fieldname>
<description><![CDATA[Enable this host as a replication target]]></description>
<type>checkbox</type>
<width>1</width>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Protocol</fielddescr>
<fieldname>varsyncprotocol</fieldname>
<description><![CDATA[Choose the protocol of the destination host. Probably <b>http</b> or <b>https</b>]]></description>
<type>select</type>
<width>1</width>
<default_value>HTTP</default_value>
<options>
<option><name>HTTP</name><value>http</value></option>
<option><name>HTTPS</name><value>https</value></option>
</options>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Target IP/Hostname</fielddescr>
<fieldname>varsyncipaddress</fieldname>
<description><![CDATA[IP Address or Hostname of the destination host.]]></description>
<type>input</type>
<width>1</width>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Target Port</fielddescr>
<fieldname>varsyncport</fieldname>
<description><![CDATA[Choose the sync port of the destination host.]]></description>
<type>input</type>
<width>1</width>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Target Username (admin)</fielddescr>
<fieldname>varsyncusername</fieldname>
<description><![CDATA[Enter the Username Account for Authentication]]></description>
<type>input</type>
<width>2</width>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Target Password</fielddescr>
<fieldname>varsyncpassword</fieldname>
<description><![CDATA[Password of the user 'admin' on the destination host.]]></description>
<type>password</type>
<width>2</width>
</rowhelperfield>
</rowhelper>
</field>
</fields>
<custom_php_validation_command>
<![CDATA[
pfblockerng_validate_input($_POST, $input_errors);
]]>
</custom_php_validation_command>
<custom_php_resync_config_command>
<![CDATA[
require_once("/usr/local/pkg/pfblockerng/pfblockerng.inc");
write_config("[pfBlockerNG] XMLRPC sync configurations saved.");
pfblockerng_sync_on_changes();
]]>
</custom_php_resync_config_command>
</packagegui>