Content :
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # MikroTik RouterOS Script: Monitor Queue Average Rate | |
| # Author: Łukasz Kopiszka | |
| # Description: Monitors queue usage in /queue tree and logs warning if average rate exceeds a specified threshold. | |
| # Units converted to Mb/s for readability. | |
| # Usage: Add the script to RouterOS, and optionally schedule it for periodic execution. | |
| # Example: | |
| # /system scheduler add name=monitor-queue-avg-rate interval=1m on-event=monitor-queue-avg-rate | |
| :local threshold 60 | |
| :foreach qId in=[/queue tree find] do={ | |
| :local qName [/queue tree get $qId name] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| dhcpv6 duid 00010001b6eb2b6c28a6dbeb0029 | |
| radius-server group isp | |
| radius-server shared-key-cipher %^%#EGiA1wr#mTZwG!ZJAI`Tpk<jJ[%S+YAas!R_O-B=%^%# | |
| radius-server authentication ip_radius_A 1812 weight 100 | |
| radius-server authentication ip_radius_B 1812 weight 0 | |
| radius-server accounting ip_radius_B 1813 weight 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name example.com; | |
| location / { | |
| return 301 https://$server_name$request_uri; | |
| } | |
| location /.well-known/acme-challenge/ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script generates a DKIM key pair using Rspamd's dkim_keygen tool | |
| # and follows best practices for key generation. | |
| # Set the domain for which the DKIM key is being generated | |
| domain="example-domain.com" | |
| # Generate a random selector of 10 characters using /dev/urandom | |
| selector=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -v '^[[:space:]]*#' file.conf | grep -v '^[[:space:]]*$' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Detecting and Mitigating DDOS Attacks | |
| #List all Finish (FIN) packets | |
| machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 1 != 0' | |
| #List all SYN and SYN-ACK packets | |
| machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 2 != 0' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| echo "DDos Detect by masusniper#0666"; | |
| interface=$(ip -o -4 route show to default | awk '{print $5}') | |
| dumpdir=/root/dumps | |
| echo -e "Using interface ${interface}" | |
| mkdir $dumpdir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| history | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //@version=4 | |
| study(title="CTO Line", shorttitle="CTO", overlay=true, resolution="") | |
| smma(src, length) => | |
| smma = 0.0 | |
| smma := na(smma[1]) ? sma(src, length) : (smma[1] * (length - 1) + src) / length | |
| smma | |
| v1 = smma(hl2, 15) | |
| m1 = smma(hl2, 19) | |
| m2 = smma(hl2, 25) | |
| v2 = smma(hl2, 29) |
NewerOlder