How to push a public IP on your laptop using SSH bridged tunnel

Posted on Sun 04 March 2012 in Systems • Tagged with routing, ssh, vpnLeave a comment

In my previous post I talked about Layer 3 VPN feature of OpenSSH (starting from version 4.3).
Now, I'm talking about bridged VPN or Layer 2 VPN. With this feature you can create a virtual network device that, through the encrypted tunnel, is connected on the same network ...

Continue reading

Asterisk and SIP session refresh with UPDATE request

Posted on Wed 15 February 2012 in VoIP • Tagged with asterisk, bug, sip, VoIPLeave a comment

Using directmedia=update or (canreinvite=update in old-sytle configuration) in chan_sip.conf Asterisk sends SIP UPDATE request to refresh SIP session.

If this UPDATE requests refers to an inactive call the phone reply with SIP/2.0 481 Call Leg/Transaction Does Not Exist.

In this situation Asterisk continue in ...

Continue reading

How to split DNS name resolution in VPN environment

Posted on Wed 30 November 2011 in Systems • Tagged with dns, openvpn, powerdns, scripting, vpnLeave a comment

I'm in this situation:
a VPN to remote concentrator that load many routes to private networks, vpn server push DNS configuration via OpenVPN protocol (see --dhcp-option DNS in openvpn(8) ).
The scope of this post is to explain how you can use remote DNS pushed by VPN concentrator only ...

Continue reading

Simple CMS using web.py and Markdown

Posted on Fri 18 November 2011 in Python • Tagged with python, web.py, webapplicationsLeave a comment

With a bit of code you can build a simple but powerful, single page, CMS using python, web.py and content stored in markdown files.

1) the application: application.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20 ...
Continue reading

Php sinippet: howto ignore HTTP errors in file_get_contents()

Posted on Fri 04 November 2011 in PHP • Tagged with code, http, phpLeave a comment

A useful snipped of php code:

echo file_get_contents('http://www.example.com/foo.html',\
  FALSE, stream_context_create(array\
  ('http'=>;array('ignore_errors' =>; TRUE))))
Continue reading

Client side result pagination in python-ldap

Posted on Tue 25 October 2011 in Python • Tagged with code, ldap, python, python-ldapLeave a comment

Sometime I must fighting with monkeys-configured LDAP servers.
This time DIT does not support RFC2696 (Paged Results for LDAP query), the data tree contains over 90000 entries.
Thanks to ldap.resiter is possible to implement client side pagination in ldap scripts.
These simple lines of code explain how to:

import ...
Continue reading

Howto configure multiple mac address over a single ethernet interface

Posted on Tue 04 October 2011 in Systems • Tagged with iptables, linux, networking, routingLeave a comment

I up against this problem on a server hosted by Hetzner.My server is a virtual hypervisor containing several virtual machines.The Hetzner's politics is to statically associate a public IP to a single mac address, is therefore impossible to have multiple IP address on a single ethernet device ...

Continue reading

cisco IOS: Monitorare una vpn

Posted on Tue 23 August 2011 in Systems • Tagged with cisco, ios, monitoring, vpnLeave a comment

Avere a che fare con delle connettività scadenti è sempre un disastro.

Uno strumento per tenere monitorata una VPN e reagire in caso di down puo' essere comodo.

Esempio:
In questo esempio ho una VPN tra la rete A (192.168.2.0/24) e la rete B (192.168 ...

Continue reading

Bacula 5.0.3 debian squeeze backport

Posted on Mon 25 July 2011 in Systems • Tagged with bacula, debianLeave a comment

Packages available here: http://www.bertera.it/software/bacula/bacula-backports/

Continue reading

Poor man vmware consolidate backup

Posted on Mon 25 July 2011 in Systems • Tagged with backup, bacula, script, vmwareLeave a comment

  • Update: for an english version of this post you can read the README of pmvcb at github
    For bacula integration of pvmcb you can see the instruction on bacula wiki

VMware offre un pacchetto di backup per le macchine virtuali: VCB

VCB

Il VCB non fa altro che:

  • eseguire uno snapshot ...
Continue reading