Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F117520207
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/data/templates/ids/fastnetmon.j2 b/data/templates/ids/fastnetmon.j2
index c482002fa..e095b0786 100644
--- a/data/templates/ids/fastnetmon.j2
+++ b/data/templates/ids/fastnetmon.j2
@@ -1,56 +1,58 @@
# enable this option if you want to send logs to local syslog facility
logging:local_syslog_logging = on
# list of all your networks in CIDR format
networks_list_path = /etc/networks_list
# list networks in CIDR format which will be not monitored for attacks
white_list_path = /etc/networks_whitelist
# Enable/Disable any actions in case of attack
enable_ban = on
## How many packets will be collected from attack traffic
ban_details_records_count = 500
## How long (in seconds) we should keep an IP in blocked state
## If you set 0 here it completely disables unban capability
-ban_time = 1900
+{% if ban_time is vyos_defined %}
+ban_time = {{ ban_time }}
+{% endif %}
# Check if the attack is still active, before triggering an unban callback with this option
# If the attack is still active, check each run of the unban watchdog
unban_only_if_attack_finished = on
# enable per subnet speed meters
# For each subnet, list track speed in bps and pps for both directions
enable_subnet_counters = off
{% if mode.mirror is vyos_defined %}
mirror_afpacket = on
{% endif %}
process_incoming_traffic = {{ 'on' if direction is vyos_defined and 'in' in direction else 'off' }}
process_outgoing_traffic = {{ 'on' if direction is vyos_defined and 'out' in direction else 'off' }}
{% if threshold is vyos_defined %}
{% for thr, thr_value in threshold.items() %}
{% if thr is vyos_defined('fps') %}
ban_for_flows = on
threshold_flows = {{ thr_value }}
{% elif thr is vyos_defined('mbps') %}
ban_for_bandwidth = on
threshold_mbps = {{ thr_value }}
{% elif thr is vyos_defined('pps') %}
ban_for_pps = on
threshold_pps = {{ thr_value }}
{% endif %}
{% endfor %}
{% endif %}
{% if listen_interface is vyos_defined %}
interfaces = {{ listen_interface | join(',') }}
{% endif %}
{% if alert_script is vyos_defined %}
notify_script_path = {{ alert_script }}
{% endif %}
diff --git a/interface-definitions/service-ids-ddos-protection.xml.in b/interface-definitions/service-ids-ddos-protection.xml.in
index 5e65d3106..135fa2ffa 100644
--- a/interface-definitions/service-ids-ddos-protection.xml.in
+++ b/interface-definitions/service-ids-ddos-protection.xml.in
@@ -1,118 +1,131 @@
<?xml version="1.0"?>
<interfaceDefinition>
<node name="service">
<children>
<node name="ids">
<properties>
<help>Intrusion Detection System</help>
</properties>
<children>
<node name="ddos-protection" owner="${vyos_conf_scripts_dir}/service_ids_fastnetmon.py">
<properties>
<help>FastNetMon detection and protection parameters</help>
<priority>731</priority>
</properties>
<children>
<leafNode name="alert-script">
<properties>
<help>Path to fastnetmon alert script</help>
</properties>
</leafNode>
+ <leafNode name="ban-time">
+ <properties>
+ <help>Time to ban (in seconds) an ip</help>
+ <valueHelp>
+ <format>u32:0-4294967294</format>
+ <description>Time to ban (in seconds) an ip</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967294"/>
+ </constraint>
+ </properties>
+ <defaultValue>1900</defaultValue>
+ </leafNode>
<leafNode name="direction">
<properties>
<help>Direction for processing traffic</help>
<completionHelp>
<list>in out</list>
</completionHelp>
<constraint>
<regex>(in|out)</regex>
</constraint>
<multi/>
</properties>
</leafNode>
<leafNode name="listen-interface">
<properties>
<help>Listen interface for mirroring traffic</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces.py</script>
</completionHelp>
<multi/>
</properties>
</leafNode>
<node name="mode">
<properties>
<help>Traffic capture modes</help>
</properties>
<children>
<!-- Future modes "mirror" "netflow" "combine (both)" -->
<leafNode name="mirror">
<properties>
<help>Listen mirrored traffic mode</help>
<valueless/>
</properties>
</leafNode>
</children>
</node>
<leafNode name="network">
<properties>
<help>Define monitoring networks</help>
<valueHelp>
<format>ipv4net</format>
<description>Processed network</description>
</valueHelp>
<constraint>
<validator name="ipv4-prefix"/>
</constraint>
<multi/>
</properties>
</leafNode>
<node name="threshold">
<properties>
<help>Attack limits thresholds</help>
</properties>
<children>
<leafNode name="fps">
<properties>
<help>Flows per second</help>
<valueHelp>
<format>u32:0-4294967294</format>
<description>Flows per second</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-4294967294"/>
</constraint>
</properties>
</leafNode>
<leafNode name="mbps">
<properties>
<help>Megabits per second</help>
<valueHelp>
<format>u32:0-4294967294</format>
<description>Megabits per second</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-4294967294"/>
</constraint>
</properties>
</leafNode>
<leafNode name="pps">
<properties>
<help>Packets per second</help>
<valueHelp>
<format>u32:0-4294967294</format>
<description>Packets per second</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-4294967294"/>
</constraint>
</properties>
</leafNode>
</children>
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</interfaceDefinition>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Sep 26, 9:19 AM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4284784
Default Alt Text
(7 KB)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment