ramond : paquet ramond pour fy et ramond.conf
This commit is contained in:
parent
3c74886696
commit
595f548696
3 changed files with 69 additions and 0 deletions
5
Bundler/ramond.xml
Normal file
5
Bundler/ramond.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<Bundle name="ramond">
|
||||||
|
<Python name="/etc/ramond.conf"/>
|
||||||
|
<Package name="ramond"/>
|
||||||
|
<Service name="ramond"/>
|
||||||
|
</Bundle>
|
|
@ -1529,6 +1529,7 @@
|
||||||
<Group name="sniffer">
|
<Group name="sniffer">
|
||||||
<!-- Le serveur qui surveille le réseau -->
|
<!-- Le serveur qui surveille le réseau -->
|
||||||
<Group name="arpwatch"/>
|
<Group name="arpwatch"/>
|
||||||
|
<Group name="ramond"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group name="arpwatch" > <!-- arpwatch special crans avec traçage des macs -->
|
<Group name="arpwatch" > <!-- arpwatch special crans avec traçage des macs -->
|
||||||
|
@ -1537,6 +1538,10 @@
|
||||||
<Bundle name="snmp-utils" comment="Pour traçage macs"/>
|
<Bundle name="snmp-utils" comment="Pour traçage macs"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
|
<Group name="ramond">
|
||||||
|
<Bundle name="ramond"/>
|
||||||
|
</Group>
|
||||||
|
|
||||||
<!-- +====================+ -->
|
<!-- +====================+ -->
|
||||||
<!-- | Groupes dynamiques | -->
|
<!-- | Groupes dynamiques | -->
|
||||||
<!-- +====================+ -->
|
<!-- +====================+ -->
|
||||||
|
|
59
Python/etc/ramond.conf
Normal file
59
Python/etc/ramond.conf
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
info["owner"] = "root"
|
||||||
|
info["group"] = "root"
|
||||||
|
info["perms"] = 0644
|
||||||
|
|
||||||
|
import sys
|
||||||
|
sys.path.append('/usr/scripts/gestion')
|
||||||
|
|
||||||
|
from gestion.config import mac_komaz
|
||||||
|
from gestion.config import mac_titanic
|
||||||
|
from gestion.config import mac_du_routeur
|
||||||
|
from gestion.config import prefix
|
||||||
|
from gestion.config import int_prefix
|
||||||
|
|
||||||
|
print """<?xml version="1.0" encoding="ISO-8859-15"?>
|
||||||
|
<!DOCTYPE ramond SYSTEM "ramond.conf.dtd">
|
||||||
|
<ramond logfile="/var/log/ramond.log">
|
||||||
|
|
||||||
|
<mac-list name="router">"""
|
||||||
|
def printmac(mac):
|
||||||
|
print """
|
||||||
|
<entry>""" + mac + """</entry>"""
|
||||||
|
|
||||||
|
printmac(mac_du_routeur)
|
||||||
|
printmac(mac_komaz)
|
||||||
|
printmac(mac_titanic)
|
||||||
|
print """
|
||||||
|
</mac-list>
|
||||||
|
"""
|
||||||
|
|
||||||
|
def prefi(pref):
|
||||||
|
print """
|
||||||
|
<rule mac="router" prefix=\"""" + pref + """\">
|
||||||
|
<!-- do nothing -->
|
||||||
|
</rule>
|
||||||
|
"""
|
||||||
|
|
||||||
|
prefi(prefix['fil'][0])
|
||||||
|
|
||||||
|
prefi(prefix['wifi'][0])
|
||||||
|
|
||||||
|
prefi(prefix['evenementiel'][0])
|
||||||
|
|
||||||
|
prefi(prefix['v6only'][0])
|
||||||
|
|
||||||
|
prefi(int_prefix['manage_ap'])
|
||||||
|
|
||||||
|
print """
|
||||||
|
<!-- UNKNOWN PREFIX -->
|
||||||
|
<!-- this matches every advertised _prefix_-->
|
||||||
|
<rule prefix="::/0">
|
||||||
|
<execute>/usr/scripts/surveillance/ra2.py</execute>
|
||||||
|
</rule>
|
||||||
|
<!-- this matches everything, including ras without advertised prefixes-->
|
||||||
|
<rule>
|
||||||
|
<execute>/usr/scripts/surveillance/ra2.py</execute>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
|
</ramond>"""
|
Loading…
Add table
Add a link
Reference in a new issue