1

I'm not very experienced trying to do things like this, but I have been wanting to ban Chinese IPs from my VPS running Ubuntu (12.04 32-bit).

I followed this guide, taking the time to read the explanations and not just pasting in whatever it said: https://mattwilcox.net/web-development/unexpected-ddos-blocking-china-with-ipset-and-iptables/

When I got to the part almost at the end about running /etc/block-china.sh I got a long output of the same error repeating: ipset v6.11: Kernel error received: Operation not permitted

I have searched and couldn't find any help. Is this something I shouldn't even be attempting to do myself, because of my inexperience? Or is there something that I'm just missing?

Also, I have fail2ban setup and it seems to be working well, should I just settle with using that alone?

0

Did you run the script with privileges? Operation not permitted is usually a need for more privileges. It is a Kernel error so you either need to be root or have kernel permissions to do this. (I forget the name of the kernel permission that would be required)

sudo /etc/block-china.sh

or

su -c 'sh /etc/block-china.sh'
| improve this answer | |
  • I orginally used sudo, and just tried it again with the same error. The second option you suggested gave me a "su: Authentication failure". I will try to find something on kernel permission. – Trich Mar 24 '15 at 18:00
  • Also tried with root and got the same error. So does that mean it wouldn't be a kernel permission problem if root still gets the error? – Trich Mar 24 '15 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.