May 21

Open-WRT and TP-Link Wi-Fi issues

It appears that many TP-Link models have an issue with Ambient Noise Immunity (ANI)

Add to /etc/rc.local the following line

echo 0 > /sys/kernel/debug/ieee80211/phy0/ath9k/ani

There is a lot of discussion on the matter

February 22

Grep a log file and send output to mail

This is a small script that looks for a string in a log file and then the string is found, sents by mail the output

-This example is for Smoothwall, in which i run Guardian Active response and i wanted to know who is blocked

-Place it in your rc.local, reboot and check your mailbox




EMAILSUBJECT="Guardian On Firewall "

##Select you log file
#tail -f /var/log/messages | while read LINE
tail -f /var/log/guardian/guardian.log | while read LINE
#Select the string
if [ `echo $LINE | grep -c "blocked"` -gt 0 ]
# if [ `echo $LINE | grep -c "eth"` -gt 0 ]

echo "Guardian actions:" > $MESSAGEBODY
#Insert some text before the output
# echo "Guardian done it again !" >> $MESSAGEBODY
#Here i use sendEmail from Smoothwall, you can use you own sendmail/mail commands
sendEmail -f -u "$EMAILSUBJECT" -t -s -xu -xp password < $MESSAGEBODY
# fi

February 20

Fail2Ban and Zimbra

After following several guides i faced an issue with the mail reporting.

Since sendmail provided by zimbra doesn’t work with the same parameters like the default sendmail i modified the mail function of Fail2Ban.

– I have enabled only notifications for Webmail/Webadmin login attemps

For Red Hat /CentOS you will need EPEL Repo

rpm -Uvh 

Continue reading

January 26

TP-Link WR1043ND v2 VLAN/ Switch Config on Open WRT

After a lot of research and some help from  here i configured and split the hardware switch

Extra notes:

Note 1: I not 100% sure, but if you change the WAN from VLAN 2 things are not working…
Note 2: The eth1.X should match the VLAN ID ( i didn’t know that, so it might help someone smile )
Note 3: Running BARRIER BREAKER (Bleeding Edge, r39319)
Note 4: If you keep the reset button (WPS/Reset) for more that 15″ the device resets to defaults (IP, telnet enabled )
Continue reading