The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

liblua.so - what it does for ModSec, and how to install it

Discussion in 'Security' started by santrix, Mar 26, 2012.

  1. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Hi,

    I'm seeing this error after installing modsec on some servers:

    Code:
    httpd: Syntax error on line 42 of /usr/local/apache/conf/httpd.conf: Syntax error on line 2 of /usr/local/apache/conf/modsec2.conf: Cannot load /opt/lua/lib/liblua.so into server: /opt/lua/lib/liblua.so: cannot open shared object file: No such file or directory
    On many servers /opt/lua/lib/liblua.so links to liblua-5.1.3.so and everything is dandy.

    On some servers, it just isn't there... all I see in /opt/lua/lib is liblua.a

    I'm not even sure if liblua is necessary as a shared object on all kernels for modsec2 to use it? If I just comment out the line in modsec2.user.conf that calls it then apache starts fine.

    Any advice/clues?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    There is only one ticket reporting this issue (2093290) in the last 90 days. It was due to the gotroot rules requiring liblua when ours do not do so. Is your system using the gotroot rules for mod_security rather than the default cPanel-provided ones?
     
  3. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    I am using the Atomic ruleset... IT's OK, I found it in the end.

    The machine running Centos 6 seems to have put it here:

    /usr/lib64/liblua-5.1.so

    Solved :)
     
  4. mikegotroot

    mikegotroot Well-Known Member

    Joined:
    Apr 29, 2008
    Messages:
    85
    Likes Received:
    1
    Trophy Points:
    8
    Our rules do not use liblua currently, however to answer your question lua is an advanced programming language that modsecurity can use to load scripts internally (which is much faster than forking external scripts for example). This allows rules to be expanded to do almost anything. In the future we will be including lua based rules.
     
Loading...

Share This Page