Re: [mrtg] Large Master Config Vulnerability

This is a discussion on Re: [mrtg] Large Master Config Vulnerability within the MRTG forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --===============1541675544== Content-Type: multipart/alternative; boundary="----=_NextPart_000_00EC_01C8A087.1A5F2010" This ...


Go Back   Usenet Forums > Networking and Network Related > MRTG

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008
Anson Rinesmith
 
Posts: n/a
Default Re: [mrtg] Large Master Config Vulnerability

This is a multi-part message in MIME format.

--===============1541675544==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_00EC_01C8A087.1A5F2010"

This is a multi-part message in MIME format.

------=_NextPart_000_00EC_01C8A087.1A5F2010
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

>From the cfgmaker manual.


The next example demonstrates how to use the --community, --snmp-options and
--dns-domain to make the command line simpler. All the equipment will use
the community hidden, except for the ppp-server which use community access.
All equipment uses these SNMP options: 1s timeout, 1 retry and SNMP version
2
cfgmaker --global "WorkDir: /home/tobi" \
--global "Options[_]: growright,bits" \
--dns-domain=place.xyz \
--community=hidden \
--snmp-options=::1:1::2





So you can limit your retries and the timeout. The cfgmaker default is
:::::2.

>From the references manual.


timeout

initial timeout for SNMP queries, in seconds (default: 2.0)

retries

number of times a timed-out request will be retried (default: 5)

backoff

factor by which the timeout is multiplied on every retry (default: 1.0).





_____

From: Mersberger, Robert [mailto:robert.mersberger@goldenliving.com]
Sent: Thursday, April 17, 2008 12:12 PM
To: Anson Rinesmith; Brad Lodgen; mrtg@lists.oetiker.ch
Subject: RE: [mrtg] Large Master Config Vulnerability



I have all my configs in one directory and run mrtg as a cron job with the
following script.



#! /bin/bash



