Welcome to the Comodo Forum
Welcome,
Guest
. Please
login
or
register
.
September 06, 2008, 05:01:06 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
189132
Posts
22038
Topics
52852
Members
Latest Member:
maden
more news...
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
2
[
3
]
4
5
...
11
Author
Topic: Script to Backup CPF v2.4 firewall settings (Read 52369 times)
Rotty
Global Moderator
Comodo's Hero
Offline
Posts: 793
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #30 on:
November 04, 2006, 11:05:22 PM »
I'm glad you have found it of use. If any more programming projects i can see that may come up with COMODO products i will have to make a thread advertising the idea and try to attract any hobiest or professional programmers into it (Depending on size, whether it is outside the spare time panic and I have.)
cheers, rotty
Logged
The opinions expressed in my posts are my own.
They do NOT necessarily represent or reflect the views of my employer.
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #31 on:
November 21, 2006, 04:27:08 PM »
just tried version 1.2 and ended up wth error messages in the console, and empty folders created everywhere...well not everywhere but one called document on C, and a few others around the zip file. Are you supposed to run this file from a special folder? Anyway could anybody tell me where the cpf rules are stored in the registry. Even if the script can work, I'd like to know where cpf locates Network Rules in the registry.Thanks for your help.
Logged
Little Mac
Global Moderator
Comodo's Hero
Offline
Posts: 6011
Re: Script to Backup CPF firewall settings
«
Reply #32 on:
November 21, 2006, 05:50:33 PM »
I also just ran v1.2. It created the following chain of folders (within the folder I ran it from):
Users.WINDOWS/CPFBackup/Prior (Capitalizations, etc are exact to what was created).
Folder "Prior" is apparently empty.
The zipped file was unpacked, and I ran the batch file. The DOS window showed what would seem to be the proper sequence, and said it was done.
I have not installed the Beta; I have CPF v.2.3.6.81
LM
Logged
date
dcfldd split=2G conv=noerror hashwindow=0 hash=md5 hashlog=/mnt/sda1/images/hash.log if=/dev/hda of=/mnt/sda1/images/LM.dd
date
cat LM.dd.* | md5sum > verify.log
date
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #33 on:
November 21, 2006, 06:05:21 PM »
anybody knows if the backup script 1.2 works at all with cpf beta 2.4?
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5372
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #34 on:
November 21, 2006, 08:01:02 PM »
Quote from: apache255 on November 21, 2006, 04:27:08 PM
just tried version 1.2 and ended up wth error messages in the console, and empty folders created everywhere...well not everywhere but one called document on C, and a few others around the zip file. Are you supposed to run this file from a special folder? Anyway could anybody tell me where the cpf rules are stored in the registry. Even if the script can work, I'd like to know where cpf locates Network Rules in the registry.Thanks for your help.
I'm looking into it now. Will post back shortly.
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.
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5372
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #35 on:
November 21, 2006, 11:00:23 PM »
G'day,
There is a problem with the 1.2 script.
It uses the %allusersprofile% system variable, and by default, this variable is set to "C:\Documents and Settings\All Users". Note the SPACE between the word "Documents" and the word "and".
Due to the way CMD.EXE parses script commands, if a sequence of characters that contains one or more SPACE characters isn't enclosed within quotation marks, CMD.EXE interprets the string UP TO THE FIRST SPACE only as a command. As the script is fed a variable which has to be substituted with the current value of the variable (C:\Documents and Settings\All Users), CMD.EXE only interprets up to the first space character.
This is why we end up with a folder in the root of dirve C: called "C:\DOCUMENTS".
How to get around this?
The easiest way is to edit the script and replace all instances of "%ALLUSERSPROFILE%" with a location of your choice, preferably a second hard drive or a removable storage device (There's little sense storing a backup of your firewall rules on the same hard drive).
IMHO, I would stick to V1.1 of the script. The BEST alternative is to modify V1.1 to suit your particular requirements. The scripts were developed by Rotty as a simple means of capturing and restoring the current config in the event of a reinstall wiping out the current rule/app set (as happens between major revisions).
An example of an edited V1.1 script is below. This example creates a folder in the root of drive D: called "CPFBackup" with a sub-folder called "Prior". It has also added some text to remind users to turn off the registry protection in CPF before running the backup.
Cut and paste the code that is shown in RED into notepad (or any other text editor) and save it as a .BAT file. If using notepad, remember to change the file type from TEXT to ALL FILES. Also, remember to change the "[at] " sequence in the top line of the code to the real "at" symbol before saving.
SAMPLE CODE
********************************************
[ at ]echo off
cls
echo *****************************
echo The settings are backed up to d:\CPFBackup\CPFRUles.REG
echo Merge the "CPFrules.reg" file back, to restore settings
echo *****************************
echo.
echo.
echo Before continuing, turn off registry protection in CPF.
echo.
echo This is found in SECURITY - ADVANCED - MISCELLANEOUS
echo.
echo.
echo To start press enter. To quit press the "x" button on this window
pause >nul:
cls
if not exist d:\CPFBackup goto :new
goto :archive
:archive
echo Clearing oldest backup - please wait
del d:\CPFBackup\Prior\CPFRUles.REG >nul:
echo Storing previous backup - please wait ...
copy d:\CPFBackup\CPFRUles.REG d:\CPFBackup\Prior\CPFRUles.REG
echo Archiving current rule set - please wait ...
REGEDIT /E d:\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
goto :end
:new
cls
echo.
echo Creating folders - please wait ...
echo.
md d:\CPFBackup
md d:\CPFBackup\Prior
echo Archiving registry keys - please wait ...
REGEDIT /E d:\CPFBackup\CPFRUles.REG "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"
copy d:\CPFBackup\CPFRUles.REG d:\CPFBackup\Prior\CPFRUles.REG >nul:
goto :end
:end
echo DONE!!!
echo Press any key to end
pause >nul:
***************************************************
Hope this helps, and sorry for the screw up.
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.
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #36 on:
November 22, 2006, 03:28:18 AM »
hi Ewen!
well thanks very much for your detailed answer concerning the script. I'm gonna try this today
cheers
Apache
Logged
Rotty
Global Moderator
Comodo's Hero
Offline
Posts: 793
http://www.venganza.org/ - Noodly Appendage
Re: Script to Backup CPF firewall settings
«
Reply #37 on:
November 22, 2006, 04:55:50 AM »
I don't know if it will work with 2.4 beta, maybe panic can test that some time.
I don't have a test environment, sniff.
if the registry entries are in the same place as they were with 2.3, then their SHOULD not be a problem. Since you are using the beta which usually signifies that you have a test environment, then you could test it for us if you want (-:
cheers, rotty
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
Posts: 6011
Re: Script to Backup CPF firewall settings
«
Reply #38 on:
November 22, 2006, 11:15:51 AM »
TNX for your time and effort, guys, to investigate and edit the script.
I changed it to send to my flash drive; it appears to have worked fine, as I now have a registry backup file on there.
Ultimately, does the destination truly matter? I mean, even if it were set to save it on the C:\ drive (assuming that to be the system drive), as long as the user knows the location, they can move the entire file off-system to another drive, CD, etc. Is that correct, or does something else factor in that would make that impossible?
Thanks again,
LM
Logged
date
dcfldd split=2G conv=noerror hashwindow=0 hash=md5 hashlog=/mnt/sda1/images/hash.log if=/dev/hda of=/mnt/sda1/images/LM.dd
date
cat LM.dd.* | md5sum > verify.log
date
apache255
Guest
Re: Script to Backup CPF firewall settings
«
Reply #39 on:
November 22, 2006, 11:40:01 AM »
thanks panic, I've jsut tried your script on the beta and it worked just fine. I got 2 identical backups, one directly under cpfbackup and a second one under a subfolder called prior...strange but it does not matter.Once again good job.
cheers
Logged
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5372
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #40 on:
November 22, 2006, 03:17:21 PM »
Quote from: apache255 on November 22, 2006, 11:40:01 AM
thanks panic, I've jsut tried your script on the beta and it worked just fine. I got 2 identical backups, one directly under cpfbackup and a second one under a subfolder called prior...strange but it does not matter.Once again good job.
cheers
The folder and the subfolder hold the current ruleset and the previous set, respectively, just to give us a better fallback postition.
cheers, and glad to hear it worked!
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.
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5372
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #41 on:
November 22, 2006, 03:20:29 PM »
Quote from: Little Mac on November 22, 2006, 11:15:51 AM
TNX for your time and effort, guys, to investigate and edit the script.
I changed it to send to my flash drive; it appears to have worked fine, as I now have a registry backup file on there.
Ultimately, does the destination truly matter? I mean, even if it were set to save it on the C:\ drive (assuming that to be the system drive), as long as the user knows the location, they can move the entire file off-system to another drive, CD, etc. Is that correct, or does something else factor in that would make that impossible?
Thanks again,
LM
Does the destination matter? Yes, - the sense is storing your backups on the drive that are backing up is what??? LOL
The REG file can be transpported anywhere!
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.
Little Mac
Global Moderator
Comodo's Hero
Offline
Posts: 6011
Re: Script to Backup CPF firewall settings
«
Reply #42 on:
November 22, 2006, 05:36:09 PM »
Quote from: panic on November 22, 2006, 03:20:29 PM
Does the destination matter? Yes, - the sense is storing your backups on the drive that are backing up is what??? LOL
The REG file can be transpported anywhere!
ewen :-)
I guess my question was, are three different scripts for different file destinations really needed? Why not just one script with a known save location (whatever that might be) with the statement that the user needs to move the file off-system to another drive.
I totally get the point of not having it on the drive that's gonna crash. I may not know much (and I am from Texas...), but I know THAT much. Wasn't born yesterday.
LOL
LM
Logged
date
dcfldd split=2G conv=noerror hashwindow=0 hash=md5 hashlog=/mnt/sda1/images/hash.log if=/dev/hda of=/mnt/sda1/images/LM.dd
date
cat LM.dd.* | md5sum > verify.log
date
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5372
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #43 on:
November 23, 2006, 12:30:55 AM »
Quote from: Little Mac on November 22, 2006, 05:36:09 PM
I guess my question was, are three different scripts for different file destinations really needed? Why not just one script with a known save location (whatever that might be) with the statement that the user needs to move the file off-system to another drive.
I totally get the point of not having it on the drive that's gonna crash. I may not know much (and I am from Texas...), but I know THAT much. Wasn't born yesterday.
LOL
LM
Rotty wrote the three versions to try and satify the differing requests he received after the wrote the first, palin vanilla one. We have added some hints on how to modify (e.g by using %1 to represent a pramater passed at the command line, etc.) but a lot of people's collective eyes glazed over when we started talking DOS. LOL
I agree, one straight forward version would be best, but its only best for those who can modify to suit their explicit needs.
Cheers LM,
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.
panic
Global Moderator
Comodo's Hero
Offline
Posts: 5372
... and I say to myself, "What a wonderful world"
Re: Script to Backup CPF firewall settings
«
Reply #44 on:
November 27, 2006, 08:21:02 AM »
Hey Rotty,
Have a look at
http://forums.comodo.com/index.php/topic,4128.msg31222.html#msg31222
Your scripts been adapted to backup the Comodo Backup jobs and settings.
Thanks again,
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.
Tags:
Pages:
1
2
[
3
]
4
5
...
11
« previous
next »
Jump to:
Please select a destination:
-----------------------------
** New to the Comodo Forum? Start Here! **
-----------------------------
=> New Member Information
-----------------------------
Want to help Comodo?
-----------------------------
=> Help Spread the Word - Official Comodo banners and logos
=> How can you help Comodo? (Please we do need you!)
===> Help spread the word! (Please read and help)
===> Comodo website issues for submitting website problems only
=> Please tell us your views and Vote here!
-----------------------------
General Category
-----------------------------
=> Melih's Corner - CEO Talk/Discussions/Blog
=> Which Product do you want Comodo to develop next?
=> General Discussion (off topic) Anything and everything...
===> Member Confessions :-)
===> Funny Photos :-)
===> Cool Stuff
-----------------------------
Desktop Security Products
-----------------------------
=> Comodo Firewall
===> Feedback/Comments/Announcements/News
===> Leak Testing/Attacks/Vulnerability Research
===> Help for v3
===> Help for v2
===> Frequently Asked Questions (FAQ) for Comodo firewall
===> Comodo Firewall Translations
===> Bug Reports
=> Comodo Anti-Viruspyware (CAVS)
===> Help for Comodo AntiVirus
===> FAQ for Comodo Anti-ViruSpyware
===> Feedback/Comments/Announcements/News about CAVS
===> Virus/Malware Removal Assistance
=> Comodo BOClean Anti-Malware
===> Announcements
===> Comodo BOClean Anti-Malware FAQ
=> Comodo DiskShield
=> Comodo Disk Encryption
=> Comodo Secure Email (CSE) Product
===> CSE Beta Corner
===> Frequently Asked Questions (FAQ)
===> Feedback/Comments/Announcements/News about CSE
===> Bug Reports
===> Help for Comodo SecureEmail
=> Comodo Memory Firewall(Buffer Overflow Protection)
===> Help
===> Frequently Asked Questions (Comodo Memory Firewall)
===> Feedback/Comments/Announcements/News
=> Comodo TrustConnect - Securing the Wireless world!
=> Comodo SafeSurf and (Comodo's own toolbar)
=> Backup
===> FAQ for Comodo Backup
===> Help
=> Verification Engine (allows you to verify what you see on the Internet)
=> Comodo Vulnerability Analyzer
=> AntiSpam
=> i-Vault
=> Launch Pad
=> Trusttoolbar
-----------------------------
Desktop Utilities
-----------------------------
=> Comodo Registry Cleaner
-----------------------------
Enterprise Security
-----------------------------
=> Comodo Endpoint Security Manager
-----------------------------
Compliance
-----------------------------
=> PCI DSS Compliance
-----------------------------
Learn about Computer Security and Interact with Security Experts
-----------------------------
=> Computer Firewalls
=> Anti Virus/Malware Products/Other Security products
=> Free Virus/Spyware/Trojan/Malware Removal by Comodo Experts
=> HIPS (Host Intrusion Prevention Systems)
=> Anti Phishing solutions
=> Digital Certificates, Encryption and Digital Signing
=> General Security Questions and Comments (not product related)
-----------------------------
Free Services for End Users
-----------------------------
=> UserTrust - First Independent Website Rating - Empowering our users!
=> User Anywhere (Remote Access product)
=> Comodo Meet (Web Conferencing Product)
=> Hacker Guardian
=> Trustfax (free Trial) (online faxing)
-----------------------------
Free Products
-----------------------------
=> Link to Free Comodo Products
-----------------------------
International Comodo Forums
-----------------------------
=> International Comodo Forums
===> 汉语语言, 漢語語言 / Chinese Simplified, Traditional
===> Nederlands / Dutch
===> Francais / French
===> Deutsch / German
===> ελληνικά / Greek
===> Magyar / Hungarian
===> Italiano / Italian
===> Nihongo / Japanese
===> Norsk / Norwegian
===> Polski / Polish
===> Português/Portuguese
===> По-русски / Russian
===> Espanol / Spanish
===> Svenska / Swedish
===> Turkce / Turkish
===> Українська / Ukrainian
===> tiếng Việt / Vietnamese
-----------------------------
Digital Certificates
-----------------------------
=> Code Signing Certificate
=> Content Verification Certificate
=> Email Certificate
=> SSL Certificate
-----------------------------
Web Server Products
-----------------------------
=> Two Factor Authentication for Web Applications
=> Trustlogo
-----------------------------
Infrastructure Products
-----------------------------
=> ZTL
=> Trustix Enterprise Firewall
-----------------------------
Other
-----------------------------
=> Forum Policy Violation Board
Page created in 0.015 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