Nov 13, 2011

Gamling.org was DDOSed

And this is my first experience with DDoS attacks.
It was funny how the server is blazingly fast after I enabled APF.

Therefore, of course, Gamling.org was nuked with DDoS.


What I did is that I use Advanced Policy-based Firewall (APF) and configure to allow only specified ports.


DEVEL_MODE="0"
IG_TCP_CPORTS="21,22,25,53,80,110,143,443,3306"
IG_UDP_CPORTS="53,111"
USE_AD="1"


And I have installed Brute Force Detection (BFD) and DDoS Deflate in order to detect who nukes Gamling.org.


And I also add RootKit Hunter to check and remove Spyware from the server. (I didn't know that Linux also has Spyware :S)

Nov 12, 2011

ActionMailer Testing with Rspec

In environment/test.rb


Flood::Application.configure do
config.action_mailer.delivery_method = :test
end


And in your Rspec case, after sending an email, you can validate it with ActionMailer::Base.deliveries, which is an array of emails sent.

For example:


ActionMailer::Base.deliveries.last.to.should =~ ["test@gmail.com"]

Nov 2, 2011

Gamling.org bottleneck

I have found that the bottleneck for Gamling.org is on Mongodb.

I think there is a problem with Passenger forking. I have to try its solution first.

Right now I'm figuring out how to optimize it.

Here is the CPU usage: