mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-10 23:22:33 +02:00
ticket #2; renamed host os resource files; fixed dialog factory to get right dialog for ipcop
This commit is contained in:
+11
-10
@@ -444,27 +444,28 @@ AC_CONFIG_FILES([ src/res/objects_init.xml ])
|
|||||||
AC_CONFIG_FILES([ src/res/templates.xml ])
|
AC_CONFIG_FILES([ src/res/templates.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/resources.xml ])
|
AC_CONFIG_FILES([ src/res/resources.xml ])
|
||||||
|
|
||||||
AC_CONFIG_FILES([ src/res/os/fwsm_os.xml ])
|
AC_CONFIG_FILES([ src/res/os/endian.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/os/freebsd.xml ])
|
AC_CONFIG_FILES([ src/res/os/freebsd.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/os/linux24.xml ])
|
AC_CONFIG_FILES([ src/res/os/fwsm_os.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/os/linksys.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/macosx.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/openbsd.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/pix_os.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/ios.xml ])
|
AC_CONFIG_FILES([ src/res/os/ios.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/ipcop.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/linksys.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/linux24.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/macosx.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/oneshield.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/openbsd.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/openwrt.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/os/pix_os.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/os/solaris.xml ])
|
AC_CONFIG_FILES([ src/res/os/solaris.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/os/ipcop_os.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/endian_os.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/oneshield_os.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/os/unknown_os.xml ])
|
AC_CONFIG_FILES([ src/res/os/unknown_os.xml ])
|
||||||
|
|
||||||
AC_CONFIG_FILES([ src/res/platform/fwsm.xml ])
|
AC_CONFIG_FILES([ src/res/platform/fwsm.xml ])
|
||||||
|
AC_CONFIG_FILES([ src/res/platform/iosacl.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/platform/ipf.xml ])
|
AC_CONFIG_FILES([ src/res/platform/ipf.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/platform/ipfw.xml ])
|
AC_CONFIG_FILES([ src/res/platform/ipfw.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/platform/iptables.xml ])
|
AC_CONFIG_FILES([ src/res/platform/iptables.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/platform/pf.xml ])
|
AC_CONFIG_FILES([ src/res/platform/pf.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/platform/pix.xml ])
|
AC_CONFIG_FILES([ src/res/platform/pix.xml ])
|
||||||
AC_CONFIG_FILES([ src/res/platform/iosacl.xml ])
|
|
||||||
AC_CONFIG_FILES([ src/res/platform/unknown.xml ])
|
AC_CONFIG_FILES([ src/res/platform/unknown.xml ])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
2009-05-09 vadim <vadim@vk.crocodile.org>
|
2009-05-09 vadim <vadim@vk.crocodile.org>
|
||||||
|
|
||||||
|
* OSConfigurator_linux24.cpp (OSConfigurator_linux24::printShellFunctions):
|
||||||
|
Moved configuration for the location of kernel modules to host os
|
||||||
|
resource file (attribute Target/options/default/modules_dir). The
|
||||||
|
value of this attribute is different for OpenWRT. This fixes
|
||||||
|
ticket #2.
|
||||||
|
|
||||||
|
* DialogFactory.cpp (DialogFactory::createFWDialog): Now that we
|
||||||
|
use common platform "iptables" for linux-based appliances and
|
||||||
|
differentiate then by host_OS, dialog for IPCOP, Endian and
|
||||||
|
OneShield is determined using combination of platform and
|
||||||
|
host family attribute from the os resource file.
|
||||||
|
|
||||||
|
* OSConfigurator_linux24.cpp (OSConfigurator_linux24::printShellFunctions):
|
||||||
|
Fixes #2: added host OS "OpenWRT"; the only difference at this time
|
||||||
|
is the path to the directory where kernel modules are found.
|
||||||
|
|
||||||
* ipt.cpp (main): Now that we use the same platform name for
|
* ipt.cpp (main): Now that we use the same platform name for
|
||||||
iptables on linux, ipcop, endian, oneshield and secuwall, there is
|
iptables on linux, ipcop, endian, oneshield and secuwall, there is
|
||||||
no need in policy/nat/routing compiler classes for ipcop.
|
no need in policy/nat/routing compiler classes for ipcop.
|
||||||
|
|||||||
+45
-24
@@ -177,23 +177,39 @@ QWidget *DialogFactory::createDialog(ProjectPanel *project, QWidget *parent,cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QWidget *DialogFactory::createFWDialog(QWidget *parent,FWObject *o)
|
QWidget *DialogFactory::createFWDialog(QWidget *parent, FWObject *o)
|
||||||
throw(FWException)
|
throw(FWException)
|
||||||
{
|
{
|
||||||
Resources* platform = Resources::platform_res[o->getStr("platform")];
|
string platform = o->getStr("platform");
|
||||||
if (platform==NULL)
|
string host_os = o->getStr("host_OS");
|
||||||
throw FWException((const char*)(QObject::tr("Support module for %1 is not available").arg(o->getStr("platform").c_str()).toLocal8Bit().constData()));
|
|
||||||
|
|
||||||
string dlgname = platform->Resources::getResourceStr("/FWBuilderResources/Target/dialog");
|
Resources* platform_res = Resources::platform_res[platform];
|
||||||
|
if (platform_res==NULL)
|
||||||
|
throw FWException(
|
||||||
|
(const char*)(QObject::tr("Support module for %1 is not available").
|
||||||
|
arg(platform.c_str()).toLocal8Bit().constData()));
|
||||||
|
|
||||||
|
Resources* os_res = Resources::os_res[host_os];
|
||||||
|
if (os_res==NULL)
|
||||||
|
throw FWException(
|
||||||
|
(const char*)(QObject::tr("Support module for %1 is not available").
|
||||||
|
arg(host_os.c_str()).toLocal8Bit().constData()));
|
||||||
|
|
||||||
|
string os_family = os_res->getResourceStr(
|
||||||
|
"/FWBuilderResources/Target/family");
|
||||||
|
|
||||||
|
string dlgname = platform_res->Resources::getResourceStr(
|
||||||
|
"/FWBuilderResources/Target/dialog");
|
||||||
|
if (platform == "iptables" && os_family == "ipcop")
|
||||||
|
dlgname = "ipcop";
|
||||||
|
|
||||||
// string pl=o->getStr("platform");
|
|
||||||
if (dlgname=="iptables") return new iptAdvancedDialog(parent,o);
|
|
||||||
if (dlgname=="ipf") return new ipfAdvancedDialog(parent,o);
|
|
||||||
if (dlgname=="ipfw") return new ipfwAdvancedDialog(parent,o);
|
|
||||||
if (dlgname=="pf") return new pfAdvancedDialog(parent,o);
|
|
||||||
if (dlgname=="pix") return new pixAdvancedDialog(parent,o);
|
|
||||||
if (dlgname=="iosacl") return new iosaclAdvancedDialog(parent,o);
|
if (dlgname=="iosacl") return new iosaclAdvancedDialog(parent,o);
|
||||||
if (dlgname=="ipcop") return new ipcopAdvancedDialog(parent,o);
|
if (dlgname=="ipcop") return new ipcopAdvancedDialog(parent,o);
|
||||||
|
if (dlgname=="ipf") return new ipfAdvancedDialog(parent,o);
|
||||||
|
if (dlgname=="ipfw") return new ipfwAdvancedDialog(parent,o);
|
||||||
|
if (dlgname=="iptables") return new iptAdvancedDialog(parent,o);
|
||||||
|
if (dlgname=="pf") return new pfAdvancedDialog(parent,o);
|
||||||
|
if (dlgname=="pix") return new pixAdvancedDialog(parent,o);
|
||||||
|
|
||||||
cerr << "Firewall settings dialog for " << dlgname
|
cerr << "Firewall settings dialog for " << dlgname
|
||||||
<< " is not implemented" << endl;
|
<< " is not implemented" << endl;
|
||||||
@@ -204,22 +220,27 @@ QWidget *DialogFactory::createFWDialog(QWidget *parent,FWObject *o)
|
|||||||
QWidget *DialogFactory::createOSDialog(QWidget *parent,FWObject *o)
|
QWidget *DialogFactory::createOSDialog(QWidget *parent,FWObject *o)
|
||||||
throw(FWException)
|
throw(FWException)
|
||||||
{
|
{
|
||||||
Resources *os = Resources::os_res[o->getStr("host_OS")];
|
string host_os = o->getStr("host_OS");
|
||||||
if (os==NULL)
|
|
||||||
throw FWException((const char*)(QObject::tr("Support module for %1 is not available").arg(o->getStr("host_OS").c_str()).toLocal8Bit().constData()));
|
|
||||||
|
|
||||||
string dlgname=os->Resources::getResourceStr("/FWBuilderResources/Target/dialog");
|
Resources *os = Resources::os_res[host_os];
|
||||||
|
if (os==NULL)
|
||||||
|
throw FWException(
|
||||||
|
(const char*)(QObject::tr("Support module for %1 is not available").
|
||||||
|
arg(host_os.c_str()).toLocal8Bit().constData()));
|
||||||
|
|
||||||
|
string dlgname = os->Resources::getResourceStr(
|
||||||
|
"/FWBuilderResources/Target/dialog");
|
||||||
|
|
||||||
// string os=o->getStr("host_OS");
|
// string os=o->getStr("host_OS");
|
||||||
if (dlgname=="linux24") return new linux24AdvancedDialog(parent,o);
|
if (dlgname=="linux24") return new linux24AdvancedDialog(parent, o);
|
||||||
if (dlgname=="linksys") return new linksysAdvancedDialog(parent,o);
|
if (dlgname=="linksys") return new linksysAdvancedDialog(parent, o);
|
||||||
if (dlgname=="freebsd") return new freebsdAdvancedDialog(parent,o);
|
if (dlgname=="freebsd") return new freebsdAdvancedDialog(parent, o);
|
||||||
if (dlgname=="openbsd") return new openbsdAdvancedDialog(parent,o);
|
if (dlgname=="openbsd") return new openbsdAdvancedDialog(parent, o);
|
||||||
if (dlgname=="solaris") return new solarisAdvancedDialog(parent,o);
|
if (dlgname=="solaris") return new solarisAdvancedDialog(parent, o);
|
||||||
if (dlgname=="macosx") return new macosxAdvancedDialog(parent,o);
|
if (dlgname=="macosx") return new macosxAdvancedDialog(parent, o);
|
||||||
if (dlgname=="pix_os") return new pixosAdvancedDialog(parent,o);
|
if (dlgname=="pix_os") return new pixosAdvancedDialog(parent, o);
|
||||||
if (dlgname=="ios") return new iosAdvancedDialog(parent,o);
|
if (dlgname=="ios") return new iosAdvancedDialog(parent, o);
|
||||||
if (dlgname=="ipcop_os") return new ipcoposAdvancedDialog(parent,o);
|
if (dlgname=="ipcop") return new ipcoposAdvancedDialog(parent, o);
|
||||||
|
|
||||||
cerr << "OS settings dialog for " << dlgname
|
cerr << "OS settings dialog for " << dlgname
|
||||||
<< " is not implemented" << endl;
|
<< " is not implemented" << endl;
|
||||||
|
|||||||
@@ -620,10 +620,15 @@ done\n";
|
|||||||
str << "}" << endl;
|
str << "}" << endl;
|
||||||
str << endl;
|
str << endl;
|
||||||
|
|
||||||
|
// See ticket #2
|
||||||
|
string modules_dir = Resources::os_res[fw->getStr("host_OS")]->
|
||||||
|
Resources::getResourceStr("/FWBuilderResources/Target/options/default/modules_dir");
|
||||||
|
|
||||||
std::string sed_command = "sed -e 's/^.*\\///' -e 's/\\([^\\.]\\)\\..*/\\1/'";
|
std::string sed_command = "sed -e 's/^.*\\///' -e 's/\\([^\\.]\\)\\..*/\\1/'";
|
||||||
|
string host_os = fw->getStr("host_OS");
|
||||||
str << "load_modules() {" << endl;
|
str << "load_modules() {" << endl;
|
||||||
str << " HAVE_NAT=$1" << endl;
|
str << " HAVE_NAT=$1" << endl;
|
||||||
str << " MODULES_DIR=\"/lib/modules/`uname -r`/kernel/net/\"" << endl;
|
str << " MODULES_DIR=\"" << modules_dir << "\"" << endl;
|
||||||
str << " MODULES=`find $MODULES_DIR -name '*conntrack*'|" << sed_command << "`" << endl;
|
str << " MODULES=`find $MODULES_DIR -name '*conntrack*'|" << sed_command << "`" << endl;
|
||||||
str << " test -n \"$HAVE_NAT\" && {" << endl;
|
str << " test -n \"$HAVE_NAT\" && {" << endl;
|
||||||
str << " MODULES=\"$MODULES `find $MODULES_DIR -name '*nat*'|" << sed_command << "`\"" << endl;
|
str << " MODULES=\"$MODULES `find $MODULES_DIR -name '*nat*'|" << sed_command << "`\"" << endl;
|
||||||
@@ -635,6 +640,7 @@ done\n";
|
|||||||
str << "}" << endl;
|
str << "}" << endl;
|
||||||
str << endl;
|
str << endl;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check if all interfaces configured for the firewall are present
|
* check if all interfaces configured for the firewall are present
|
||||||
*/
|
*/
|
||||||
@@ -751,7 +757,8 @@ string OSConfigurator_linux24::printPathForAllTools(const string &os)
|
|||||||
void OSConfigurator_linux24::generateCodeForProtocolHandlers(bool have_nat)
|
void OSConfigurator_linux24::generateCodeForProtocolHandlers(bool have_nat)
|
||||||
{
|
{
|
||||||
FWOptions* options = fw->getOptionsObject();
|
FWOptions* options = fw->getOptionsObject();
|
||||||
bool nomod = Resources::os_res[fw->getStr("host_OS")]->Resources::getResourceBool("/FWBuilderResources/Target/options/suppress_modules");
|
bool nomod = Resources::os_res[fw->getStr("host_OS")]->
|
||||||
|
Resources::getResourceBool("/FWBuilderResources/Target/options/suppress_modules");
|
||||||
|
|
||||||
/* there is no need to load modules on linksys */
|
/* there is no need to load modules on linksys */
|
||||||
if (options->getBool("load_modules") && !nomod)
|
if (options->getBool("load_modules") && !nomod)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Target name="endian_os">
|
<Target name="endian_os">
|
||||||
<description>Endian Firewall Appliance</description>
|
<description>Endian Firewall Appliance</description>
|
||||||
<family>ipcop</family>
|
<family>ipcop</family>
|
||||||
<dialog>ipcop_os</dialog>
|
<dialog>ipcop</dialog>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
<user_can_change_install_dir>false</user_can_change_install_dir>
|
<user_can_change_install_dir>false</user_can_change_install_dir>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<admUser>root</admUser>
|
<admUser>root</admUser>
|
||||||
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
||||||
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<Target name="endian_os">
|
<Target name="endian_os">
|
||||||
<description>Endian Firewall Appliance</description>
|
<description>Endian Firewall Appliance</description>
|
||||||
<family>ipcop</family>
|
<family>ipcop</family>
|
||||||
<dialog>ipcop_os</dialog>
|
<dialog>ipcop</dialog>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
<user_can_change_install_dir>false</user_can_change_install_dir>
|
<user_can_change_install_dir>false</user_can_change_install_dir>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<admUser>root</admUser>
|
<admUser>root</admUser>
|
||||||
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
||||||
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<Target name="ipcop_os">
|
<Target name="ipcop_os">
|
||||||
<description>IPCOP Firewall Appliance</description>
|
<description>IPCOP Firewall Appliance</description>
|
||||||
<family>ipcop</family>
|
<family>ipcop</family>
|
||||||
<dialog>ipcop_os</dialog>
|
<dialog>ipcop</dialog>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
<user_can_change_install_dir>false</user_can_change_install_dir>
|
<user_can_change_install_dir>false</user_can_change_install_dir>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<admUser>root</admUser>
|
<admUser>root</admUser>
|
||||||
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
||||||
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<Target name="ipcop_os">
|
<Target name="ipcop_os">
|
||||||
<description>IPCOP Firewall Appliance</description>
|
<description>IPCOP Firewall Appliance</description>
|
||||||
<family>ipcop</family>
|
<family>ipcop</family>
|
||||||
<dialog>ipcop_os</dialog>
|
<dialog>ipcop</dialog>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
<user_can_change_install_dir>false</user_can_change_install_dir>
|
<user_can_change_install_dir>false</user_can_change_install_dir>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<admUser>root</admUser>
|
<admUser>root</admUser>
|
||||||
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
||||||
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<linux24_ip_forward>1</linux24_ip_forward>
|
<linux24_ip_forward>1</linux24_ip_forward>
|
||||||
<loopback_interface>lo</loopback_interface>
|
<loopback_interface>lo</loopback_interface>
|
||||||
<flush_and_set_default_policy>True</flush_and_set_default_policy>
|
<flush_and_set_default_policy>True</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<linux24_ip_forward>1</linux24_ip_forward>
|
<linux24_ip_forward>1</linux24_ip_forward>
|
||||||
<loopback_interface>lo</loopback_interface>
|
<loopback_interface>lo</loopback_interface>
|
||||||
<flush_and_set_default_policy>True</flush_and_set_default_policy>
|
<flush_and_set_default_policy>True</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Target name="oneshield_os">
|
<Target name="oneshield_os">
|
||||||
<description>OneShield Firewall Appliance</description>
|
<description>OneShield Firewall Appliance</description>
|
||||||
<family>ipcop</family>
|
<family>ipcop</family>
|
||||||
<dialog>ipcop_os</dialog>
|
<dialog>ipcop</dialog>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
<user_can_change_install_dir>false</user_can_change_install_dir>
|
<user_can_change_install_dir>false</user_can_change_install_dir>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<admUser>root</admUser>
|
<admUser>root</admUser>
|
||||||
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
||||||
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<Target name="oneshield_os">
|
<Target name="oneshield_os">
|
||||||
<description>OneShield Firewall Appliance</description>
|
<description>OneShield Firewall Appliance</description>
|
||||||
<family>ipcop</family>
|
<family>ipcop</family>
|
||||||
<dialog>ipcop_os</dialog>
|
<dialog>ipcop</dialog>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
<user_can_change_install_dir>false</user_can_change_install_dir>
|
<user_can_change_install_dir>false</user_can_change_install_dir>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<admUser>root</admUser>
|
<admUser>root</admUser>
|
||||||
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
<activationCmd>/etc/rc.d/rc.firewall restart</activationCmd>
|
||||||
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
<flush_and_set_default_policy>False</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/kernel/net/</modules_dir>
|
||||||
</default>
|
</default>
|
||||||
|
|
||||||
<activation>
|
<activation>
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
<?xml version="1.0"?> <!-- -*- mode: xml; -*- -->
|
||||||
|
<FWBuilderResources version="3.1.0">
|
||||||
|
<Target name="openwrt">
|
||||||
|
<description>OpenWRT</description>
|
||||||
|
<family>linux24</family>
|
||||||
|
<dialog>linux24</dialog>
|
||||||
|
|
||||||
|
<options>
|
||||||
|
<user_can_change_install_dir>true</user_can_change_install_dir>
|
||||||
|
<default>
|
||||||
|
<linux24_ip_forward>1</linux24_ip_forward>
|
||||||
|
<loopback_interface>lo</loopback_interface>
|
||||||
|
<flush_and_set_default_policy>True</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/</modules_dir>
|
||||||
|
</default>
|
||||||
|
|
||||||
|
<activation>
|
||||||
|
|
||||||
|
<fwdir>/etc/fw</fwdir>
|
||||||
|
|
||||||
|
<fwdir_test>/tmp</fwdir_test>
|
||||||
|
|
||||||
|
<timeout_units>min</timeout_units>
|
||||||
|
|
||||||
|
<reg_user>
|
||||||
|
<run>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
chmod +x %FWDIR%/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && sudo -S pkill shutdown; echo 'Policy activated' )
|
||||||
|
</compression>
|
||||||
|
<no_compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
chmod +x %FWDIR%/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && sudo -S pkill shutdown; echo 'Policy activated' )
|
||||||
|
</no_compression>
|
||||||
|
</run>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%/tmp
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
echo 'sudo -S /sbin/shutdown -r +%RBTIMEOUT%'|batch;
|
||||||
|
chmod +x %FWDIR%/tmp/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</rollback>
|
||||||
|
<no_rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
chmod +x %FWDIR%/tmp/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</no_rollback>
|
||||||
|
</test>
|
||||||
|
</reg_user>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<run>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
sh %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && pkill shutdown; echo 'Policy activated' )
|
||||||
|
</compression>
|
||||||
|
<no_compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
sh %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && pkill shutdown; echo 'Policy activated' )
|
||||||
|
</no_compression>
|
||||||
|
</run>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%/tmp
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
echo '/sbin/shutdown -r +%RBTIMEOUT%'|batch;
|
||||||
|
sh %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</rollback>
|
||||||
|
<no_rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
sh %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</no_rollback>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
</root>
|
||||||
|
</activation>
|
||||||
|
|
||||||
|
<!-- set to True if you want to suppress comments in the generated script -->
|
||||||
|
<suppress_comments>False</suppress_comments>
|
||||||
|
<!-- set to True if you do not need the script to load kernel modules -->
|
||||||
|
<suppress_modules>False</suppress_modules>
|
||||||
|
|
||||||
|
</options>
|
||||||
|
|
||||||
|
<capabilities>
|
||||||
|
<supports_routing>True</supports_routing>
|
||||||
|
</capabilities>
|
||||||
|
|
||||||
|
<tools>
|
||||||
|
<path_lsmod>/sbin/lsmod</path_lsmod>
|
||||||
|
<path_modprobe>/sbin/modprobe</path_modprobe>
|
||||||
|
<path_iptables>/sbin/iptables</path_iptables>
|
||||||
|
<path_ip6tables>/sbin/ip6tables</path_ip6tables>
|
||||||
|
<path_iptables_restore>/sbin/iptables-restore</path_iptables_restore>
|
||||||
|
<path_ip6tables_restore>/sbin/ip6tables-restore</path_ip6tables_restore>
|
||||||
|
<path_ip>/sbin/ip</path_ip>
|
||||||
|
<path_logger>/usr/bin/logger</path_logger>
|
||||||
|
<path_expect>/usr/bin/expect</path_expect>
|
||||||
|
</tools>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
</FWBuilderResources>
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
<?xml version="1.0"?> <!-- -*- mode: xml; -*- -->
|
||||||
|
<FWBuilderResources version="@VERSION@">
|
||||||
|
<Target name="openwrt">
|
||||||
|
<description>OpenWRT</description>
|
||||||
|
<family>linux24</family>
|
||||||
|
<dialog>linux24</dialog>
|
||||||
|
|
||||||
|
<options>
|
||||||
|
<user_can_change_install_dir>true</user_can_change_install_dir>
|
||||||
|
<default>
|
||||||
|
<linux24_ip_forward>1</linux24_ip_forward>
|
||||||
|
<loopback_interface>lo</loopback_interface>
|
||||||
|
<flush_and_set_default_policy>True</flush_and_set_default_policy>
|
||||||
|
<modules_dir>/lib/modules/`uname -r`/</modules_dir>
|
||||||
|
</default>
|
||||||
|
|
||||||
|
<activation>
|
||||||
|
|
||||||
|
<fwdir>/etc/fw</fwdir>
|
||||||
|
|
||||||
|
<fwdir_test>/tmp</fwdir_test>
|
||||||
|
|
||||||
|
<timeout_units>min</timeout_units>
|
||||||
|
|
||||||
|
<reg_user>
|
||||||
|
<run>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
chmod +x %FWDIR%/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && sudo -S pkill shutdown; echo 'Policy activated' )
|
||||||
|
</compression>
|
||||||
|
<no_compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
chmod +x %FWDIR%/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && sudo -S pkill shutdown; echo 'Policy activated' )
|
||||||
|
</no_compression>
|
||||||
|
</run>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%/tmp
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
echo 'sudo -S /sbin/shutdown -r +%RBTIMEOUT%'|batch;
|
||||||
|
chmod +x %FWDIR%/tmp/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</rollback>
|
||||||
|
<no_rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
chmod +x %FWDIR%/tmp/%FWSCRIPT%;
|
||||||
|
sudo -S %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</no_rollback>
|
||||||
|
</test>
|
||||||
|
</reg_user>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<run>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
sh %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && pkill shutdown; echo 'Policy activated' )
|
||||||
|
</compression>
|
||||||
|
<no_compression>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
sh %FWDIR%/%FWSCRIPT% && ( which pkill > /dev/null && pkill shutdown; echo 'Policy activated' )
|
||||||
|
</no_compression>
|
||||||
|
</run>
|
||||||
|
|
||||||
|
<test>
|
||||||
|
<copy>
|
||||||
|
%FWDIR%/tmp
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
echo '/sbin/shutdown -r +%RBTIMEOUT%'|batch;
|
||||||
|
sh %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</rollback>
|
||||||
|
<no_rollback>
|
||||||
|
echo '%FWBPROMPT%';
|
||||||
|
sh %FWDIR%/tmp/%FWSCRIPT% && echo 'Policy activated'
|
||||||
|
</no_rollback>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
</root>
|
||||||
|
</activation>
|
||||||
|
|
||||||
|
<!-- set to True if you want to suppress comments in the generated script -->
|
||||||
|
<suppress_comments>False</suppress_comments>
|
||||||
|
<!-- set to True if you do not need the script to load kernel modules -->
|
||||||
|
<suppress_modules>False</suppress_modules>
|
||||||
|
|
||||||
|
</options>
|
||||||
|
|
||||||
|
<capabilities>
|
||||||
|
<supports_routing>True</supports_routing>
|
||||||
|
</capabilities>
|
||||||
|
|
||||||
|
<tools>
|
||||||
|
<path_lsmod>/sbin/lsmod</path_lsmod>
|
||||||
|
<path_modprobe>/sbin/modprobe</path_modprobe>
|
||||||
|
<path_iptables>/sbin/iptables</path_iptables>
|
||||||
|
<path_ip6tables>/sbin/ip6tables</path_ip6tables>
|
||||||
|
<path_iptables_restore>/sbin/iptables-restore</path_iptables_restore>
|
||||||
|
<path_ip6tables_restore>/sbin/ip6tables-restore</path_ip6tables_restore>
|
||||||
|
<path_ip>/sbin/ip</path_ip>
|
||||||
|
<path_logger>/usr/bin/logger</path_logger>
|
||||||
|
<path_expect>/usr/bin/expect</path_expect>
|
||||||
|
</tools>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
</FWBuilderResources>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<!-- maintian order of supported os names to make them appear in the dialog
|
<!-- maintian order of supported os names to make them appear in the dialog
|
||||||
in the right order
|
in the right order
|
||||||
-->
|
-->
|
||||||
<supported_os>linux24,linksys,ipcop_os,endian_os,oneshield_os</supported_os>
|
<supported_os>linux24,linksys,ipcop,endian,oneshield,openwrt</supported_os>
|
||||||
<family>iptables</family>
|
<family>iptables</family>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<!-- maintian order of supported os names to make them appear in the dialog
|
<!-- maintian order of supported os names to make them appear in the dialog
|
||||||
in the right order
|
in the right order
|
||||||
-->
|
-->
|
||||||
<supported_os>linux24,linksys,ipcop_os,endian_os,oneshield_os</supported_os>
|
<supported_os>linux24,linksys,ipcop,endian,oneshield,openwrt</supported_os>
|
||||||
<family>iptables</family>
|
<family>iptables</family>
|
||||||
|
|
||||||
<options>
|
<options>
|
||||||
|
|||||||
Reference in New Issue
Block a user