Discussion:
[rancid] Couple of Questions. upgrading and Fortinet issue.
Chris Davis
2013-07-15 20:55:49 UTC
Permalink
I recently tried integrating my Fortinet FortiGate units into RANCID. I'm having some trouble which I see has been noticed here before. Apparently 2.3.8 patch 4 should fix the problem of my Private keys looking like they've been changed and they should stop generating a change report every time the job runs. That led me to another problem.

I am currently on version 2.3.6 and I was wondering if upgrading to 2.3.8 was just as simple as expanding the archive and running .configure and make? Will it move my data around if needed? Or is that something I have to do manually?

The other thing I've noticed is that other folks also had passwords seem to be continually changing and causing alerts. I have never noted this in my clusters........................yet. I do however get an alert that the date has changed on the unit instead. Any ideas other than the patch to get rid (hopefully) of the change being caused by the date?

Thanks in Advance.
Chris
Richard Savage
2013-07-15 21:06:13 UTC
Permalink
The other thing I’ve noticed is that other folks also had passwords seem to be continually changing and causing alerts. I have never noted this in my clusters……………………yet.

-- Yes I see this all the time, every time a backup is run. I need to be able to backup a full config on other devices, (cisco, juicer) so can't disable the grabbing of password data in rancid as this would stop it being backed up for all cisco and juniper hardware. Not sure of any way to achieve this at the moment.

Rich

This e-mail is sent on behalf of NewNet Limited, a company registered in England and Wales, registered number 03128506, registered office Carnac Lodge, Cams Estate, FAREHAM, Hampshire PO16 8UJ and regulated by Ofcom. The information in this e-mail is confidential and is intended solely for the use of that individual or entity to which it is addressed. Unauthorised use, dissemination, distribution, publication or copying of this communication is strictly prohibited. If you receive this in error, please notify us by email to ***@newnet.co.uk<mailto:***@newnet.co.uk> and delete any copies. For information about how we process data and monitor communications please see our privacy statement<http://www.newnet.co.uk/Bottom-Bar/privacy-policy.php>.
heasley
2013-07-15 21:27:27 UTC
Permalink
The other thing I?ve noticed is that other folks also had passwords seem to be continually changing and causing alerts. I have never noted this in my clusters????????yet.
-- Yes I see this all the time, every time a backup is run. I need to be able to backup a full config on other devices, (cisco, juicer) so can't disable the grabbing of password data in rancid as this would stop it being backed up for all cisco and juniper hardware. Not sure of any way to achieve this at the moment.
what if a <group>/rancid.conf were supported that could over-ride configuration
of the global rancid.conf?
heasley
2013-07-15 21:25:11 UTC
Permalink
Post by Chris Davis
I recently tried integrating my Fortinet FortiGate units into RANCID. I'm having some trouble which I see has been noticed here before. Apparently 2.3.8 patch 4 should fix the problem of my Private keys looking like they've been changed and they should stop generating a change report every time the job runs. That led me to another problem.
I am currently on version 2.3.6 and I was wondering if upgrading to 2.3.8 was just as simple as expanding the archive and running .configure and make? Will it move my data around if needed? Or is that something I have to do manually?
no files move, that i recall.
Post by Chris Davis
The other thing I've noticed is that other folks also had passwords seem to be continually changing and causing alerts. I have never noted this in my clusters........................yet. I do however get an alert that the date has changed on the unit instead. Any ideas other than the patch to get rid (hopefully) of the change being caused by the date?
perhaps you can compare your o/s revisions and configs with Richard Savage to
possibly find what causes the passwords oscillate.
Richard Savage
2013-07-15 21:29:45 UTC
Permalink
Post by heasley
The other thing I?ve noticed is that other folks also had passwords
seem to be continually changing and causing alerts. I have never noted
this in my clusters????????yet.
-- Yes I see this all the time, every time a backup is run. I need to
be able to backup a full config on other devices, (cisco, juicer) so
can't disable the grabbing of password data in rancid as this would stop
it being backed up for all cisco and juniper hardware. Not sure of any
way to achieve this at the moment.
what if a <group>/rancid.conf were supported that could over-ride
configuration
of the global rancid.conf?
Yes either a group or a hardware type would be good. Some way of
excluding the password from certain hosts would be great. :)

