terça-feira, 7 de outubro de 2008

The tao

The tao that can be tar(1)ed
is not the entire Tao.
The path that can be specified
is not the Full Path.

We declare the names
of all variables and functions.
Yet the Tao has no type specifier.

Dynamically binding, you realize the magic.
Statically binding, you see only the hierarchy.

Yet magic and hierarchy
arise from the same source,
and this source has a null pointer.

Reference the NULL within NULL,
it is the gateway to all wizardry.

quinta-feira, 6 de março de 2008

Proxy transparente com squid 3

Dica para quem quer instalar um proxy transparente com a versão 3.0 do squid.
Algumas coisas mudaram a partir da versão 2.6, portanto esqueça todos aqueles antigos tutoriais.

- Baixe o squid 3.0 (
www.squid-cache.org)
- Para minhas necessidades bastou o clássico:
# ./configure
# make
# make install
Se precisar complilar com outras opçõoes consulte o ./configure --help

- Após compilado é necessário editar o arquivo /usr/local/squid/etc/squid.conf
(Obs: A localização do arquivo pode ser diferente no seu sistema)
Acresecente as seguintes diretrizes:
http_port 3128 transparent vhost vport
always_direct allow all (**Antes de incluir esta diretriz eu estava sofrendo com o famigerado erro: Unable to forward this request at this time)

- Por último basta aplicar a regra com o iptables:

#iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

(Obs:
esta regra coloca toda a rede por trás do proxy de forma transparente. Se quer utilizar estações isoladas utilize a opção "-s" do iptables)


quinta-feira, 14 de fevereiro de 2008

iptables exemple

// Block ip
iptables -I INPUT -s
xxx.xxx.xxx.xxx -j DROP

// Blocked list
iptables -L INPUT -x --line-numbers

// Unblock ip
iptables -D INPUT -s xxx.xxx.xxx.xxx -j DROP


// Unblock ip (by rule number)
iptables -D INPUT 33

// Range block
iptables -I INPUT -s xxx.xxx.xxx.xxx/24 -j DROP

How to Enable Click to Minimize On Ubuntu

Open a terminal using Ctrl+Alt+T shortcut or searching for it in the menu. All you need is to copy paste the command below in the terminal: ...