Setting up a honeypot with fail2ban, lxc and kippo

Prerequisites:

Setup

In my configuration 10.0.0.4 is my lxc container that's running kippo. I ulimit and memlimit it so it doesn't get out of hands.

Lxc honeypot machine

cat << EOF > /etc/rc.local
#!/bin/sh -e
su -c /home/kippo/kippo.sh kippo #assuming the username is 'kippo'
exit 0
EOF
cat << EOF > /home/kippo/start/sh
#!/bin/sh
cd ~/kippo-0.5 && ./start.sh
EOF
chmod +x /home/kippo/kippo.sh
cat << EOF > /etc/rinetd.conf
# bindadress    bindport  connectaddress  connectport
0.0.0.0 22 0.0.00 2222
# logging information
logfile /var/log/rinetd.log
EOF

Should be done