Rich

This e-mail is sent on behalf of NewNet Limited, a company registered in England and Wales, registered number 03128506, registered office Carnac Lodge, Cams Estate, FAREHAM, Hampshire PO16 8UJ and regulated by Ofcom. The information in this e-mail is confidential and is intended solely for the use of that individual or entity to which it is addressed. Unauthorised use, dissemination, distribution, publication or copying of this communication is strictly prohibited. If you receive this in error, please notify us by email to ***@newnet.co.uk<mailto:***@newnet.co.uk> and delete any copies. For information about how we process data and monitor communications please see our privacy statement<http://www.newnet.co.uk/Bottom-Bar/privacy-policy.php>.
Chris Davis
2013-07-15 21:42:03 UTC
Permalink
Here is what I am seeing in my rancid reports.

Index: configs/x.x.x.x
===================================================================
retrieving revision 1.150
diff -U 4 -r1.150 x.x.x.x
@@ -17,9 +17,9 @@
!Distribution: International
!Branch point: 665
!Release Version Information: MR3 Patch 14
!FortiOS x86-64: Yes
- !System time: Mon Jul 15 15:06:58 2013
+ !System time: Mon Jul 15 16:07:02 2013

config system global
set access-banner disable
set admin-concurrent enable
@@ -9112,22 +9112,22 @@
edit "Fortinet_Factory"
!set password ENC <removed>
set private-key "-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED

And then my old key and then the new key. I'm not sure if it's getting confused on the master/slave issue because the fortinet's have the same IP address, even though there are two separate firewalls. Could be the time issue too.

Chris

-----Original Message-----
From: Richard Savage [mailto:***@newnet.co.uk]
Sent: Monday, July 15, 2013 4:30 PM
To: heasley
Cc: Chris Davis; 'rancid-***@shrubbery.net'
Subject: Re: [rancid] Couple of Questions. upgrading and Fortinet issue.
Post by heasley
The other thing I?ve noticed is that other folks also had passwords
seem to be continually changing and causing alerts. I have never
noted this in my clusters????????yet.
-- Yes I see this all the time, every time a backup is run. I need to
be able to backup a full config on other devices, (cisco, juicer) so
can't disable the grabbing of password data in rancid as this would
stop it being backed up for all cisco and juniper hardware. Not sure
of any way to achieve this at the moment.
what if a <group>/rancid.conf were supported that could over-ride
configuration of the global rancid.conf?
Yes either a group or a hardware type would be good. Some way of excluding the password from certain hosts would be great. :)

Rich

This e-mail is sent on behalf of NewNet Limited, a company registered in England and Wales, registered number 03128506, registered office Carnac Lodge, Cams Estate, FAREHAM, Hampshire PO16 8UJ and regulated by Ofcom. The information in this e-mail is confidential and is intended solely for the use of that individual or entity to which it is addressed. Unauthorised use, dissemination, distribution, publication or copying of this communication is strictly prohibited. If you receive this in error, please notify us by email to ***@newnet.co.uk<mailto:***@newnet.co.uk> and delete any copies. For information about how we process data and monitor communications please see our privacy statement<http://www.newnet.co.uk/Bottom-Bar/privacy-policy.php>.
Richard Savage
2013-07-16 10:28:08 UTC
Permalink
Chris
heasley
2013-07-23 22:14:14 UTC
Permalink
Post by Richard Savage
Post by heasley
The other thing I?ve noticed is that other folks also had passwords
seem to be continually changing and causing alerts. I have never noted
this in my clusters????????yet.
-- Yes I see this all the time, every time a backup is run. I need to
be able to backup a full config on other devices, (cisco, juicer) so
can't disable the grabbing of password data in rancid as this would stop
it being backed up for all cisco and juniper hardware. Not sure of any
way to achieve this at the moment.
what if a <group>/rancid.conf were supported that could over-ride
configuration
of the global rancid.conf?
Yes either a group or a hardware type would be good. Some way of
excluding the password from certain hosts would be great. :)
Rich
there might be fuzz w/ pre-3.0a.

