mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-15 09:29:36 +02:00
refs #1007, #1009 deprecate "install only acl, icmp, telnet, ssh, nat, global and static" option in installer options dialog; instead, add option to generate shortened config to the pix advanced settings dialog
This commit is contained in:
@@ -86,6 +86,24 @@ bool FirewallInstallerCisco::packInstallJobsList(Firewall*)
|
||||
|
||||
// Load configuration file early so we can abort installation if
|
||||
// it is not accessible
|
||||
|
||||
// Note about option "install only acl, icmp, telnet, ssh, nat,
|
||||
// global and static" for PIX. This option used to read generated
|
||||
// config but cuts off everything before the magic comment line
|
||||
// "!################". This way, it only read object-group,
|
||||
// access-list, access-group, nat, static and global commands. It
|
||||
// skipped all interface configurations, timeouts and inspector
|
||||
// commands. It is difficult to implement now that we (can) use
|
||||
// scp to copy configuration to the firewall. We would have to
|
||||
// create temporary file with modified configuration in order to
|
||||
// do this. To avoid hassles with temporary files, we move the
|
||||
// same function to the compiler. The checkbox moves to the
|
||||
// "script" tab of the pix advanced settings dialog and when it is on,
|
||||
// compiler generates the script with only acl, icmp, telnet, ssh
|
||||
// nat,static and global commands
|
||||
//
|
||||
// This mode of installation is not supported on IOS at all.
|
||||
|
||||
QString ff;
|
||||
QFileInfo script_info(cnf->script);
|
||||
if (script_info.isAbsolute()) ff = cnf->script;
|
||||
|
||||
@@ -235,7 +235,7 @@ void SSHSession::setOptions(instConf *cnf)
|
||||
setVerbose(cnf->verbose);
|
||||
setBackup(cnf->backup);
|
||||
setBackupFile(cnf->backup_file);
|
||||
setIncr(cnf->incremental);
|
||||
//setIncr(cnf->incremental);
|
||||
setDryRun(cnf->dry_run);
|
||||
setSaveStandby(cnf->saveStandby);
|
||||
setTestRun(cnf->testRun);
|
||||
|
||||
@@ -311,7 +311,6 @@ void instDialog::prepareInstConf(Firewall *)
|
||||
|
||||
void instDialog::storeInstallerOptions()
|
||||
{
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/incr", cnf.incremental);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/savediff",cnf.save_diff);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/saveStandby",cnf.saveStandby);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/dryrun" ,cnf.dry_run);
|
||||
@@ -347,10 +346,7 @@ void instDialog::summary()
|
||||
str.append(QObject::tr("* Loading configuration from file %1")
|
||||
.arg(cnf.fwbfile));
|
||||
|
||||
if (cnf.incremental)
|
||||
str.append(QObject::tr("* Incremental install"));
|
||||
|
||||
if (cnf.save_diff && cnf.incremental)
|
||||
if (cnf.save_diff)
|
||||
str.append(QObject::tr("* Configuration diff will be saved in file %1").
|
||||
arg(cnf.diff_file));
|
||||
|
||||
@@ -912,7 +908,6 @@ void instDialog::readInstallerOptionsFromSettings()
|
||||
|
||||
cnf.batchInstall = m_dialog->batchInstall->isChecked();
|
||||
|
||||
cnf.incremental= st->value(SETTINGS_PATH_PREFIX"/Installer/incr").toBool();
|
||||
cnf.save_diff = st->value(SETTINGS_PATH_PREFIX"/Installer/savediff").toBool();
|
||||
cnf.saveStandby = st->value(SETTINGS_PATH_PREFIX"/Installer/saveStandby").toBool();
|
||||
cnf.dry_run = st->value(SETTINGS_PATH_PREFIX"/Installer/dryrun").toBool();
|
||||
@@ -1016,7 +1011,6 @@ void instDialog::readInstallerOptionsFromDialog(Firewall *fw,
|
||||
adm_user = fwopt->getStr("admUser").c_str();
|
||||
}
|
||||
|
||||
cnf.incremental = dlg->m_dialog->incr->isChecked();
|
||||
cnf.dry_run = dlg->m_dialog->test->isChecked();
|
||||
cnf.backup_file = dlg->m_dialog->backupConfigFile->text();
|
||||
cnf.backup = !cnf.backup_file.isEmpty();
|
||||
|
||||
@@ -83,7 +83,6 @@ instOptionsDialog::instOptionsDialog(QWidget *parent, instConf *_cnf) :
|
||||
m_dialog->epwd->setEchoMode(QLineEdit::Password);
|
||||
|
||||
m_dialog->uname->setText( cnf->user );
|
||||
m_dialog->incr->setChecked( cnf->incremental );
|
||||
m_dialog->test->setChecked( cnf->dry_run );
|
||||
m_dialog->backupConfigFile->setText( cnf->backup_file );
|
||||
m_dialog->saveDiff->setChecked( cnf->save_diff );
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>619</width>
|
||||
<height>845</height>
|
||||
<width>616</width>
|
||||
<height>842</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@@ -191,37 +191,27 @@ are never stored permanently)</string>
|
||||
<property name="margin" >
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="saveStandby" >
|
||||
<property name="text" >
|
||||
<string>Write configuration to standby PIX</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="test" >
|
||||
<property name="text" >
|
||||
<string>Dry run (commands won't be executed on the firewall)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="saveDiff" >
|
||||
<property name="text" >
|
||||
<string>Store configuration diff in a file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="incr" >
|
||||
<property name="toolTip" >
|
||||
<string>Calculate difference between current firewall state and generated configuration and install only those commands that update state of the firewall</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>install only ACL, 'icmp', 'telnet', 'ssh', 'nat', 'global' and 'static' commands</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="backupConfigFileLbl" >
|
||||
<property name="sizePolicy" >
|
||||
@@ -523,7 +513,6 @@ are never stored permanently)</string>
|
||||
<tabstop>pwd</tabstop>
|
||||
<tabstop>epwd</tabstop>
|
||||
<tabstop>backupConfigFile</tabstop>
|
||||
<tabstop>incr</tabstop>
|
||||
<tabstop>saveDiff</tabstop>
|
||||
<tabstop>test</tabstop>
|
||||
<tabstop>saveStandby</tabstop>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="elideMode" >
|
||||
<enum>Qt::ElideNone</enum>
|
||||
@@ -729,15 +729,44 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>frame146</zorder>
|
||||
<zorder>frame147</zorder>
|
||||
<zorder>pix_prolog_script</zorder>
|
||||
</widget>
|
||||
<widget class="QWidget" name="label584" >
|
||||
<attribute name="title" >
|
||||
<string>Timeouts</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_9" >
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QFrame" name="frame167" >
|
||||
<property name="frameShape" >
|
||||
@@ -1380,22 +1409,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="defaultTimeoutsButton" >
|
||||
<property name="text" >
|
||||
@@ -1403,25 +1416,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>frame167</zorder>
|
||||
<zorder>defaultTimeoutsButton</zorder>
|
||||
</widget>
|
||||
<widget class="QWidget" name="label613" >
|
||||
<attribute name="title" >
|
||||
@@ -3750,7 +3745,7 @@
|
||||
<attribute name="title" >
|
||||
<string>Script</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_13" >
|
||||
<layout class="QGridLayout" name="gridLayout_19" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="buttonGroup10" >
|
||||
<property name="sizePolicy" >
|
||||
@@ -3953,6 +3948,32 @@ First, create temporary access list to permit connections from the management su
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_13" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Compiler can generate PIX configuration without commands that configures interfaces, timeouts and inspectors. These parts of configuration change rarely so it makes no sense to execute the same commands again and again. In addition, runnig the same commands on configuration reload cause errors. Use this option to generate shortened configuration to avoid errors and make update faster.</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="short_script" >
|
||||
<property name="text" >
|
||||
<string>Generate only access-list, access-group, telnet, ssh, nat, global and static commands</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QGroupBox" name="frame170" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
|
||||
@@ -4007,7 +4028,7 @@ First, create temporary access list to permit connections from the management su
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<item row="3" column="0" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
||||
Reference in New Issue
Block a user