Publicado en English

how to remote syslog using openwrt

If you need to keep an eye and history about what is going on on your router enable remote login with this command:

echo «option ‘log_ip’ ‘192.168.1.2’»>> /etc/config/system

Change 192.168.1.2 to your server. Then on your server (linux debian as example) check /etc/default/rsyslog and add «-r» to the default options. you would start getting messages on your system.
Maybe you need to comment it out on this file /etc/rsyslog.conf those options:
# $ModLoad imudp
# $UDPServerRun 514

Publicado en English

How to keep P2P users out of your network with openwrt

Say that you have a open wireless network connection and you have some users that use P2P programs to download stuff. The main problem with P2P programs is the number o connections that try to open on the ADSL router so the NAT table gets full pretty quickly.

#!/bin/sh
# Ban. Add mac to the forward table if the number of connecions get 100

for ip in $(grep "br-lan" /proc/net/arp | awk '{print $1}'); do

cont=$(grep -c "$ip" /proc/net/ip_conntrack);
mac=$(grep "$ip" /proc/net/arp| awk '{print $4}');

if [ "$cont" -gt "100" ] ;then
echo iptables -A forwarding_rule -m mac --mac-source $mac -j DROP;
fi
logger "$ip $mac $cont";
done

so create a entry on /etc/crontabs/root

# run this script every hour
0,10,20,30,40,50 * * * * /etc/ban > /dev/null
0 * * * * /etc/unban > /dev/null
ban

Publicado en English

How to clean up a guest user under windows xp

Using the shtasks utility create a task to run a clean script.

schtasks /create /tn limpieza /tr c:\limpieza.bat /sc onstart /ru System

Here is the limpieza.bat script:

RD /S /Q  «C:\Documents And Settings\Invitado»

If  you want an user to autologon check this info: http://support.microsoft.com/kb/315231

 

 

http://superuser.com/questions/340396/how-do-i-change-automatic-logon-via-script-or-command-line

 

 

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d Invitado /f
Publicado en English

using j.mp

I think that j.mp make a bit shorter my urls, so to probe that it works there is a entry on the blog. I use this with twitter tools, It you want to try just login on bit.ly and check on settings.