Debian Codegraph @

src/juniper_plugin/README.md

raw
1 Juniper FastNetMon plug-in
2 ===========
3
4 Overview
5 --------
6 Connects to a Juniper router and adds or removes a blackhole rule for an attack by IP address.
7
8 The actions can be modified such as adding a firewall rule.
9
10 This script uses the Juniper NETCONF PHP API. More information about this can be found at the following URL:
11 * https://github.com/Juniper/netconf-php
12
13 Installation
14 ------------
15
16 #### Prerequisite
17 You must have a user and netconf enabled on your Juniper
18
19 to enable netconf go to your cli and type:
20 ```
21 user@host> configure
22 user@host# set netconf ssh
23 ```
24 if you wish to change netconf port instead of
25 ```
26 user@host# set netconf ssh
27 ```
28 use
29 ```
30 user@host# set netconf ssh port <number>
31 ```
32
33 Install php to your server:
34 ```
35 sudo apt-get install php-cli php
36 ```
37
38 #### Process
39 1. Configure the router in the ```fastnetmon_juniper.php``` file
40 ```
41 $cfg['hostname'] = "10.0.0.1"; // Juniper IP
42 $cfg['port'] = 880; //NETCONF Port
43 $cfg['username'] = "user"; //user
44 $cfg['password'] = "password"; //pass
45 ```
46 2. Change the ```notify_about_attack.sh``` with the new to run the PHP script
47
48 This is the first buggy version, you are welcome to add more features.
49
50 3. Set executable bit ```sudo chmod +x /etc/fastnetmon/scripts/notify_about_attack.sh```
51
52 Changelog
53 ---------
54 v1.0 - 5 Dec 18 - Initial version
55
56 Author: Christian David <[email protected]>
57
58 Based on Mikrotik Plugin by Maximiliano Dobladez <[email protected]>