Welcome, Guest. Please login or register.
October 08, 2008, 12:52:26 AM

Login with username, password and session length

198015 Posts
22789 Topics
54754 Members

Latest Member: alanstetson

Search:     Advanced search | Tag Cloud
+  Welcome to the Comodo Forum
|-+  Desktop Security Products
| |-+  Comodo Firewall
| | |-+  Help for v2
| | | |-+  Script to Backup CPF v2.4 firewall settings
« previous next »
Pages: 1 ... 7 8 [9] 10 11 Go Down Print
Author Topic: Script to Backup CPF v2.4 firewall settings  (Read 54596 times)
Kent Brockman
Newbie
*
Offline Offline

Posts: 3



WWW
« Reply #120 on: September 02, 2007, 03:44:30 PM »

Hi there. I'm from Argentina and used the spanish version of CFP Backup and worked fine.
BTW, I join to the wish of adding this feature to next releases.
 Comodo Rocks
Logged

Technical Support for home users in Buenos Aires, Argentina.
We recommend Comodo Firewall to our clients due to its ease of use and better detection levels.
Comodo Rocks
Rotty
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 793

http://www.venganza.org/ - Noodly Appendage


« Reply #121 on: September 08, 2007, 07:03:12 AM »

Indeed it would be a better solution for the backup functionality to be embedded in the firewall itself. If it is not by the time I have time on my hands (If ever....) or someone else wants to give it ago.  I have some very good ideas(technical and other wise) as to how a better backup program could be implemented!!

Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
Little Mac
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 6017



« Reply #122 on: September 10, 2007, 10:13:17 AM »

V3, my friends... Backup and Export/Import various configurations.

LM
Logged

date
dcfldd split=2G conv=noerror hashwindow=0 hash=md5 bs=32768 hashlog=/mnt/sda1/images/hash.log if=/dev/hda of=/mnt/sda1/images/LM.dd
date
cat LM.dd.* | md5sum > verify.log
date
SuperFreak
Newbie
*
Offline Offline

Posts: 1


« Reply #123 on: September 19, 2007, 08:19:54 AM »

G'day again.

My previous post was just a light hearted dig - please don't take offense.

There really isn't anything more I could add, as Rotty's script is designed to just be double clicked and it does everything else. It checks for the existence of the folders it needs to store the backup in, creates them if they don't exist, extracts the firewall rules from the registry and writes them to the correct folder after storing a backup copy of your previous rules backup.

To restore the rules from the backup (which is stored as a Windows .REG registry file), simply go to the folder it is stored in (after setting the firewall to "Allow all" and turning off its registry protection) and double click the REG file.

After the registry info is re-merged, set the firewall back to "Custom" and turn on registry protection.

Hope this helps,
Ewen :-)

My first post here, and I'm a noob; so sorry. Smiley

Thanx for the detailed explanation.

Just one question. Where should I put the "CPFBackup.bat" file to run from, if my XP is installed to D:\WINDOWS and my CFP is on E:\Program Files\Security?
Thanx for the help! Cheers,
Logged
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5461


... and I say to myself, "What a wonderful world"


« Reply #124 on: September 19, 2007, 05:28:53 PM »

G'day,

It doesn't really matter where you put it as long as it's somewhere you can find it. Desktop might be a good place to consider, then, you don't have to go looking for it.

Cheers,
Ewen :-)
Logged

As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you don't like it, don't use the forum.
Ed_P
Comodo Member
**
Offline Offline

Posts: 42


« Reply #125 on: October 02, 2007, 12:28:24 PM »

I like this script.  I like being able to backup and restore specific files/apps/data in addition to hd imaging.  It allows for faster restores if only a specific file/app/data needs to be restored.

The only change I made to my copy was to the comments at the top.

Code:
[ at ]echo off
rem https://forums.comodo.com/help/script_to_backup_cpf_v24_firewall_settings-t2366.0.html
cls
echo COMODO Backup
echo *****************************
echo The settings will be backed up to: %SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\CPFRUles.REG
echo Merge the "CPFrules.reg" file back into the Registry to restore the settings.
echo.
echo NOTE: When restoring, you need to go to COMODO's SECURITY - ADVANCED - MISCELLANEOUS
echo and turn off "Protect own registry keys" before importing.
echo You also need to set the firewall to "allow all", and to Reboot your PC!
echo *****************************
echo.
echo To start press enter. To quit press the "x" button on this window
pause >nul:


