How can I install Moloch on a computer with no internet access?

165 views
Skip to first unread message

craig...@gmail.com

unread,
May 17, 2016, 5:41:27 PM5/17/16
to Moloch Full Packet Capture
I would like to install Moloch on a computer that has no access to the internet. I can copy files to it via thumb drive and I already have a file-based offline apt repo, so I can run apt-get install, etc. I have manually downloaded all the files that are normally downloaded by easybutton-singlehost.sh and easybutton-build.sh via wget, and changed easybutton-singlehost.sh and easybutton-build.sh to use these local files instead of using wget. 

However, I can't figure out how to make the NPM portions of the script to work in an offline mode. NPM fails to download the Javascript packages without internet access, which then means the web front end to Moloch won't work, and the easybutton-singlehost.sh script can't create a new user (admin). Here's the error output at the end of easybutton-singlehost.sh.

Finished.  Have fun!
Finished
MOLOCH: Adding user admin/admin

module.js:340
    throw err;
          ^
Error: Cannot find module 'iniparser'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/data/moloch/viewer/config.js:27:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

I cannot figure out how to download local files for NPM and point the script at the local files so that NPM can install what it needs. Has anyone ever gotten Moloch to install in an offline (no Internet access) situation? Surely the authors of Moloch had to work in an offline environment for their use of Moloch at AOL, right?

As a fallback solution, I might even be willing to have just the Capture and ElasticSearch portions of Moloch, and do without the web front end, but I don't know how to do this either.

Any help would be greatly appreciated!

Thanks,
Craig

Andy

unread,
May 17, 2016, 5:54:37 PM5/17/16
to Moloch Full Packet Capture
If no proxies available, then find a box on the internet, build there, copy the entire /data/moloch directory to other machines.  Make sure the OS/kernel are the same.  Box on the internet could be physical, virtualbox, vagrant, or AWS free tier.  If you stick with moloch then I recommend you create rpms or whatever to deploy.  We just have a jenkins job that monitors and builds and publishes.

Remember that easybutton is just a sample script to get it all working, and isn't the only way to build stuff.  make works just fine.

If you can use proxies then npm support a ~/.npmrc file with a proxy =


Thanks,
Andy
Reply all
Reply to author
Forward
0 new messages