Facing issues while hardening the security of my Ubuntu droplet


I’m a newbie here and facing a couple issue with my droplet. Wanted to harden the security of my Ubuntu droplet but facing some issues. Googled a lot but can’t see any solution of these problems. Any suggestion on how to fix these?

1.) How can I update OWASP modsecurity core rule set? Right now I am using 2.2.4 and the latest version is 2.2.9 (

  1. I have installed mod_security. When I add the new symlinks to apache '/etc/apache2/mods-available/security2.conf" I get the following error:

Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.

When I comment the line line --> Include “/etc/modsecurity/activated_rules/*.conf” Apache starts working again.

  1. In /etc/sysctl.conf when I add these rules

Disable source packet routing

net.ipv4.conf.all.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0

Log Martians

net.ipv4.icmp_ignore_bogus_error_respons­es = 1

and reloaded the new rules by “sudo service procps start”

I get the following error after running “sysctl -p”

sysctl: cannot stat /proc/sys/net/ipv4/conf/default/accept_source_rout­e: No such file or directory sysctl: cannot stat /proc/sys/net/ipv6/conf/default/accept_source_rout­e: No such file or directory sysctl: cannot stat /proc/sys/net/ipv4/icmp_ignore_bogus_error_respons­es: No such file or directory

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


I faced the same isseu with /proc/sys/net/ipv4/conf/default/acceptsourcerout­e and /proc/sys/net/ipv6/conf/default/acceptsourcerout­e.

Did you found a solution for it yet?