Git Product home page Git Product logo

Comments (8)

basking2 avatar basking2 commented on September 23, 2024

HI Sjir,

The libs directory you see in the .tar.gz file is a source directory. It contains the source code for some libraries that IronBee uses which are not always easily installed on a system. To get things like libhtp.so you'll have to compile IronBee.

I recommend not putting the shared libraries into /etc/. Perhaps experiment with the default location of /usr/local/ironbee until it's building how you like it. /usr/local/ironbee/lib will by default have the libraries you're asking nginx to link with -L/usr/local/ironbee/lib -lhtp -libutil -lironbee. The CPP opt will be -I/usr/local/ironbee/include for the headers.

from ironbee.

aosaginohi avatar aosaginohi commented on September 23, 2024

Thank you for the answer @basking2 I think I understand what I do wrong then!

I thought Ironbee compiled into Nginx like most other wafs do (naxsi/modsecurity) thats why I temporarily did put it into /etc just for the compile.

But as I understand your explanation I first need to compile Ironbee on the system and then compile Nginx to use the compiled Ironbee correct?

So in terms of making rpms I would need to make 1 rpms for Ironbee and one for nginx if I would want to install it on multiple systems?

from ironbee.

basking2 avatar basking2 commented on September 23, 2024

I hacked at your scripts a little, mostly to make sure that Nginx 1.8.0. compiles, and I noticed a few things that might be helpful.

  • --with-cc-opt is defined twice. The second assignment will override the first and you will not have -I/usr/local/ironbee/include passed to CC.
  • In my docker system if I did not put /usr/local/ironbee/lib into a file like /etc/ld.so.conf.d/ironbee.conf (and run ldconfig) the libraries were not found during the configurations step of building nginx and nginx never attempted to build itself.
  • I had to define the environment variable NGINXIB_CONFIG_FILE to get the IronBee module recognized correctly. I set it to NGINXIB_CONFIG_FILE=/home/ib/ironbee/servers/nginx/config.nginx (where /home/ib/ironbee is the source code for IronBee) and then the specfile processed until it hit errors at installation.

When you've got things running how you like them we would value some feedback! Most of my attention is on TrafficServer so I don't do a lot of nginx work right now.

Good luck!

from ironbee.

basking2 avatar basking2 commented on September 23, 2024

@sbagmeijer, you've got it right. You need libhtp, libibutil, and libironbee existing on your system first, and that requires a compile.

from ironbee.

aosaginohi avatar aosaginohi commented on September 23, 2024

@basking2 thank you so much! I let you know when I have things up and running and how it work.

from ironbee.

aosaginohi avatar aosaginohi commented on September 23, 2024

@basking2 i created a set of rpm that I would like to add into my repository I am not sure if you know much about making rpms but if you do could you have a look if everything looks fine maybe?

Spec file:
https://github.com/sbagmeijer/ulyaoth/blob/master/Repository/ulyaoth-ironbee/SPECS/ulyaoth-ironbee.spec

Or to build:
wget https://raw.githubusercontent.com/sbagmeijer/ulyaoth/master/Repository/ulyaoth-ironbee/build-ulyaoth-ironbee.sh ; chmod +x build-ulyaoth-ironbee.sh ; ./build-ulyaoth-ironbee.sh
(works only on rhel based os)

My idea is to add this rpm to my repository and then I will use this rpm to link the nginx version, I personally choose to not use /local/usr/, it is more a preference to just use the other locations it should not matter much I hope.

Any feedback would be nice before I release something that is not 100% correct :)

from ironbee.

basking2 avatar basking2 commented on September 23, 2024

I actually do not know RPMs very well. The directory tmpfiles.d looked strange, but the rest made sense to me. Maybe someone else on the list will have some insights?

from ironbee.

aosaginohi avatar aosaginohi commented on September 23, 2024

The tempfiles.d directory and the file is so on reboot it will create the /var/run/ironbee directory on server boot.

It seems the ironbee rpms work fine however I am stuck now on the nginx ones once again it errors with this:
src/core/nginx.c:1039:12: note: include '<string.h>' or provide a declaration of 'memcpy' cc1: all warnings being treated as errors objs/Makefile:426: recipe for target 'objs/src/core/nginx.o' failed make[1]: *** [objs/src/core/nginx.o] Error 1 make[1]: Leaving directory '/home/ulyaoth/rpmbuild/BUILD/nginx-1.8.0' Makefile:8: recipe for target 'build' failed make: *** [build] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.mY416Z (%build)

from ironbee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.