Skip to content

Instantly share code, notes, and snippets.

View rpfilomeno's full-sized avatar
💭
For Hire

Roger Filomeno rpfilomeno

💭
For Hire
View GitHub Profile
@rpfilomeno
rpfilomeno / Monitor Asterisk server
Created February 27, 2015 13:45
Server Monitoring
#watch -n 10 'asterisk -rx "sip show channels" | tail -n 1'
# netstat -pln | grep rtpp
@rpfilomeno
rpfilomeno / A guide to SIPp testing Kamailio
Last active October 11, 2023 05:02
Testing Kamailio with 2 Asterisk load balanced with SIPp
SIPp Box
1. Download and Modify SIPp to auto respond always and include OPTIONS packet as well (-aa broken?), edit src/call.cpp:
call::T_AutoMode call::checkAutomaticResponseMode(char * P_recv)
{
if (strcmp(P_recv, "BYE")==0) {
return E_AM_UNEXP_BYE;
} else if (strcmp(P_recv, "CANCEL") == 0) {
return E_AM_UNEXP_CANCEL;
} else if (strcmp(P_recv, "PING") == 0) {
@rpfilomeno
rpfilomeno / Polycom LDAP
Created February 11, 2015 11:05
Polycom Phones
# directory.cfg
<dir
dir.corp.address="ldap://domaincontroller"
dir.corp.attribute.1.filter=""
dir.corp.attribute.1.label="Last Name"
dir.corp.attribute.1.name="sn"
dir.corp.attribute.1.sticky="0"
dir.corp.attribute.1.type="last_name"
dir.corp.attribute.2.filter=""
@rpfilomeno
rpfilomeno / Quintum Basic Command Line
Last active May 28, 2021 22:19
Quintum Gateway Tricks
Run the command “show –l” (This displays the system configuration).
Run the command “show –v” (This displays the product version).
Run the command “ev dump” (this will display the logs).
Run the command “lastcall” (Obtains the last call information).
Run the command “cmd calllog” (obtains a list of all calls in/out of the gateway).
@rpfilomeno
rpfilomeno / Find Large Files
Last active August 29, 2015 14:14
Linux Shell Tricks
Find files more than 50MB
# cd /
# find . -type f -size +50M -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -k1
A good way to defend against brute force attacks is to allow a certain number of login attempts, say three, and after that start delaying or blocking further attempts. Let's see how we can use ModSecurity to accomplish this.
If your login verification page is situated at yoursite.com/login, then the following rules will keep track of the number of login attempts by users:
#
# Block further login attempts after 3 failed attempts
#
<LocationMatch ^/login>
# Initalize IP collection with user's IP address
SecAction "initcol:ip=%{REMOTE_ADDR},pass,nolog"
@rpfilomeno
rpfilomeno / Install Java on Centos
Last active August 29, 2015 14:11
Java Tricks
# cd /opt/
Check if you are using 32-bit or 64-bit
x86_64 ==> 64-bit kernel
i686 ==> 32-bit kernel
#uname -m
32-bit:
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-i586.tar.gz"
@rpfilomeno
rpfilomeno / Huawei eSpace 7950
Last active August 29, 2015 14:11
Huawei VOIP Phone Provisioning
Administration Guide
http://www.huawei.com.cn/enterprise/docinforeader.action?contentId=DOC1000046231&partNo=100112
Configuration File Parameter Decription
http://support.huawei.com/enterprise/docinforeader.action?contentId=DOC1000054623&idPath=7881490|7881504|9864617|19885131|8327343
@rpfilomeno
rpfilomeno / Excel Tricks
Created December 17, 2014 11:15
MS Office Tricks
Check if value is in column range
=IF(ISNA(VLOOKUP(<single column I value>,<entire column E range>,1,FALSE)),FALSE, TRUE)
@rpfilomeno
rpfilomeno / 3D Models
Last active August 29, 2015 14:11
Hobby Crafts
http://cp.c-ij.com/en/contents/3156/03373/index.html
http://www.craftsy.com/project/paper-crafts?page=1
http://global.yamaha-motor.com/yamahastyle/entertainment/papercraft/animal-japan/fukuro/