Giter Site home page Giter Site logo

edcop-moloch's Introduction

EDCOP Moloch

Table of Contents

Configuration Guide

Within this configuration guide, you will find instructions for modifying Moloch's helm chart. All changes should be made in the values.yaml file. Please share any bugs or feature requests via GitHub issues.

Image Repository

By default, the image is pulled from Docker's Hub, which is a customized Moloch image with the ability to specify viewer/capture only nodes. This value should not be changed because the configuration depends on the environment variables specified in the yamls.

images:
  moloch: gcr.io/edcop-dev/mike-moloch:5
  runner: gcr.io/edcop-public/runner:8

Networks

Moloch only uses 2 interfaces because it can only be deployed in passive mode to record traffic. By default, these interfaces are named calico and passive.

networks:
  overlay: calico
  passive: passive

To find the names of your networks, use the following command:

# kubectl get networks
NAME		AGE
calico		1d
passive		1d
inline-1	1d
inline-2	1d

Persistent Storage

These values tell Kubernetes where Moloch's PCAPs and logs should be stored on the host for persistent storage. The raw option is for Moloch's raw PCAP files and the logs option is for Moloch's capture/viewer logs. By default, these values are set to /bulk/EDCOP/moloch/ but should be changed according to your logical volume setup.

volumes:
  logs: /bulk/EDCOP/moloch/logs
  raw: /bulk/EDCOP/moloch/raw

Node Selector

This value tells Kubernetes which hosts the daemonset and statefulset should be deployed to by using labels given to the hosts. The viewer nodes run on the master while the capture nodes run on the workers. Hosts without the defined label will not receive pods. Moloch viewer will only deploy to the node labeled 'infrastructure=true', while the Moloch worker will deploy to nodes labeled 'sensor=true'

nodeSelector:
  worker: sensor
  viewer: infrastructure

To find out what labels your hosts have, please use the following:

# kubectl get nodes --show-labels
NAME		STATUS		ROLES		AGE		VERSION		LABELS
master 		Ready		master		1d		v1.10.0		...,infrastructure=true
minion-1	Ready		<none>		1d		v1.10.0		...,sensor=true
minion-2	Ready		<none>		1d		v1.10.0		...,sensor=true

Ingress

In order to serve web traffic to the GUIs provided by the tools, we use Traefik in conjuction with Kubernetes ingress objects. This value should be the FQDN of your EDCOP host. By default, Moloch will be available at $FQDN/moloch/

ingress:
  host: physial.edcop.io

Moloch Configuration

Moloch is used as a FPCAP solution, so some configuration is required for optimal performance. Clusters that run Moloch will need 2 networks: an overlay and passive tap network.

Performance

Before tweaking Moloch's performance, you need to define how many instances should be run. The value below should be equal to the number of worker nodes you have. Unfortunately, there is no Statefulset-Daemonset, so we're stuck defining the number of nodes we need until there is a better way.

molochConfig:
  workerNodes: 3

Moloch allows you to set limits on many different performance settings, but the ones included in the values.yaml are the most important. Before configuring these values, you should read Moloch's best practices at https://github.com/aol/moloch/wiki/Settings#High_Performance_Settings. By default, these values are set to Moloch's recommended settings.

molochConfig:
  performance:
    maxStreams: 1000000
    maxPacketsInQueue: 200000
    maxPackets: 10000
    packetThreads: 5
    pcapWriteSize: 262143
    tpacketv3Threads: 2

Environment Variables

In order to make Moloch more secure, you need to set a couple of passwords for Moloch's data transfer and access to its viewer. You can set the cluster and encrypt passwords to something random, but the admin password will be used to access the web interface as the admin superuser. You could use something like pwgen to create random passwords, but this isn't necessary.

molochConfig:
  env:
    adminpw: supersecretpw
    clusterpw: anothersupersecretpw
    encryptpw: randencryptpw

Resource Limits

You can set limits on Moloch to ensure it doesn't use more CPU/memory space than necessary. Finding the right balance can be tricky, so some testing may be required.

molochConfig:
  requests:
    cpu: 100m
    memory: 64Mi
  limits:
    cpu: 2
    memory: 4G

edcop-moloch's People

Contributors

miked235 avatar jjung1 avatar dlohin avatar giraldo925 avatar

Stargazers

 avatar

Watchers

James Cloos avatar

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.