Browse code

modules: readme files regenerated - secfilter ... [skip ci]

Kamailio Dev authored on 12/03/2019 13:01:42
Showing 1 changed files
... ...
@@ -43,14 +43,21 @@ Jose Luis Verdeguer
43 43
 
44 44
               5.1. secfilter.reload
45 45
               5.2. secfilter.print
46
-              5.3. secfilter.add_dst
47
-              5.4. secfilter.add_bl
48
-              5.5. secfilter.add_wl
46
+              5.3. secfilter.stats
47
+              5.4. secfilter.stats_reset
48
+              5.5. secfilter.add_dst
49
+              5.6. secfilter.add_bl
50
+              5.7. secfilter.add_wl
49 51
 
50 52
         6. Installation
51 53
 
52 54
               6.1. Database setup
53 55
 
56
+        7. Some examples
57
+
58
+              7.1. Print data
59
+              7.2. Statistics
60
+
54 61
    List of Examples
55 62
 
56 63
    1.1. Set db_url parameter
... ...
@@ -70,10 +77,14 @@ Jose Luis Verdeguer
70 70
    1.15. secf_check_sqli_all usage
71 71
    1.16. secfilter.reload usage
72 72
    1.17. secfilter.print usage
73
-   1.18. secfilter.add_dst usage
74
-   1.19. secfilter.add_bl usage
75
-   1.20. secfilter.add_wl usage
76
-   1.21. Example database content - secfilter table
73
+   1.18. secfilter.stats usage
74
+   1.19. secfilter.stats_reset usage
75
+   1.20. secfilter.add_dst usage
76
+   1.21. secfilter.add_bl usage
77
+   1.22. secfilter.add_wl usage
78
+   1.23. Example database content - secfilter table
79
+   1.24. kamcmd secfilter.print ua
80
+   1.25. kamcmd secfilter.stats
77 81
 
78 82
 Chapter 1. Admin Guide
79 83
 
... ...
@@ -110,14 +121,21 @@ Chapter 1. Admin Guide
110 110
 
111 111
         5.1. secfilter.reload
112 112
         5.2. secfilter.print
113
-        5.3. secfilter.add_dst
114
-        5.4. secfilter.add_bl
115
-        5.5. secfilter.add_wl
113
+        5.3. secfilter.stats
114
+        5.4. secfilter.stats_reset
115
+        5.5. secfilter.add_dst
116
+        5.6. secfilter.add_bl
117
+        5.7. secfilter.add_wl
116 118
 
117 119
    6. Installation
118 120
 
119 121
         6.1. Database setup
120 122
 
123
+   7. Some examples
124
+
125
+        7.1. Print data
126
+        7.2. Statistics
127
+
121 128
 1. Overview
122 129
 
123 130
    This module has been designed to offer an additional layer of security
... ...
@@ -488,9 +506,11 @@ d in the user-agent header ($ua)");
488 488
 
489 489
    5.1. secfilter.reload
490 490
    5.2. secfilter.print
491
-   5.3. secfilter.add_dst
492
-   5.4. secfilter.add_bl
493
-   5.5. secfilter.add_wl
491
+   5.3. secfilter.stats
492
+   5.4. secfilter.stats_reset
493
+   5.5. secfilter.add_dst
494
+   5.6. secfilter.add_bl
495
+   5.7. secfilter.add_wl
494 496
 
495 497
 5.1.  secfilter.reload
496 498
 
... ...
@@ -524,7 +544,25 @@ d in the user-agent header ($ua)");
524 524
                 kamcmd secfilter.print dst
525 525
                 ...
526 526
 
527
-5.3.  secfilter.add_dst
527
+5.3.  secfilter.stats
528
+
529
+   Print statistics of blocked and allowed messages.
530
+
531
+   Example 1.18. secfilter.stats usage
532
+                ...
533
+                kamcmd secfilter.stats
534
+                ...
535
+
536
+5.4.  secfilter.stats_reset
537
+
538
+   Reset all statistics.
539
+
540
+   Example 1.19. secfilter.stats_reset usage
541
+                ...
542
+                kamcmd secfilter.stats_reset
543
+                ...
544
+
545
+5.5.  secfilter.add_dst
528 546
 
529 547
    Insert values into destination blacklist. These values will be checked
530 548
    with the function secf_check_dst to verify if the destination number
... ...
@@ -533,12 +571,12 @@ d in the user-agent header ($ua)");
533 533
    Parameters:
534 534
      * number (number to add to the destination blacklist)
535 535
 
536
-   Example 1.18. secfilter.add_dst usage
536
+   Example 1.20. secfilter.add_dst usage
537 537
                 ...
