11.21
It was about time for me to upgrade my aging home Linux server and reinstall torrentflux-b4t with ipblock (among other things). I went back to my old post on what I did previously and found everything to be similar but slightly off. To do this reconfiguration and make ipblock work without the java user interface I had to tweak things a bit and compile another deb package. Below is how I recall doing this.
First download the most recent version of iplist from here
Once you have the source on your server extract it and find the debian package directory:
tar xzvf ./iplist-0.27.tar.gz
cd iplist-0.27/debian
apt-get install g++ libnetfilter-queue-dev zlib1g-dev debhelper fakeroot libpcre3-dev
now change your deb package to not rely on java to install by modifying the ‘control’ file:
nano ./control
Change this:
Depends: ${shlibs:Depends}, ${misc:Depends}, iptables, java6-runtime
To this:
Depends: ${shlibs:Depends}, ${misc:Depends}, iptables
Then go ahead and make the deb and install it like so:
cd ..
make deb
dpkg -i ../iplist_0.27-0ubuntu1_i386.deb
That is how I remember setting it up this time around. I did this a few weeks back so hopefully I didn’t miss any steps. The post setup of ipblock is pretty much the same as I did last time, modify the config file based on the examples in /usr/share/doc/iplist/examples/
Oh, if you decide to plop your iplist logs where they belong (/var/log/) then you might want to put them in a rotation schedule like the rest of your logs. I don’t know how many custom scripts/apps I’ve seen in production environments that never rotate logs and end up with either 1 enormous unmanageable log or several million unmanageable logs.
sudo cp /etc/logrotate.d/apt /etc/logrotate.d/iplist
sudo nano /etc/logrotate.d/iplist
Change your rotate configuration to look something like this (depending on how you changed your iplist configuration for logging of course):
/var/log/iplist.log {
rotate 6
monthly
compress
missingok
notifempty
}
No Comment.
Add Your Comment