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 / April-Tracker-List
Created April 30, 2015 16:09
P2P Tracker List
udp://open.demonii.com:1337
udp://tracker.coppersurfer.tk:6969
udp://tracker.leechers-paradise.org:6969
udp://exodus.desync.com:6969
http://tracker.yify-torrents.com/announce
@rpfilomeno
rpfilomeno / Find Optimal Load Average
Created March 12, 2015 15:31
Linux Performance Testing
# less /proc/cpuinfo | grep "physical id" | sort|uniq | wc -l
2
# less /proc/cpuinfo | grep "core id" | sort|uniq | wc -l
1
Optimal load average (100% utilization) = 2.0
(The "Red line" load average = 5.0 per processor)
# ~/.tmux.conf
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 30000
@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"