Difference between revisions of "NOC:ctwug global settings"
From CTWUG Wiki
Bigmikedavis (talk | contribs) (New page: == Purpose == == Dependencies == == Script == == WMS == Wug Management System) |
|||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
== Purpose == | == Purpose == | ||
| + | *Set Time Zone to Africa/Johannesburg | ||
| + | *Configure the NTP client | ||
| + | *Enable SNMP | ||
| + | *Enable Connection Tracking | ||
| + | *Update Radius configuration of the service with a "CTWUG" comment. (Timout:2sec Address:172.18.1.1). If there is not a service with "CTWUG" in the comment it will loop through all the service entries and update them to use the radius server on 172.18.1.1. '''This does not sound right!?''' | ||
| + | *Remove MPLS (ctwug_mpls) scripts | ||
| + | *Remove netflows (ctwug_netflow) script | ||
| + | *Disable netflow | ||
== Dependencies == | == Dependencies == | ||
== Script == | == Script == | ||
| − | + | #/ip dns set allow-remote-requests=yes primary-dns=172.18.1.1 | |
| − | == | + | /system clock set time-zone-name=Africa/Johannesburg |
| − | [[ | + | /system ntp client set enabled=yes mode=unicast primary-ntp=172.18.1.1 |
| + | /snmp set enabled=yes | ||
| + | /ip firewall connection tracking set enabled=yes | ||
| + | /radius | ||
| + | :local id | ||
| + | :local fto 00:00:02 | ||
| + | :local fadd 172.18.0.1 | ||
| + | :local ffound 0 | ||
| + | :foreach id in [find comment=CTWUG] do={ | ||
| + | :if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto] | ||
| + | :if ( [get $id address] != $fadd ) do=[set $id address=$fadd] | ||
| + | set $id comment=CTWUG | ||
| + | :set ffound 1 | ||
| + | } | ||
| + | :if ($ffound = 0) do={ | ||
| + | :foreach id in [find] do={ | ||
| + | :if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto] | ||
| + | :if ( [get $id address] != $fadd ) do=[set $id address=$fadd] | ||
| + | set $id comment=CTWUG | ||
| + | } | ||
| + | } | ||
| + | /system script | ||
| + | :local fs | ||
| + | :foreach fs in [find] do={ | ||
| + | :if ( [:pick [get $fs name] 0 10] = "ctwug_mpls" ) do=[remove $fs] | ||
| + | :if ( [:pick [get $fs name] 0 13] = "ctwug_netflow" ) do=[remove $fs] | ||
| + | } | ||
| + | :if [/ip traffic-flow get enabled] do={ | ||
| + | /log info ("disabling netflows") | ||
| + | /ip traffic-flow set enabled=no | ||
| + | } | ||
Latest revision as of 18:08, 30 June 2013
Purpose
- Set Time Zone to Africa/Johannesburg
- Configure the NTP client
- Enable SNMP
- Enable Connection Tracking
- Update Radius configuration of the service with a "CTWUG" comment. (Timout:2sec Address:172.18.1.1). If there is not a service with "CTWUG" in the comment it will loop through all the service entries and update them to use the radius server on 172.18.1.1. This does not sound right!?
- Remove MPLS (ctwug_mpls) scripts
- Remove netflows (ctwug_netflow) script
- Disable netflow
Dependencies
Script
#/ip dns set allow-remote-requests=yes primary-dns=172.18.1.1
/system clock set time-zone-name=Africa/Johannesburg
/system ntp client set enabled=yes mode=unicast primary-ntp=172.18.1.1
/snmp set enabled=yes
/ip firewall connection tracking set enabled=yes
/radius
:local id
:local fto 00:00:02
:local fadd 172.18.0.1
:local ffound 0
:foreach id in [find comment=CTWUG] do={
:if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto]
:if ( [get $id address] != $fadd ) do=[set $id address=$fadd]
set $id comment=CTWUG
:set ffound 1
}
:if ($ffound = 0) do={
:foreach id in [find] do={
:if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto]
:if ( [get $id address] != $fadd ) do=[set $id address=$fadd]
set $id comment=CTWUG
}
}
/system script
:local fs
:foreach fs in [find] do={
:if ( [:pick [get $fs name] 0 10] = "ctwug_mpls" ) do=[remove $fs]
:if ( [:pick [get $fs name] 0 13] = "ctwug_netflow" ) do=[remove $fs]
}
:if [/ip traffic-flow get enabled] do={
/log info ("disabling netflows")
/ip traffic-flow set enabled=no
}