for fn in /etc/mrtg/*.cfg; do
env LANG=C /usr/bin/mrtg "$fn" &
done



Maybe this will would for you. I have been down the include route and I
agree it does cause problems.





_____

From: mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch]
On Behalf Of Anson Rinesmith
Sent: Thursday, April 17, 2008 11:47 AM
To: 'Brad Lodgen'; mrtg@lists.oetiker.ch
Subject: Re: [mrtg] Large Master Config Vulnerability

You could always limit the number of retries.

A second option is to break up the master config file into other smaller
files, and therefore when something breaks only that smaller portion is
broken and the rest of your polls proceed without error.



_____

From: mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch]
On Behalf Of Brad Lodgen
Sent: Thursday, April 17, 2008 11:39 AM
To: mrtg@lists.oetiker.ch
Subject: [mrtg] Large Master Config Vulnerability



Hi everyone,

I'm running a master config with hundreds of include lines and thousands of
targets. This type of setup is vulnerable to errors in config files and/or
changes made in the field not being immediately updated within the configs.
If there are a few errors or changes out in the field to ports causing them
to become 'unpollable', it causes the MRTG polling interval to go over five
minutes because it's retrying those interfaces. At the moment, with only
about 30 error lines in my log(equating to about 15 interfaces/targets),
it's causing MRTG to take 7-9 minutes to complete polling. As this is a very
small percentage compared to the total amount of targets being polled, I'm
trying to figure out a way to get around this, if possible, or at least to
minimize the effects.

Is anyone else running a system like this or does anyone have suggestions to
try?

Thanks in advance for any help!
Brad

Please consider the environment before printing this e-mail.

CONFIDENTIAL NOTICE:
This e-mail message and any attachment(s) (collectively, this 'Email') are
intended
only for the confidential use of the recipient(s) named above. If the reader
of this
message is not the intended recipient named above or an agent responsible
for
delivering it to the intended recipient named above, you have received this
Email in error.
Please notify the sender immediately and permanently delete this Email and
any copies thereof.


------=_NextPart_000_00EC_01C8A087.1A5F2010
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal;
font-family:Arial;
color:navy;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>From the cfgmaker =
manual.<o:p></o:p></span></font></p>

<pre><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>The next example demonstrates how to use the =
<strong><b><font
face=3D"Courier New"><span style=3D'font-family:"Courier =
New"'>--community</span></font></b></strong>, <strong><b><font
face=3D"Courier New"><span style=3D'font-family:"Courier =
New"'>--snmp-options</span></font></b></strong> and <strong><b><font
face=3D"Courier New"><span style=3D'font-family:"Courier =
New"'>--dns-domain</span></font></b></strong> to make the command line =
simpler. All the equipment will use the community <i><span
style=3D'font-style:italic'>hidden</span></i>, except for the ppp-server =
which use community <i><span
style=3D'font-style:italic'>access</span></i>. All equipment uses these =
SNMP options: <strong><b><font
face=3D"Courier New"><span style=3D'font-family:"Courier New"'>1s =
timeout</span></font></b></strong>, <strong><b><font
face=3D"Courier New"><span style=3D'font-family:"Courier New"'>1 =
retry</span></font></b></strong> and <strong><b><font
face=3D"Courier New"><span style=3D'font-family:"Courier New"'>SNMP =
version =
2</span></font></b></strong><o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>cfgmaker =
--global &quot;WorkDir: =
/home/tobi&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nb=
sp; \<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbs=
p;&nbsp; --global &quot;Options[_]: =
growright,bits&quot;&nbsp;&nbsp;&nbsp; =
\<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbs=
p;&nbsp; =
--dns-domain=3Dplace.xyz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp; =
\<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbs=
p;&nbsp; =
--community=3Dhidden&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; \<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbs=
p;&nbsp; --snmp-options=3D::1:1::2<o:p></o:p></span></font></pre>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>So you can limit your retries and =
the
timeout. The cfgmaker default is :::::2.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>From the references =
manual.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>timeout<o:p></o:p></span></font></p>

<p style=3D'margin-left:.5in'><font size=3D3 face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt'>initial timeout for SNMP queries, in seconds =
(default:
2.0)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>retries<o:p></o:p></span></font></p>

<p style=3D'margin-left:.5in'><font size=3D3 face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt'>number of times a timed-out request will be =
retried
(default: 5)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>backoff<o:p></o:p></span></font></p>

<p style=3D'margin-left:.5in'><font size=3D3 face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt'>factor by which the timeout is multiplied on =
every
retry (default: 1.0).<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>

</span></font></div>

<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> =
Mersberger,
Robert [mailto:robert.mersberger@goldenliving.com] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, April 17, =
2008
12:12 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> Anson Rinesmith; Brad =
Lodgen;
mrtg@lists.oetiker.ch<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: [mrtg] Large =
Master
Config Vulnerability</span></font><o:p></o:p></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>I have all my configs in one =
directory and
run mrtg as a cron job with the following =
script.</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>#! =
/bin/bash</span></font><o:p></o:p></p>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>for fn in /etc/mrtg/*.cfg; do<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; env LANG=3DC /usr/bin/mrtg
&quot;$fn&quot; &amp;<br>
done</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:blue'>Maybe this will would for =
you.&nbsp; I
have been down the include route and I agree it does cause =
problems.</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabIndex=3D-1>

</span></font></div>

<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><b><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</spa=
n></font></b><font
size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma'>
mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch] =
<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Anson Rinesmith<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, April 17, =
2008
11:47 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> 'Brad Lodgen';
mrtg@lists.oetiker.ch<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Re: [mrtg] Large =
Master
Config Vulnerability</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>You could always limit the number =
of
retries.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>A second option is to break up the =
master
config file into other smaller files, and therefore when something =
breaks only
that smaller portion is broken and the rest of your polls proceed =
without
error.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabIndex=3D-1>

</span></font></div>

<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>
mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch] =
<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Brad Lodgen<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, April 17, =
2008
11:39 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
mrtg@lists.oetiker.ch<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [mrtg] Large =
Master
Config Vulnerability</span></font><o:p></o:p></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Hi everyone,<br>
<br>
I'm running a master config with hundreds of include lines and thousands =
of
targets. This type of setup is vulnerable to errors in config files =
and/or
changes made in the field not being immediately updated within the =
configs. If
there are a few errors or changes out in the field to ports causing them =
to
become 'unpollable', it causes the MRTG polling interval to go over five =
minutes
because it's retrying those interfaces. At the moment, with only about =
30 error
lines in my log(equating to about 15 interfaces/targets), it's causing =
MRTG to
take 7-9 minutes to complete polling. As this is a very small percentage
compared to the total amount of targets being polled, I'm trying to =
figure out
a way to get around this, if possible, or at least to minimize the =
effects.<br>
<br>
Is anyone else running a system like this or does anyone have =
suggestions to
try?<br>
<br>
Thanks in advance for any help!<br>
Brad<o:p></o:p></span></font></p>

<p><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'>Please
consider the environment before printing this e-mail. <br>
<br>
CONFIDENTIAL NOTICE:<br>
This e-mail message and any attachment(s) (collectively, this 'Email') =
are
intended <br>
only for the confidential use of the recipient(s) named above. If the =
reader of
this <br>
message is not the intended recipient named above or an agent =
responsible for <br>
delivering it to the intended recipient named above, you have received =
this
Email in error. <br>
Please notify the sender immediately and permanently delete this Email =
and any
copies thereof.<o:p></o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_00EC_01C8A087.1A5F2010--


--===============1541675544==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
mrtg mailing list
mrtg@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

--===============1541675544==--

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0