538 538
                 kamcmd secfilter.add_dst 555123123
539 539
                 ...
540 540
 
541
-5.4.  secfilter.add_bl
541
+5.6.  secfilter.add_bl
542 542
 
543 543
    Insert values into blacklist.
544 544
 
... ...
@@ -546,13 +584,13 @@ d in the user-agent header ($ua)");
546 546
      * type (must be: ua, country, domain, user or ip)
547 547
      * value (value to add to the blacklist)
548 548
 
549
-   Example 1.19. secfilter.add_bl usage
549
+   Example 1.21. secfilter.add_bl usage
550 550
                 ...
551 551
                 kamcmd secfilter.add_bl ua friendly-scanner
552 552
                 kamcmd secfilter.add_bl user sipvicious
553 553
                 ...
554 554
 
555
-5.5.  secfilter.add_wl
555
+5.7.  secfilter.add_wl
556 556
 
557 557
    Insert values into whitelist.
558 558
 
... ...
@@ -560,7 +598,7 @@ d in the user-agent header ($ua)");
560 560
      * type (must be: ua, country, domain, user or ip)
561 561
      * value (value to add to the whitelist)
562 562
 
563
-   Example 1.20. secfilter.add_wl usage
563
+   Example 1.22. secfilter.add_wl usage
564 564
                 ...
565 565
                 kamcmd secfilter.add_wl country es
566 566
                 kamcmd secfilter.add_wl user trusted_user
... ...
@@ -583,7 +621,7 @@ d in the user-agent header ($ua)");
583 583
    the complete database documentation on the project webpage,
584 584
    https://www.kamailio.org/docs/db-tables/kamailio-db-devel.html.
585 585
 
586
-   Example 1.21. Example database content - secfilter table
586
+   Example 1.23. Example database content - secfilter table
587 587
                 ...
588 588
                 +----+-----------+-----------+------------------+
589 589
                 | id | action    | type      | data             |
... ...
@@ -613,3 +651,79 @@ d in the user-agent header ($ua)");
613 613
      * 2 (domain)
614 614
      * 3 (IP address)
615 615
      * 4 (user)
616
+
617
+7. Some examples
618
+
619
+   7.1. Print data
620
+   7.2. Statistics
621
+
622
+7.1. Print data
623
+
624
+   Example 1.24. kamcmd secfilter.print ua
625
+                ...
626
+User-agent
627
+==========
628
+[+] Blacklisted
629
+    -----------
630
+    0001 -> friendly-scanner
631
+    0002 -> pplsip
632
+    0003 -> sipcli
633
+    0004 -> sundayddr
634
+    0005 -> iWar
635
+    0006 -> sipsak
636
+    0007 -> VaxSIPUserAgent
637
+    0008 -> SimpleSIP
638
+    0009 -> SIP Call
639
+    0010 -> Ozeki
640
+    0011 -> VoIPSec
641
+    0012 -> SIPScan
642
+    0013 -> Conaito
643
+    0014 -> UsaAirport
644
+    0015 -> PortSIP VoIP SDK
645
+    0016 -> zxcvfdf11
646
+    0017 -> fdgddfg546df4g8d5f
647
+
648
+[+] Whitelisted
649
+    -----------
650
+    0001 -> my custom ua
651
+                ...
652
+
653
+7.2. Statistics
654
+
655
+   Example 1.25. kamcmd secfilter.stats
656
+                ...
657
+Blocked messages (blacklist)
658
+============================
659
+[+] By user-agent    : 1256
660
+[+] By country       : 45
661
+[+] By from domain   : 0
662
+[+] By to domain     : 0
663
+[+] By contact domain: 1
664
+[+] By IP address    : 2552
665
+[+] By from name     : 0
666
+[+] By to name       : 0
667
+[+] By contact name  : 0
668
+[+] By from user     : 316
669
+[+] By to user       : 134
670
+[+] By contact user  : 0
671
+
672
+Allowed messages (whitelist)
673
+============================
674
+[+] By user-agent    : 0
675
+[+] By country       : 478
676
+[+] By from domain   : 0
677
+[+] By to domain     : 0
678
+[+] By contact domain: 0
679
+[+] By IP address    : 0
680
+[+] By from name     : 0
681
+[+] By to name       : 0
682
+[+] By contact name  : 0
683
+[+] By from user     : 0
684
+[+] By to user       : 0
685
+[+] By contact user  : 0
686
+
687
+Other blocked messages
688
+======================
689
+[+] Destinations   : 0
690
+[+] SQL injection  : 213
691
+                ...