The comments should look familiar.  Grin
Logged

Ed
Ed_P
Comodo Member
**
Offline Offline

Posts: 42


« Reply #126 on: October 03, 2007, 11:56:22 AM »

And for those who keep our data and backups on a drive separate from the OS and apps:

CPFBackupV1.5.cmd
Code:
[ at ]echo off&title COMODO firewall settings backup
rem https://forums.comodo.com/help/script_to_backup_cpf_v24_firewall_settings-t2366.0.html

set BKUPfile=CPFRules.REG
set BKUPfolder=%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\
rem set BKUPfolder=D:\My Documents\CPFBackup\
rem Remove the "rem" from above line and change the assigned value to the location you desire.

cls
echo.
echo *****************************
echo The settings will be backed up to:
echo  %BKUPfolder%%BKUPfile%
echo Merge the "%BKUPfile%" file back into the Registry to restore the settings.
echo.
echo NOTE: When restoring, you need to go to COMODO's SECURITY - ADVANCED - MISCELLANEOUS
echo and turn off "Protect own registry keys" before importing.
echo You also need to set the firewall to "Allow All" and to reboot the PC!
echo *****************************
echo.
echo To start press Enter. To quit press the "x" button on this window
pause >nul

cls
if not exist "%BKUPfolder%%BKUPfile%" goto :new
goto :archive

:archive
echo Clearing oldest backup - please wait ..
del "%BKUPfolder%Prior\%BKUPfile%" >nul
echo Storing previous backup - please wait ...
copy "%BKUPfolder%%BKUPfile%" "%BKUPfolder%Prior\%BKUPfile%" > nul
echo Archiving current rule set - please wait ....
REGEDIT /E "%BKUPfolder%%BKUPfile%" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end

:new
cls
echo.
echo Creating folders - please wait ...
echo.
md "%BKUPfolder%"
md "%BKUPfolder%Prior"
echo Archiving registry keys - please wait ...
REGEDIT /E "%BKUPfolder%%BKUPfile%" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy "%BKUPfolder%%BKUPfile%" "%BKUPfolder%Prior\%BKUPfile%" >nul
goto :end

:end
echo.
echo DONE!!!
echo.
echo Press any key to end
pause >nul
Logged

Ed
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 5461


... and I say to myself, "What a wonderful world"


« Reply #127 on: October 03, 2007, 09:21:33 PM »

Glad to see you're enjoying rediscovering scripts. Wink

You can also use comand line variables to determine the destination at run time.

For example, if our script is called "my_script.cmd" and it contains the line "md %1:\new_folder", if we invoke the script by typing "my_script e" our script would create a folder called "new_folder" on drive e:.

enjoy!
Ewen :-)
 
Logged

As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you don't like it, don't use the forum.
Ed_P
Comodo Member
**
Offline Offline

Posts: 42


« Reply #128 on: October 04, 2007, 11:34:12 AM »

Glad to see you're enjoying rediscovering scripts. Wink
They're like potato chips.   Cheesy

A default location, a custom location, a command line argument...  hmmm sounds like a menu is needed  Roll Eyes

Or not.

CPFBackupV2.4.cmd
Code:
[ at ] echo off&title COMODO 2.4 firewall settings backup
rem https://forums.comodo.com/help/script_to_backup_cpf_v24_firewall_settings-t2366.0.html

set BKUPfile=CPFRules.REG
set BKUPfolder=%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\DESKTOP\CPFBackup\

rem set BKUPfolder=D:\My Documents\CPFBackup\
rem To change the default backup location remove the "rem" from above line
rem   and change the assigned value to the location you desire.

rem Code to support panic's command line destination suggestion.
rem   Example:  CPFbackup2.4    D:\My Backups\CPFBackup\
if not "%1" == "" set BKUPfolder=%1
if not "%2" == "" set BKUPfolder=%1 %2
if not "%3" == "" set BKUPfolder=%1 %2 %3

cls
echo.
echo *****************************
echo The COMODO settings will be backed up to:
echo  "%BKUPfolder%%BKUPfile%"
if exist "%BKUPfolder%%BKUPfile%" for %%i in ("%BKUPfolder%%BKUPfile%") do  echo  Date/time of last backup: %%~ti
echo.
echo  To Restore the "%BKUPfile%" file's settings back into the
echo   Registry:
echo   1. Shutdown Comodo
echo   2. Open RegEdit and delete the key
echo      HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall
echo   3. Close RegEdit
echo   4. Finally dbl click on the backup .reg file.
echo *****************************
echo.
echo To start press Enter. To quit press the "x" button on this window
pause >nul

