From f724d6b684196349b8e46aac2f4f2730d30e7b58 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 19 Sep 2007 16:50:44 +0000 Subject: Backport alias import option to RELENG_1 from HEAD. --- usr/local/www/firewall_aliases.php | 6 ++ usr/local/www/firewall_aliases_import.php | 107 ++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100755 usr/local/www/firewall_aliases_import.php (limited to 'usr/local/www') diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php index e453200..0fb924f 100755 --- a/usr/local/www/firewall_aliases.php +++ b/usr/local/www/firewall_aliases.php @@ -207,6 +207,12 @@ include("head.inc");   + + + + " alt="" /> + + diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php new file mode 100755 index 0000000..31990f1 --- /dev/null +++ b/usr/local/www/firewall_aliases_import.php @@ -0,0 +1,107 @@ + "") { + $reqdfields = explode(" ", "name aliasimport"); + $reqdfieldsn = explode(",", "Name,Aliases"); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + + if (!$input_errors) { + $alias = array(); + $alias['address'] = str_replace("\n", " ", $_POST['aliasimport']); + $alias['name'] = $_POST['name']; + $alias['descr'] = $_POST['descr']; + $a_aliases[] = $alias; + write_config(); + + pfSenseHeader("firewall_aliases.php"); + + exit; + } +} + +include("head.inc"); + +?> + + +

+ +
+
+
+ + + + + + + + + + + + + + + + +
Alias Name +
+ The name of the alias may only consist of the characters a-z, A-Z and 0-9.
Description +
You may enter a description here + for your reference (not parsed).
Aliases to import +
Paste in the aliases to import seperated by a carriage return. Common examples are list of ips, networks, blacklists, etc.
  + + +
+ + +
+
+ + + + + + + + + -- cgit v1.1