Tweeter buttonFacebook buttonLinkedin button

Archive Page 3

Howto see IP firewall rules via terminal

If you want to see all rules of you firewall with PF using terminal you can do it with:

pfctl -s rules

We need to do it because the web manager of pfSense only shows the rules that you add by yourself, but there’s more roles created by default.

More info

IP address networks by country

Some times there’s too many attacks who come from other countries, specially China, USA or Russia and we don’t need that these countries access to our network(or fuck our Internet BW), so then we need block it (yes I know, the best rule for our firewall is block all by default and permit the services and networks, but we’re going to think that we need to permit all and block only some countries).

So, for make it, we need to know the IP address networks of each country who we want to block (or accept in the ideal scenario), and we can use these sites:
http://blogama.org/country_query.php?country=ISO 3166
http://www.ipdeny.com/ipblocks/data/countries

The codes (ISO 3166) of the country are available in http://www.blogama.org/country.txt

HOWTO ping a bluetooth device

If you want to know how’s the signal with your bluetooth device maybe you want to make a ping to it, like common ping used in IP networks.

So, for make it in bluetooth networks we have to use l2ping, for example:

# l2ping 00:11:C0:19:C9:C1
Ping: 00:11:C0:19:C9:C1 from 00:1A:6B:DC:F1:A1 (data size 44) ...
44 bytes from 00:11:C0:19:C9:C1 id 0 time 14.61ms
44 bytes from 00:11:C0:19:C9:C1 id 1 time 48.58ms

Motion, a software motion detector.

Motion is a program that monitors the video signal from one or more cameras and is able to detect if a significant part of the picture has changed. Or in other words, it can detect motion.

The program is written in C and is made for the Linux operating system.

Motion is a command line based tool. It has absolutely no graphical user interface. Everything is setup either via the command line or via a set of configuration files (simple ASCII files that can be edited by any ASCII editor).

The output from motion can be:

* jpg files
* ppm format files
* mpeg video sequences

Source:
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

Using Asterisk PBX to Control your Arduino

I was searching something about integration of Arduino with Asterisk PBX and I found this interesting article:

Using Asterisk to Control your Arduino

This article is how to control Arduino over Ethernet using Asterisk PBX, making a call and controlling over it comm channel.

So then, you can make a IVR and control your Arduino calling it wherever you are.



Source:
http://www.nerdybynature.com/index.php/2009/03/using-asterisk-to-controll-your-arduino

n2n: a Layer Two Peer-to-Peer VPN

n2n is a layer-two peer-to-peer virtual private network (VPN) which allows users to exploit features typical of P2P applications at network instead of application level. This means that users can gain native IP visibility (e.g. two PCs belonging to the same n2n network can ping each other) and be reachable with the same network IP address regardless of the network where they currently belong. In a nutshell, as OpenVPN moved SSL from application (e.g. used to implement the https protocol) to network protocol, n2n moves P2P from application to network level.

The main n2n design features are:

* An n2n is an encrypted layer two private network based on a P2P protocol.
* Encryption is performed on edge nodes using open protocols with user-defined encryption keys: you control your security without delegating it to companies as it happens with Skype or Hamachi.
* Each n2n user can simultaneously belong to multiple networks (a.k.a. communities).
* Ability to cross NAT and firewalls in the reverse traffic direction (i.e. from outside to inside) so that n2n nodes are reachable even if running on a private network. Firewalls no longer are an obstacle to direct communications at IP level.
* n2n networks are not meant to be self-contained, but it is possible to route traffic across n2n and non-n2n networks.

Source:
http://www.ntop.org/n2n/

PacketFence

PacketFence is a fully supported, Free and Open Source network access control (NAC) system. PacketFence is actively maintained and has been deployed in numerous large-scale institutions over the past years. It can be used to effectively secure networks – from small to very large heterogeneous networks. PacketFence has been deployed in production environments where thousands of users are involved. Among the different markets are :

* banks
* colleges and universities
* engineering companies
* manufacturing businesses
* school boards (K-12)

.. and many more!

Released under the GPL, PacketFence offers an impressive amount of features.

Source:
http://www.packetfence.org

Wicd: Alternative for NetworkManager

It is an alternative for a NetworkManager who some time makes me crazy when it doesn’t work as I like. And I have to kill it for work.

Wicd is an open source wired and wireless network manager for Linux which aims to provide a simple interface to connect to networks with a wide variety of settings.

Some of Wicd’s features include:

1. No Gnome dependencies (although it does require GTK), so it is easy to use in XFCE, Fluxbox, Openbox, Enlightenment, etc.
2. Ability to connect to wired (Ethernet only, no PPPoE/DSL support yet) and wireless networks
3. Profiles for each wireless network and wired network
4. Many encryption schemes, some of which include WEP/WPA/WPA2 (and you can add your own)
5. Remains compatible with wireless-tools
6. Tray icon showing network activity and signal strength
7. A full-featured console interface

There are instructions for installing Wicd on Ubuntu, Debian, Arch, Fedora, Slackware, and Gentoo on the downloads page, although it should work on any Linux distro.

Source:
http://wicd.sourceforge.net/

Fork alternative in PHP

This is an alternative of fork in PHP with exec() function:

exec("/bin/ping 192.168.0.1 -c 12 2>/dev/null >&- <&- >/dev/null &");

Sources:
http://joseph.randomnetworks.com/archives/2005/10/21/fake-fork-in-php/
http://immike.net/blog/2007/04/08/fork-php-and-speed-up-your-scripts/

Open1X – IEEE 802.1X open source implementation

Open1X is an open source implementation of the IEEE 802.1X protocol. This project includes support for the supplicant, while other projects (e.g., FreeRADIUS) provide support for the authentication server.

Source:
http://open1x.sourceforge.net

LiVES – Because the media should be open

LiVES is a Video Editing System. It is designed to be simple to use, yet powerful. It is small in size, yet it has many advanced features.

And the most important thing is … LiVES is a Free, Open Source video editor *and* a VJ tool.

Source:
http://lives.sourceforge.net/

Scribus – Open Source Desktop Publishing

Scribus is an Open Source program that brings award-winning professional page layout to Linux/UNIX, Mac OS X, OS/2 Warp 4/eComStation and Windows desktops with a combination of “press-ready” output and new approaches to page layout. Underneath the modern and user friendly interface, Scribus supports professional publishing features, such as CMYK color, separations, Spot Colors, ICC color management and versatile PDF creation.

Manual (Spanish) written by Antonio Cobo Cuevas, Profesor of informatics in I.E.S. Fuente de la Peña (jaen)

What’s shebang?

shebang/hashbang/haspling is…

#! <- The first two characters used in Unix-like in a script file, they're read by the program reader looking for the interpreter of this script, that is specified after the shebang. For example:

#! /bin/sh

4000 Km de cable submarino



Set UTF-8 encoding in VIM

Edit your .vimrc settings file to include the following line:

set enc=utf-8

And you should be able to edit a UTF-8 file in Windows using gvim.
For Linux, just set the locale to utf-8 such as:

export LANG=en_SG.UTF-8

Source: http://research.mosuma.com/faq/howto/vim-utf8


Slideshow

Get the Flash Player to see the slideshow.

 

July 2010
M T W T F S S
« May    
 1234
567891011
12131415161718
19202122232425
262728293031