cls
if not exist "%BKUPfolder%%BKUPfile%" goto :new
goto :archive

:archive
echo Clearing oldest backup - please wait ..
del "%BKUPfolder%Prior\%BKUPfile%" >nul
echo Storing previous backup - please wait ...
copy "%BKUPfolder%%BKUPfile%" "%BKUPfolder%Prior\%BKUPfile%" > nul
echo Archiving current rule set - please wait ....
REGEDIT /E "%BKUPfolder%%BKUPfile%" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end

:new
cls
echo.
echo Creating folders - please wait ...
echo.
md "%BKUPfolder%"
md "%BKUPfolder%Prior"
echo Archiving registry keys - please wait ...
REGEDIT /E "%BKUPfolder%%BKUPfile%" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy "%BKUPfolder%%BKUPfile%" "%BKUPfolder%Prior\%BKUPfile%" >nul
goto :end

:end
echo.
echo DONE!!!
echo.
echo Press any key to end
pause >nul
« Last Edit: April 29, 2008, 01:01:27 PM by Ed_P » Logged

Ed
Ed_P
Comodo Member
**
Offline Offline

Posts: 42


« Reply #129 on: October 06, 2007, 03:39:47 PM »

I'm unclear as to the verbage for the restore after reading more of this thread.  Is it necessary to go to COMODO's SECURITY - ADVANCED - MISCELLANEOUS windows and turn off "Protect own registry keys" before importing?  Or is setting the firewall to "Allow All" sufficient?  Both needed or one or the other?

 Huh
Logged

Ed
Rotty
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 793

http://www.venganza.org/ - Noodly Appendage


« Reply #130 on: October 06, 2007, 06:26:46 PM »

Both needed unfortunately, the need for "Allow all" is something I would get rid of.  Since Comodo is working on a settings backup addition in future versions, and my own lack of time.

It may have to stay that way until the new version of the firewall is released.  Not sure which version.
Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
Ed_P
Comodo Member
**
Offline Offline

Posts: 42


« Reply #131 on: October 06, 2007, 06:46:57 PM »

Both needed unfortunately,
the need for "Allow all" is something I would get rid of.
 
 Huh  So which is it?  Both or get rid of the "Allow all" part?  Undecided


This is what I posted originally but it got changed!!
« Last Edit: October 07, 2007, 09:46:30 AM by Ed_P » Logged

Ed
Little Mac
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 6017



« Reply #132 on: October 08, 2007, 03:57:58 PM »

Both are needed w/v2.4, in order to either Import or Export.  After performing the task, change both protections back to the normal settings.

(I think Rotty's referring to how he would prefer to have it work; not how it works now.)

LM
Logged

date
dcfldd split=2G conv=noerror hashwindow=0 hash=md5 bs=32768 hashlog=/mnt/sda1/images/hash.log if=/dev/hda of=/mnt/sda1/images/LM.dd
date
cat LM.dd.* | md5sum > verify.log
date
Rotty
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 793

http://www.venganza.org/ - Noodly Appendage


« Reply #133 on: October 08, 2007, 11:10:06 PM »

Answer the question, answer the question I tell myself.  Sorry for the confusion.  Embarrassed
Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
Ed_P
Comodo Member
**
Offline Offline

Posts: 42


« Reply #134 on: October 09, 2007, 11:35:27 AM »

Both are needed w/v2.4, in order to either Import or Export.  ....
(I think Rotty's referring to how he would prefer to have it work; not how it works now.)
Ok, that makes sense.  Thanks Little Mac.

For the sake of clarity for others that may follow, I've had no problem backing up/exporting the config without changing either of the COMODO settings.

Answer the question, answer the question I tell myself.  Sorry for the confusion.  Embarrassed
Not a problem.  Thanks for responding.
Logged

Ed
Tags:
Pages: 1 ... 7 8 [9] 10 11 Go Up Print 
« previous next »
Jump to:  

SSL Firewall
Page created in 0.233 seconds with 20 queries.
Powered by SMF 1.1.5 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Design by 7dana.com