Index: bin/control_rancid.in
===================================================================
--- bin/control_rancid.in (revision 2713)
+++ bin/control_rancid.in (working copy)
@@ -45,11 +45,12 @@

# print a usage message to stderr
pr_usage() {
- echo "usage: $0 [-V] [-r device_name] [-m mail rcpt] group" >&2;
+ echo "usage: $0 [-V] [-f group_config_file] [-r device_name] [-m mail rcpt] group" >&2;
}

# command-line options
# -V print version string
+# -f <group config file name>
# -m <mail recipients>
# -r <device name>
alt_mailrcpt=0
@@ -61,6 +62,16 @@
echo "@PACKAGE@ @VERSION@"
exit 0
;;
+ -f)
+ shift
+ # next arg is the alternate config file name
+ ENVFILE="$1"
+ if [ -z $ENVFILE ]; then
+ pr_usage
+ exit 1
+ fi
+ shift
+ ;;
-m)
shift
# next arg is the mail recipient
@@ -105,6 +116,12 @@
fi
DIR=$BASEDIR/$GROUP
TMP=${TMPDIR:=/tmp}/rancid.$GROUP.$$
+if [ -z "$ENVFILE" ] ; then
+ ENVFILE="$DIR/rancid.conf"
+fi
+if [ -e "$ENVFILE" ] ; then
+ . $ENVFILE
+fi
trap 'rm -fr $TMP;' 1 2 15

# disable noclobber
@@ -167,6 +184,14 @@
fi
fi

+# check if there is a rancid.conf and if it needs to be added to the RCS
+if [ -e rancid.conf ] ; then
+ LN=`$RCSSYS ls rancid.conf | wc -l`
+ if [ $LN -eq 0 ] ; then
+ $RCSSYS add rancid.conf
+ fi
+fi
+
# do cvs update of router.db in case anyone has fiddled.
$RCSSYS update router.db > $TMP 2>&1
grep "^C" $TMP > /dev/null
Index: CHANGES
===================================================================
--- CHANGES (revision 2713)
+++ CHANGES (working copy)
@@ -1,4 +1,7 @@
3.0a3
+ control_rancid: add group-specific rancid.conf file & supporting -f
+ option
+
nxrancid: filter snmp communities, tacacs keys and neighbor pwds - Alan
McKinnon

