Archive | August, 2010

Use IPTables to ban repeated ssh attempts

My logs were getting filled with scripts trying to log in via ssh. I already have “PasswordAuthentication no” so I believe I am safe. I wanted to add a new layer (and keep my logs cleaner). I added the following to my iptables config. Anyone with more than 4 connections in 60 seconds is banned:

. . . 
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j SSHAUTOBAN
. . . 
-A SSHAUTOBAN -m recent --set --name SSH
-A SSHAUTOBAN -m recent --rcheck --hitcount 4 --name SSH -j LOG
-A SSHAUTOBAN -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -j DROP
-A SSHAUTOBAN -m recent --rcheck --name SSH -j ACCEPT

My CEWP JQuery code to play flash files in a Modal

I have Flash files in a Document Library. I wanted to have users click the flash files (swf) and have them open up in a hidden div, rather than opening in a different window. I added the code below to a CEWP:

<script type="text/javascript" src=""></script>
$(document).ready(function() {
$("#popupclose").click(function () {
	return false;
	this.onclick = function(){
	var filetoopen = $(this).attr("href");
	return false;
<style type="text/css">
 top: 10px; 
 left: 10px;
 border:2px solid #cecece;  
<div id="popup">  
  <a id="popupclose" href="javascript:void()">close</a>
  <div class="media" style="vertical-align:top;"></div>

Powered by WordPress. Designed by WooThemes