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
| -A INPUT -i eth0 -p udp -m udp --dport 5060 -j SIP | |
| # | |
| -A SIP -i eth0 -p udp -m udp --dport 5060 -m string --string "INVITE" --algo bm --from 23 --to 28 -m comment --comment "Catch SIP INVITEs" -j SIPINVITE | |
| -A SIP -i eth0 -p udp -m udp --dport 5060 -m string --string "REGISTER" --algo bm --from 23 --to 30 -m comment --comment "Catch SIP REGISTERs" -j SIPREGISTER | |
| -A SIP -m comment --comment "Catch and accept everything else" -j ACCEPT | |
| # | |
| -A SIPINVITE -m hashlimit --hashlimit-upto 4/min --hashlimit-burst 4 --hashlimit-mode srcip,dstip,dstport --hashlimit-name anon-sip-rateinv --hashlimit-srcmask 24 -m comment --comment "Rate limit SIP invites" -j ACCEPT | |
| -A SIPINVITE -m limit --limit 10/min -j LOG --log-prefix "SIPINV DROP: " | |
| -A SIPINVITE -m comment --comment "Rate limit exceeded, reject" -j REJECT | |
| # |
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 | |
| # sanjay@astiostech.com | |
| # https://highsecurity.blogspot.com/2013/09/asteriskfreepbx-post-voicemail-trigger.html | |
| # invokes sending to webserver socket when there's a change in voicemail events for user | |
| # v.1.0 | |
| # prequalify if this is a reload or not, if reload, we don't do anything | |
| server=10.10.10.1:6050 | |
| fullstring="$1 $2 $3 $4 $5" | |
| isreload=`echo "$fullstring" | grep -c "@"` |
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
| --- /etc/inc/services.inc 2022-01-31 14:53:42.000000000 -0500 | |
| +++ /etc/inc/services.inc.custom 2022-05-20 17:35:17.809154000 -0400 | |
| @@ -593,8 +593,9 @@ | |
| option domain-search-list code 119 = text; | |
| option arch code 93 = unsigned integer 16; # RFC4578 | |
| {$custoptions} | |
| -default-lease-time 7200; | |
| -max-lease-time 86400; | |
| +option ntp-servers 216.201.8.80,209.143.0.10,66.209.140.124; | |
| +default-lease-time 2592000; |
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
| /** | |
| * Once this scipt is executed it will connect to the local port you have assigned to | |
| * Asterisk (default: 5038) and send an authentication request. If successfull, it will | |
| * send a second request to originate your call. | |
| * | |
| * The internal SIP line $internalPhoneline will be dialed, and when picked up the | |
| * $target phone will be dialed using your outbound calls context ($context). | |
| * | |
| * Of course, you can modify the commands sent to the asterisk manager interface to suit your needs. | |
| * you can find more about the available options at: |
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
| <?php | |
| function require_auth() { | |
| $AUTH_USER = 'admin'; | |
| $AUTH_PASS = 'admin'; | |
| header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
| $has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
| $is_not_authenticated = ( | |
| !$has_supplied_credentials || | |
| $_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
| $_SERVER['PHP_AUTH_PW'] != $AUTH_PASS |
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
| #!/usr/bin/env bash | |
| ############################################################ | |
| # MIGRATED TO REPOSITORY | |
| # https://github.com/tavinus/cloudsend.sh | |
| # | |
| # This gist will NOT be updated anymore | |
| ############################################################ | |
| ############################################################ |
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/sh | |
| # | |
| # Author: Luis Felipe Domínguez Vega <ldominguezvega@gmail.com> | |
| # https://gist.github.com/lfdominguez/08de623d9f9c0fa84e6b4d5d0d25025c | |
| # Program to use with the rate software to send to InfluxDB the | |
| # rate of each IP on interface | |
| # | |
| # rate_to_influx <influxdb_url> <influxdb_database> <local_network> <interface> | |
| # rate_to_influx http://127.0.0.1:8086 network 192.168.0.0/24 re1 |
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
| pushgatewayip="192.168.1.2:9091" | |
| network="192.168.1.0/24" | |
| rate -i bce1 -r 1 -e -n -Ab -a 255 -c "${network}" -d | while read -r line; do | |
| host=`echo $line | cut -d':' -f1` | |
| downloadrate=`echo $line | cut -d':' -f4` | |
| uploadrate=`echo $line | cut -d':' -f5` | |
| if [ ! -z "$downloadrate" -a "$downloadrate" != " " ]; then | |
| echo "download_rate_bits $downloadrate" | curl --data-binary @- "${pushgatewayip}/metrics/job/pfsense/instance/${host}" |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>Starter Template</title> | |
| <meta name="description" 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
| #cloud-config | |
| # Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease). | |
| hostname: myhost | |
| # Authorize SSH keys for the `rancher` sudoer user | |
| ssh_authorized_keys: | |
| - ssh-rsa AAA...ZZZ example1@rancher | |