1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-11-23 13:22:36 +01:00

adding new .gitignore and json_configs files

This commit is contained in:
Eric Chou 2016-08-13 12:06:55 -07:00
parent e47200aebb
commit 70c388abdc
7 changed files with 166 additions and 1 deletions

@ -1,4 +1,4 @@
*.py *.pyc
*.python *.python
*.egg *.egg
*.egg-info/ *.egg-info/

@ -0,0 +1,16 @@
bgp_advertisement_path = '/axapi/v3/router/bgp/'
def bgp_advertisement(ip_addr):
route_advertisement = {
"bgp":
{
"network": {
"ip-cidr-list": [
{
"network-ipv4-cidr":ip_addr+"/32",
}
]
},
}
}
return route_advertisement

@ -0,0 +1,101 @@
ddos_dst_zone_path = '/axapi/v3/ddos/dst/zone/'
def ddos_dst_zone(zone_name, ip_addr):
ddos_dst_zone_payload = {
"zone-list": [
{
"zone-name":zone_name,
"ip": [
{
"ip-addr":ip_addr
}
],
"operational-mode":"monitor",
"advertised-enable":1,
"zone-template": {
"logging":"cef-logger"
},
"log-enable":1,
"log-periodic":1,
"ip-proto": {
"proto-tcp-udp-list": [
{
"protocol":"tcp",
"drop-frag-pkt":1,
},
{
"protocol":"udp",
"drop-frag-pkt":1,
}
],
"proto-name-list": [
{
"protocol":"icmp-v4",
"deny":1,
"detection-enable":1,
},
{
"protocol":"icmp-v6",
"deny":1,
"detection-enable":1,
}
]
},
"port": {
"zone-service-other-list": [
{
"port-other":"other",
"protocol":"tcp",
"detection-enable":1,
"level-list": [
{
"level-num":"0",
"zone-escalation-score":10,
"indicator-list": [
{
"type":"pkt-rate",
"score":20,
"zone-threshold-num":1,
}
]
},
{
"level-num":"1",
"zone-template": {
"tcp":"tcp-protect1"
},
}
]
},
{
"port-other":"other",
"protocol":"udp",
"detection-enable":1,
"level-list": [
{
"level-num":"0",
"zone-escalation-score":10,
"indicator-list": [
{
"type":"pkt-rate",
"score":20,
"zone-threshold-num":1,
}
]
},
{
"level-num":"1",
"zone-template": {
"udp":"udp-protect1"
},
}
]
}
]
}
}
]
}
return ddos_dst_zone_payload

@ -0,0 +1,44 @@
ddos_dst_zone_path = '/axapi/v3/ddos/dst/zone/'
def ddos_dst_zone(zone_name, ip_addr):
port_num = 53
port_protocol = 'udp'
ddos_dst_zone_payload = {
"zone-list": [
{
"zone-name":zone_name,
"ip": [
{
"ip-addr":ip_addr
}
],
"operational-mode":"monitor",
"port": {
"zone-service-list": [
{
"port-num":port_num,
"protocol":port_protocol,
"level-list": [
{
"level-num":"0",
"zone-escalation-score":1,
"indicator-list": [
{
"type":"pkt-rate",
"score":50,
"zone-threshold-num":1,
}
],
},
{
"level-num":"1",
}
],
}
],
},
}
]
}
return ddos_dst_zone_payload

@ -0,0 +1,3 @@
logoff_path = '/axapi/v3/logoff'

@ -0,0 +1 @@
write_mem_path = '/axapi/v3/write/memory'