Index: man/control_rancid.1
===================================================================
--- man/control_rancid.1 (revision 2713)
+++ man/control_rancid.1 (working copy)
@@ -1,11 +1,14 @@
.\"
.hys 50
-.TH "control_rancid" "1" "5 October 2006"
+.TH "control_rancid" "1" "15 July 2013"
.SH NAME
control_rancid \- run rancid for devices of a group
.SH SYNOPSIS
.B control_rancid
[\fB\-V\fR] [\c
+.BI \-f\ \c
+group_config_file]\ \c
+[\c
.BI \-m\ \c
mail_rcpt]\ \c
[\c
@@ -28,6 +31,18 @@
.B \-V
Prints package name and version strings.
.TP
+.B \-f group_config_file
+Specify a rancid.conf specific to the given group. The global rancid.conf
+file is read by rancid-run, which calls
+.B control_rancid
+for each group, and
+.B control_rancid
+reads the group-specific rancid.conf, thereby overriding the global file.
+.sp
+The group-specific rancid.conf may not exist.
+.sp
+Default: <BASEDIR>/<group>/rancid.conf
+.TP
.B \-m mail_rcpt
Specify the recipient of diff mail, which is normally rancid-<group>. The
argument may be a single address, multiple comma separated addresses, or
heasley
2013-07-23 22:19:30 UTC
Permalink
Post by Chris Davis
Here is what I am seeing in my rancid reports.
Index: configs/x.x.x.x
===================================================================
retrieving revision 1.150
diff -U 4 -r1.150 x.x.x.x
@@ -17,9 +17,9 @@
!Distribution: International
!Branch point: 665
!Release Version Information: MR3 Patch 14
!FortiOS x86-64: Yes
- !System time: Mon Jul 15 15:06:58 2013
+ !System time: Mon Jul 15 16:07:02 2013
see patch below
Post by Chris Davis
config system global
set access-banner disable
set admin-concurrent enable
@@ -9112,22 +9112,22 @@
edit "Fortinet_Factory"
!set password ENC <removed>
set private-key "-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
And then my old key and then the new key. I'm not sure if it's getting confused on the master/slave issue because the fortinet's have the same IP address, even though there are two separate firewalls. Could be the time issue too.
seems like a rather odd configuration for the primary and standy by answer
on the same management address when they're both active??

Index: bin/fnrancid.in
===================================================================
--- bin/fnrancid.in (revision 2279)
+++ bin/fnrancid.in (revision 2280)
@@ -175,7 +175,7 @@
next if /^\s*$/;
last if (/$prompt/);

- next if (/^System Time:/);
+ next if (/^system time:/i);
next if (/^\s*Virus-DB: .*/);
next if (/^\s*Extended DB: .*/);
next if (/^\s*IPS-DB: .*/);
@@ -207,7 +207,7 @@
# System time is fortigate extraction time
next if (/^\s*!System time:/);
# remove occurrances of conf_file_ver
- next if (/^conf_file_ver=/);
+ next if (/^#?conf_file_ver=/);
# filter variabilities between configurations. password encryption
# upon each display of the configuration.
if (/^\s*(set [^\s]*)\s(Enc\s[^\s]+)(.*)/i && $filter_pwds > 0 ) {
Chris Davis
2013-08-07 20:09:04 UTC
Permalink
That is the way they are set up. It seemed strange to me but it all works.

Chris

-----Original Message-----
From: heasley [mailto:***@shrubbery.net]
Sent: Tuesday, July 23, 2013 5:20 PM
To: Chris Davis
Cc: 'Richard Savage'; 'rancid-***@shrubbery.net'
Subject: Re: [rancid] Couple of Questions. upgrading and Fortinet issue.
Post by Chris Davis
Here is what I am seeing in my rancid reports.
Index: configs/x.x.x.x
===================================================================
retrieving revision 1.150
diff -U 4 -r1.150 x.x.x.x
@@ -17,9 +17,9 @@
!Distribution: International
!Branch point: 665
!Release Version Information: MR3 Patch 14
!FortiOS x86-64: Yes
- !System time: Mon Jul 15 15:06:58 2013
+ !System time: Mon Jul 15 16:07:02 2013
see patch below
Post by Chris Davis
config system global
set access-banner disable
set admin-concurrent enable
@@ -9112,22 +9112,22 @@
edit "Fortinet_Factory"
!set password ENC <removed>
set private-key "-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
And then my old key and then the new key. I'm not sure if it's getting confused on the master/slave issue because the fortinet's have the same IP address, even though there are two separate firewalls. Could be the time issue too.
seems like a rather odd configuration for the primary and standy by answer on the same management address when they're both active??

Index: bin/fnrancid.in
===================================================================
--- bin/fnrancid.in (revision 2279)
+++ bin/fnrancid.in (revision 2280)
@@ -175,7 +175,7 @@
next if /^\s*$/;
last if (/$prompt/);

- next if (/^System Time:/);
+ next if (/^system time:/i);
next if (/^\s*Virus-DB: .*/);
next if (/^\s*Extended DB: .*/);
next if (/^\s*IPS-DB: .*/);
@@ -207,7 +207,7 @@
# System time is fortigate extraction time
next if (/^\s*!System time:/);
# remove occurrances of conf_file_ver
- next if (/^conf_file_ver=/);
+ next if (/^#?conf_file_ver=/);
# filter variabilities between configurations. password encryption
# upon each display of the configuration.
if (/^\s*(set [^\s]*)\s(Enc\s[^\s]+)(.*)/i && $filter_pwds > 0 ) {
heasley
2013-08-08 13:58:18 UTC
Permalink
Post by Chris Davis
Post by Chris Davis
And then my old key and then the new key. I'm not sure if it's getting confused on the master/slave issue because the fortinet's have the same IP address, even though there are two separate firewalls. Could be the time issue too.
seems like a rather odd configuration for the primary and standy by answer on the same management address when they're both active??
That is the way they are set up. It seemed strange to me but it all works.
Well, you probably just need to add a filter for the key.

Loading...