You are here

Blogs

Ivan Radovanovic's picture

How to prevent annoying crackers from brute force login attacks

Add following to your /etc/pf.conf

# if re0 is your card
$ext_if="re0"
# this goes in the top
table <bad_guys> persist
...
block in quick on $ext_if from <bad_guys> to any

Add following to your /etc/syslog.conf

auth.info;authpriv.info |/root/auth_checker.pl

(assuming that auth_checker.pl is in /root directory)

Ivan Radovanovic's picture

How to gracefully restart lighttpd

Gracefully here meaning without loosing any request which is in processing (request which are not accepted yet might still be rejected)

Send SIGINT to lighttpd and then start new instance of it - the one received INT will stop listening for new connections but it will finish all connections it already accepted and exit after it
killall -INT lighttpd && lighttpd -f config_file

Ivan Radovanovic's picture

RabbitMQ start with FreeBSD

1. Install erlang from ports
2. grab latest binary tar.gz package from their website download session (file name should be something like rabbitmq-server-generic-unix-X.Y.Z.tar.gz) - unpack it somewhere
3. start server from the directory where you unpack it sbin/rabbitmq-server
4. when you need to stop it run sbin/rabbitmqctl stop

Ivan Radovanovic's picture

.htaccess based authentication with apache

Put this in .htaccess file

AuthUserFile path_goes_here
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require valid-user

File with usernames and passwords can be generated with htpasswd path username utility from command line, or use the following line to display hashed pairs in console htpasswd -n username

Pages

Subscribe to RSS - blogs