Skip to content

Instantly share code, notes, and snippets.

@logicall
logicall / iptables_geoip_debian.md
Created August 1, 2022 18:51 — forked from netrunn3r/iptables_geoip_debian.md
Install geoip for iptables in Debian 10
  1. change from buster to bullseye
  2. sudo apt install libnet-cidr-lite-perl libtext-csv-xs-perl libgeoip2-perl

for day of writing, there is a problem with building by dkms this package xtables-addons-common so wehave to install this from source

  1. sudo apt install pkg-config libxtables-dev
  2. wget http://inai.de/files/xtables-addons/xtables-addons-3.13.tar.xz
  3. tar xf xtables-addons-3.13.tar.xz
  4. cd xtables-addons-3.13/
  5. ./configure
  6. make
@logicall
logicall / cdr_fijo_mongodb.js
Created April 4, 2012 13:07 — forked from xenomuta/cdr_fijo_mongodb.js
Asterisk CDR with NodeJS and MongoDB
/*
cdr_fifo_mongodb: A quick and dirty hack that consists of configuring asterisk’s
cdr_custom.conf to write to a named pipe, which will be then read by node and
then written into mongodb.
good alternative to cdr_mongodb, 'cause I couldn't make it work stable for 1.8
*/
var config = {
"dburl": "asterisk", /* user:pass@host/db */
"collections": ["cdr"],
"fifo": "/var/log/asterisk/cdr-custom/cdr_fifo.csv",