This file contains 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
# Note : Found somewhere on internet... Source lost | |
backend ldap_balancer | |
mode tcp | |
balance roundrobin | |
server SERVER_NAME SERVER_ADDR:389 maxconn 100 check | |
option tcpka | |
timeout server 2s | |
timeout connect 1s | |
# Below, ldap check procedure : | |
option tcp-check |
This file contains 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 | |
// pfSense PHP script to generate a range of DNS forwarder hosts based on | |
// "dot${lastoctet}", eg. 192.0.2.100 == dot100.example.com | |
// Open terminal, run "php" copy/paste script with the following defines tweaked | |
// Ctrl-D, wait a moment until you see "Content-type: text/html" | |
// Open the DNS config in the web UI and click Apply Changes | |
define('DOT_DOMAIN', 'example.com'); | |
define('DOT_SUBNET', '192.0.2.'); // Leave off the final octet, include the dot | |
define('DOT_RANGE_START', 100); |
This file contains 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
gpg --keyserver pgp.mit.edu --recv-keys <LA_CLE> | |
gpg --armor --export <LA_CLE> | apt-key add - |
This file contains 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
$ blkid /dev/sdg1 | |
/dev/sdg1: LABEL="IPBXRECORDS" UUID="C4CD-C4FA" TYPE="exfat | |
$ ls /dev/disk/by-uuid -l | |
total 0 | |
lrwxrwxrwx 1 root root 10 Jun 25 13:10 2d2fdee8-1307-4df4-b3d9-7e69c4e05bfc -> ../../sde1 | |
lrwxrwxrwx 1 root root 10 Sep 21 05:18 2e21785b-b370-4e13-8449-6a5729ae3387 -> ../../dm-2 | |
lrwxrwxrwx 1 root root 10 Jun 25 13:10 3655492c-fe05-4e5d-bd41-f9b85c86e884 -> ../../sdd1 | |
lrwxrwxrwx 1 root root 10 Jun 25 13:11 36e9fd6f-bec6-4957-888c-c2d24b64f084 -> ../../sda1 | |
lrwxrwxrwx 1 root root 10 Jun 25 13:10 5122218b-1688-4412-b6c5-e72e79c68180 -> ../../sdc1 |
This file contains 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
Disable ping reply Temporarily | |
You can temporarily disable the ping reply using the following method. | |
# echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all | |
Please note that this setting will be erased after the reboot. To disable ping reply permanently (even after the reboot), follow the step mentioned below. | |
Also, to enable the ping reply back, set the value to “0” as shown below. | |
# echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all |
This file contains 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
service pve-cluster restart && service pvedaemon restart && service pvestatd restart && service pveproxy restart |
This file contains 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 | |
curl -A "http://bgp.he.net/search?search%5Bsearch%5D=spotify&commit=Search" -o /tmp/ips.raw "http://bgp.he.net/search?search%5Bsearch%5D=spotify&commit=Search" | |
grep -aoEw -e "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?/[0-9]{2})" -e "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" /tmp/ips.raw | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | uniq |
This file contains 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
http://jonathanmanning.com/2009/10/29/monitoring-agents-in-asterisk-with-chanspy/ | |
Example 3: This example will give the ability to dial directly into an agents phone to listen to them. | |
[internal] ;Chanspy Direct SIP Extension | |
exten => _88XXXX,1,Chanspy(SIP/${EXTEN:2}|b) | |
Here you can dial directly into any agents 4 digit phone extension and listen to them, for example if you wanted to listen to sip extension 5400 then dial 88+5400. That would dial directly into monitoring phone extension number 5400. If your phones only have 3 digits remove one of the “X”‘s from the exten line. |
This file contains 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 | |
$from = $_GET[from]; | |
$to = $_GET[to]; | |
$fromext = $_GET[fromext]; | |
$socket = fsockopen("localhost","5038", $errno, $errstr, $timeout); | |
fputs($socket, "Action: Login\r\n"); | |
fputs($socket, "UserName: USERNAME\r\n"); |
This file contains 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 | |
$from = $_GET[from]; | |
$to = $_GET[to]; | |
$socket = fsockopen("localhost","5038", $errno, $errstr, $timeout); | |
fputs($socket, "Action: Login\r\n"); | |
fputs($socket, "UserName: USERNAME\r\n"); | |
fputs($socket, "Secret: PASSWORD\r\n\r\n"); | |
$wrets=fgets($socket,128); |
OlderNewer