<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Charlie Huggan]]></title><description><![CDATA[Networking topics & features, from hardware to protocols 👻]]></description><link>https://charliehuggan.com/</link><image><url>https://charliehuggan.com/favicon.png</url><title>Charlie Huggan</title><link>https://charliehuggan.com/</link></image><generator>Ghost 5.68</generator><lastBuildDate>Thu, 07 May 2026 11:07:08 GMT</lastBuildDate><atom:link href="https://charliehuggan.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Test]]></title><description><![CDATA[<figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2021/08/elastiflow-1.png" class="kg-image" alt loading="lazy" width="1271" height="694" srcset="https://charliehuggan.com/content/images/size/w600/2021/08/elastiflow-1.png 600w, https://charliehuggan.com/content/images/size/w1000/2021/08/elastiflow-1.png 1000w, https://charliehuggan.com/content/images/2021/08/elastiflow-1.png 1271w" sizes="(min-width: 720px) 720px"></figure><p></p><p></p><p></p><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2021/08/Dfinity-Genesis-3.png" class="kg-image" alt loading="lazy" width="2000" height="1125" srcset="https://charliehuggan.com/content/images/size/w600/2021/08/Dfinity-Genesis-3.png 600w, https://charliehuggan.com/content/images/size/w1000/2021/08/Dfinity-Genesis-3.png 1000w, https://charliehuggan.com/content/images/size/w1600/2021/08/Dfinity-Genesis-3.png 1600w, https://charliehuggan.com/content/images/size/w2400/2021/08/Dfinity-Genesis-3.png 2400w" sizes="(min-width: 720px) 720px"></figure>]]></description><link>https://charliehuggan.com/test/</link><guid isPermaLink="false">6522d88f06ee011a8544785b</guid><dc:creator><![CDATA[Charlie Huggan]]></dc:creator><pubDate>Thu, 12 Aug 2021 22:23:47 GMT</pubDate><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2021/08/elastiflow-1.png" class="kg-image" alt loading="lazy" width="1271" height="694" srcset="https://charliehuggan.com/content/images/size/w600/2021/08/elastiflow-1.png 600w, https://charliehuggan.com/content/images/size/w1000/2021/08/elastiflow-1.png 1000w, https://charliehuggan.com/content/images/2021/08/elastiflow-1.png 1271w" sizes="(min-width: 720px) 720px"></figure><p></p><p></p><p></p><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2021/08/Dfinity-Genesis-3.png" class="kg-image" alt loading="lazy" width="2000" height="1125" srcset="https://charliehuggan.com/content/images/size/w600/2021/08/Dfinity-Genesis-3.png 600w, https://charliehuggan.com/content/images/size/w1000/2021/08/Dfinity-Genesis-3.png 1000w, https://charliehuggan.com/content/images/size/w1600/2021/08/Dfinity-Genesis-3.png 1600w, https://charliehuggan.com/content/images/size/w2400/2021/08/Dfinity-Genesis-3.png 2400w" sizes="(min-width: 720px) 720px"></figure>]]></content:encoded></item><item><title><![CDATA[Guide to Installing Elastiflow 4.0.x on CentOS]]></title><description><![CDATA[Guide to installing Elastiflow 4.0.x on CentOS 7. Including Elasticsearch, Kibana, and Logstash. ]]></description><link>https://charliehuggan.com/installing-elastiflow-4-0-x/</link><guid isPermaLink="false">6522d88f06ee011a85447859</guid><category><![CDATA[Guides / Setups]]></category><dc:creator><![CDATA[Charlie Huggan]]></dc:creator><pubDate>Tue, 10 Nov 2020 11:14:51 GMT</pubDate><media:content url="https://charliehuggan.com/content/images/2020/11/samantha-gades-BlIhVfXbi9s-unsplash.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://charliehuggan.com/content/images/2020/11/samantha-gades-BlIhVfXbi9s-unsplash.jpg" alt="Guide to Installing Elastiflow 4.0.x on CentOS"><p>Short guide for installing Elastiflow on CentOS 7. There are 4 main components - Elasticsearch, Kibana, Logstash, and Elastiflow itself. <u>This guide is quite old now and I wouldn&apos;t recommend following it. </u></p><p><strong>NOTE</strong>: If you run into any issues, checkout the official elasticsearch documentation! Things can and do change: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html?ref=charliehuggan.com">https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html</a>. Highly recommend watching Rob&apos;s (Elastiflow creator) YouTube video which I have made full use of in the creation of this article <a href="https://www.youtube.com/watch?v=gZb7HpVOges&amp;t=483s&amp;ref=charliehuggan.com">https://www.youtube.com/watch?v=gZb7HpVOges&amp;t=483s</a>. </p><h2 id="installing-elasticsearch">Installing ElasticSearch</h2><p>To begin, you&apos;ll need to download and add the PGP signing key to your system:</p><pre><code class="language-Java">rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
</code></pre><p>Following that, you&apos;ll need to create a file pointing to the RPM repository:</p><pre><code class="language-Java">sudo nano /etc/yum.repos.d/elasticsearch.repo</code></pre><p>Fill the file with the following data:</p><pre><code class="language-Java">[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md
</code></pre><p>Once saved, run the following two commands:</p><pre><code class="language-Java">sudo yum clean all
sudo yum makecache</code></pre><p>Finally, install elasticsearch which is one of the prerequisites for Elastiflow:</p><pre><code class="language-Java">sudo yum install --enablerepo=elasticsearch elasticsearch</code></pre><p>You can verify the installation with the following:</p><pre><code class="language-Java">rpm -qi elasticsearch

Name        : elasticsearch
Epoch       : 0
Version     : 7.9.3
Release     : 1
Architecture: x86_64
Install Date: Mon 09 Nov 2020 20:03:53 GMT
Group       : Application/Internet
Size        : 511650720
License     : Elastic License
Signature   : RSA/SHA512, Fri 16 Oct 2020 13:46:36 BST, Key ID d27d666cd88e42b4
Source RPM  : elasticsearch-7.9.3-1-src.rpm
Build Date  : Fri 16 Oct 2020 11:45:04 BST
Build Host  : packer-virtualbox-iso-1600176624
Relocations : /usr 
Packager    : Elasticsearch
Vendor      : Elasticsearch
URL         : https://www.elastic.co/
Summary     : Distributed RESTful search engine built for the cloud
</code></pre><p>Now you have a very basic Elasticsearch install, but there&apos;s a few default settings that need to be adjusted. The first, is the elasticsearch JVM heap size. The recommended by Rob, the creator of Elastiflow, is roughly 1/3rd of your total system memory. I&apos;m running a bit of a weird setup with 40GB of RAM, so I&apos;ve assigned 12GB to the JVM heap.</p><p>In order to do so, enter the Elasticsearch (ES), JVM options file:</p><pre><code class="language-Java">sudo nano /etc/elasticsearch/jvm.options</code></pre><p>Where the below two parameters are, adjust to match the size that fits your system:</p><pre><code class="language-Java">-Xms1g
-Xmx1g

TO:

-Xms12g
-Xmx12g</code></pre><p>Next we need to increase some of the default system limits for our installation. (Official documentation: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/master/setting-system-settings.html?ref=charliehuggan.com">https://www.elastic.co/guide/en/elasticsearch/reference/master/setting-system-settings.html</a>)</p><p>For CentOS 7, we must configure these inside systemd. Firstly create the below directory:</p><pre><code class="language-Java">sudo mkdir /etc/systemd/system/elasticsearch.service.d</code></pre><p>And now create the overrides configuration file:</p><pre><code>sudo nano /etc/systemd/system/elasticsearch.service.d/override.conf</code></pre><p>Fill this file with the following system overrides:</p><pre><code class="language-Java">[Service]
LimitNOFILE=131072
LimitNOPROC=8192
LimitMEMLOCK=infinity
LimitFSIZE=infinity
LimitAS=infinity
</code></pre><p>Rob goes into good detail about all 5 of these settings in his YouTube video linked above.</p><p>Note that the next step used to be to add the following... to remove the default operating system limits on mmap counts. But this is done by default now as part of the RPM or deb package installation (<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html?ref=charliehuggan.com">https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html</a>). You can verify the value is the orrect 262144 by running the below:</p><pre><code class="language-Java">sysctl vm.max_map_count

Output should be:
vm.max_map_count = 262144</code></pre><p>We can now edit the Elasticsearch configuration itself. Add the below lines which will enable basic authentication features, and again increase some of the default search parameters to ensure that ES scales to Elastiflow&apos;s needs. the rest can be configured how you like it. For most users you&apos;ll be fine with the defaults.</p><p>Enter the config file:</p><pre><code class="language-Java">sudo nano /etc/elasticsearch/elasticsearch.yml</code></pre><p>Add the below:</p><pre><code class="language-Java">indices.query.bool.max_clause_count: 8192
search.max_buckets: 250000
action.destructive_requires_name: &apos;true&apos;

xpack.monitoring.enabled: &apos;true&apos;
xpack.monitoring.collection.enabled: &apos;true&apos;
xpack.monitoring.collection.interval: 30s

xpack.security.enabled: &apos;true&apos;
xpack.security.audit.enabled: &apos;false&apos;

node.ml: &apos;false&apos;
xpack.ml.enabled: &apos;false&apos;

xpack.ilm.enabled: &apos;true&apos;
xpack.sql.enabled: &apos;true&apos;

xpack.security.transport.ssl.enabled: &apos;true&apos;
discovery.type: single-node</code></pre><p>Now complete a daemon-reload:</p><pre><code class="language-Java">sudo systemctl daemon-reload</code></pre><p>Ensure that Elasticsearch starts on boot with the below, and then start ES:</p><pre><code>sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch</code></pre><p>Confirm ES is operational:</p><pre><code class="language-Java">sudo systemctl status elasticsearch

######### sudo systemctl status elasticsearch
&#x25CF; elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/elasticsearch.service.d
           &#x2514;&#x2500;override.conf
   Active: active (running) since Mon 2020-11-09 22:08:34 GMT; 36s ago
     Docs: https://www.elastic.co
 Main PID: 10527 (java)
    Tasks: 106
   Memory: 13.0G
   CGroup: /system.slice/elasticsearch.service
           &#x251C;&#x2500;10527 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -...
           &#x2514;&#x2500;10768 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller</code></pre><p>Next we&apos;re going to want to setup some passwords for the default accounts in Elasticsearch. Run the below:</p><pre><code class="language-Java">sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive</code></pre><p>At this stage it will ask you to set a password for a number of user accounts - make sure you jot these down. Preferably in your cloud based credential locker of choice &#x1F601;. </p><p>Finally, you can login to Elasticsearch through your browser using the &quot;elastic&quot; account (that you just created a password for) to verify everything is perfectly operational:</p><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2020/11/image-1.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="581" height="372"></figure><h2 id="installing-kibana">Installing Kibana</h2><p>At this point you can install the visualization component of the elastic stack, Kibana. Installation instructions differ from earlier documentation - so if you run into any issues, again check the official docs (<a href="https://www.elastic.co/guide/en/kibana/7.9/rpm.html?ref=charliehuggan.com">https://www.elastic.co/guide/en/kibana/7.9/rpm.html</a>) </p><p>Firstly create an RPM repo file for Kibana:</p><pre><code class="language-Java">sudo nano /etc/yum.repos.d/kibana.repo</code></pre><p>Fill with the following information:</p><pre><code class="language-Java">[kibana-7.x]
name=Kibana repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md</code></pre><p>Save the file, and now you can run the package installer:</p><pre><code class="language-Java">sudo yum install kibana</code></pre><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2020/11/image-2.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="1241" height="269" srcset="https://charliehuggan.com/content/images/size/w600/2020/11/image-2.png 600w, https://charliehuggan.com/content/images/size/w1000/2020/11/image-2.png 1000w, https://charliehuggan.com/content/images/2020/11/image-2.png 1241w" sizes="(min-width: 720px) 720px"></figure><p>Following installation, we can now edit the configuration file for Kibana:</p><pre><code class="language-Java">nano /etc/kibana/kibana.yml</code></pre><p>By default, nothing is explicitly configured. Below are the explicit lines of configuration that I&apos;ve added to my setup:</p><pre><code class="language-Java">server.name: &apos;toob-netflow-kibana&apos;
server.host: &apos;192.168.130.20&apos;
server.port: &apos;5601&apos;

server.maxPayloadBytes: 8388608

elasticsearch.hosts: [&apos;http://192.168.130.20:9200&apos;]
elasticsearch.username: &apos;kibana_system&apos;
elasticsearch.password: &apos;XzeEQ95kpSPaqYD6&apos;

elasticsearch.requestTimeout: 132000
elasticsearch.shardTimeout: 120000

kibana.index: &apos;.kibana&apos;

xpack.security.enabled: &apos;true&apos;
xpack.security.audit.enabled: &apos;false&apos;
xpack.monitoring.enabled: &apos;true&apos;
xpack.monitoring.kibana.collection.enabled: &apos;true&apos;
xpack.monitoring.kibana.collection.interval: 30000
xpack.monitoring.ui.enabled: &apos;true&apos;
xpack.monitoring.min_interval_seconds: 30

xpack.apm.enabled: &apos;true&apos;
xpack.apm.ui.enabled: &apos;true&apos;

xpack.grokdebugger.enabled: &apos;true&apos;
xpack.searchprofiler.enabled: &apos;true&apos;

xpack.graph.enabled: &apos;false&apos;
xpack.infra.enabled: &apos;true&apos;

xpack.ml.enabled: &apos;false&apos;
xpack.reporting.enabled: &apos;false&apos;

xpack.spaces.enabled: &apos;true&apos;
xpack.spaces.maxSpaces: 1000
</code></pre><p>OK now, I ran into an issue whereby my Kibana configuration didn&apos;t want to start up. It needed to be pointed to this configuration file we just created. Do so by updating the below file:</p><pre><code class="language-Java">sudo nano /etc/systemd/system/kibana.service</code></pre><p>Update the following line to match the below:</p><pre><code class="language-Java">ExecStart=/usr/share/kibana/bin/kibana &quot;-c /etc/kibana/kibana.yml&quot;</code></pre><p>Now enable Kibana to run on startup &amp; start Kibana itself:</p><pre><code>sudo systemctl enable kibana 
sudo systemctl start kibana</code></pre><p>Now you should be able to browse to your Kibana installation on the default port 5601. Login with the default user elastic:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/11/image-3.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="965" height="626" srcset="https://charliehuggan.com/content/images/size/w600/2020/11/image-3.png 600w, https://charliehuggan.com/content/images/2020/11/image-3.png 965w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Login page</span></figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/11/image-4.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="1338" height="504" srcset="https://charliehuggan.com/content/images/size/w600/2020/11/image-4.png 600w, https://charliehuggan.com/content/images/size/w1000/2020/11/image-4.png 1000w, https://charliehuggan.com/content/images/2020/11/image-4.png 1338w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">Following login you&apos;ll be greeted with the default dashboard.</span></figcaption></figure><p>Alright now you&apos;re in... it&apos;s time to setup the next component of the elastic stack. </p><h2 id="installing-logstash">Installing Logstash</h2><p>Before getting to the actual Logstash setup, you&apos;ll need to make sure that Java is installed or Logstash installation will fail:</p><pre><code class="language-Java">sudo yum install java-1.8.0-openjdk</code></pre><p>Verify that Java is installed successfully:</p><pre><code>java -version

## Output ##
openjdk version &quot;1.8.0_262&quot;
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)</code></pre><p>I had to set the JAVA_HOME variable now. First you need to find where your JDK installation is:</p><pre><code class="language-Java">sudo alternatives --config java</code></pre><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2020/11/image-6.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="933" height="83" srcset="https://charliehuggan.com/content/images/size/w600/2020/11/image-6.png 600w, https://charliehuggan.com/content/images/2020/11/image-6.png 933w" sizes="(min-width: 720px) 720px"></figure><p>Copy the full path (/usr/lib/...bin/java), and now create a java.sh file under profile.d:</p><pre><code class="language-Java">sudo nano /etc/profile.d/java.sh</code></pre><p>Enter the below:</p><pre><code class="language-Java">export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64/jre/bin/java</code></pre><p>Save, and reboot your system. Once rebooted, run the below to check JAVA_HOME is set correctly:</p><pre><code class="language-Java">echo $JAVA_HOME </code></pre><p>This command should output the directory you just put into your java.sh file.</p><h4 id="moving-on-to-logstash">Moving on to Logstash</h4><p>You should be fairly familiar with the installation process now, this component is no different than the other two &#x1F60A;. Start by creating a repo file so you can access the logstash repository:</p><pre><code>sudo nano /etc/yum.repos.d/logstash.repo</code></pre><p>Enter the below into the file:</p><pre><code class="language-Java">[logstash-7.x]
name=Elastic repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md</code></pre><p>Save, and now you will be able to install Logstash:</p><pre><code class="language-Java">sudo yum install logstash</code></pre><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2020/11/image-7.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="1191" height="301" srcset="https://charliehuggan.com/content/images/size/w600/2020/11/image-7.png 600w, https://charliehuggan.com/content/images/size/w1000/2020/11/image-7.png 1000w, https://charliehuggan.com/content/images/2020/11/image-7.png 1191w" sizes="(min-width: 720px) 720px"></figure><p>Now that it&apos;s all installed, we&apos;re going to configure the JVM options for Logstash to increase the heap size allocation:</p><pre><code class="language-Java">sudo nano /etc/logstash/jvm.options </code></pre><p>I&apos;ve given 8GB in my config by adjusting the following (remember my system has 40GB of RAM - heap size for elasticsearch should be roughly 1/3rd your system memory, I&apos;m setting logstash to be 2/3rd&apos;s of that number - note that, this should never be set above 31GB):</p><pre><code class="language-Java">-Xms1g
-Xmx1g

TO:

-Xms8g
-Xmx8g</code></pre><p>Now we should increase Logstash system priority by editing the below:</p><pre><code class="language-Java">sudo nano /etc/systemd/system/logstash.service</code></pre><p><strong>Adjust the &quot;nice&quot; parameter to be 0</strong>, which will increase Logstash process priority to the default.</p><p>Now, we need to install and update the following plugins in order to use Elastiflow:</p><pre><code class="language-Java">sudo /usr/share/logstash/bin/logstash-plugin install logstash-codec-sflow
sudo /usr/share/logstash/bin/logstash-plugin update logstash-codec-netflow
sudo /usr/share/logstash/bin/logstash-plugin update logstash-input-udp
sudo /usr/share/logstash/bin/logstash-plugin update logstash-input-tcp
sudo /usr/share/logstash/bin/logstash-plugin update logstash-filter-dns
sudo /usr/share/logstash/bin/logstash-plugin update logstash-filter-geoip
sudo /usr/share/logstash/bin/logstash-plugin update logstash-filter-translate</code></pre><p>Some of these might not actually need to be updated, but still it&apos;s worth doing. </p><h2 id="installing-elastiflow">Installing Elastiflow </h2><p>You&apos;ve finally made it to the point where Elastiflow can be installed. There&apos;s still settings to tweak, but it&apos;s time to download the git repository.</p><pre><code class="language-Java">cd #Home
mkdir flowtemp
cd flowtemp
sudo git clone https://github.com/robcowart/elastiflow.git
sudo cp -arv elastiflow/logstash/elastiflow/. /etc/logstash/elastiflow/
sudo cp -arv elastiflow/logstash.service.d/. /etc/systemd/system/logstash.service.d/
</code></pre><p>Now configure the below file:</p><pre><code class="language-Java">sudo nano /etc/logstash/pipelines.yml</code></pre><p>And add the following two lines:</p><pre><code class="language-Java">- pipeline.id: elastiflow
  path.config: &quot;/etc/logstash/elastiflow/conf.d/*.conf&quot;</code></pre><p>Now you&apos;re good to go.... There are a few other optional steps you can check if you want to customize a bit further. I highly recommend you read the install page for Elastiflow: <a href="https://github.com/robcowart/elastiflow/blob/master/INSTALL.md?ref=charliehuggan.com">https://github.com/robcowart/elastiflow/blob/master/INSTALL.md</a>. Note that Geo IP databases in Elastiflow haven&apos;t been updated since 2019 - due to new laws in California apparently. Highly recommend creating a MaxMind account and downloading the respective GeoIP database. Again this is covered in the install page above.</p><p>Run the below to ensure any changes to the environment variables are recognized:</p><pre><code class="language-Java">systemctl daemon-reload</code></pre><p>Now start Logstash:</p><pre><code class="language-Java">systemctl start logstash</code></pre><p>The next step is to download the Kibana dashboards. You can download this file here: <a href="https://github.com/robcowart/elastiflow/blob/master/kibana/elastiflow.kibana.7.8.x.ndjson?ref=charliehuggan.com">https://github.com/robcowart/elastiflow/blob/master/kibana/elastiflow.kibana.7.8.x.ndjson</a>. Note that, this version will change as Elastiflow is updated. Check the github repo to get the latest copy (under &quot;kibana/&quot;)</p><p>Log on the server web page and navigate to Management/Saved Objects. Import the above file.</p><p>With any luck - everything should now be working. You can go into Kibana and select a dashboard to see your incoming netflow data (assuming you have already set this up and pointed it to the server).</p><figure class="kg-card kg-image-card"><img src="https://charliehuggan.com/content/images/2021/08/elastiflow.png" class="kg-image" alt="Guide to Installing Elastiflow 4.0.x on CentOS" loading="lazy" width="1271" height="694" srcset="https://charliehuggan.com/content/images/size/w600/2021/08/elastiflow.png 600w, https://charliehuggan.com/content/images/size/w1000/2021/08/elastiflow.png 1000w, https://charliehuggan.com/content/images/2021/08/elastiflow.png 1271w" sizes="(min-width: 720px) 720px"></figure>]]></content:encoded></item><item><title><![CDATA[DHCPv6 Active Leasequery Pt.1]]></title><description><![CDATA[Juniper DHCPv6 ALQ (Active Leasequery) overview, and general configuration discussion on JunOS. Blog post part 1. ]]></description><link>https://charliehuggan.com/dhcpv6-active-leasequery/</link><guid isPermaLink="false">6522d88f06ee011a85447857</guid><category><![CDATA[JunOS Subscriber Features]]></category><dc:creator><![CDATA[Charlie Huggan]]></dc:creator><pubDate>Sun, 26 Jul 2020 20:19:26 GMT</pubDate><media:content url="https://charliehuggan.com/content/images/2020/07/121415-1.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://charliehuggan.com/content/images/2020/07/121415-1.jpg" alt="DHCPv6 Active Leasequery Pt.1"><p>Over the last couple weeks I&apos;ve been attempting to setup and test DHCPv6 Active Leasequery between two relay agents (Juniper MX10003 routers running 19.4R1-S2.2). ALQ is a fairly new extension to DHCP (<u><a href="https://tools.ietf.org/html/rfc7653?ref=charliehuggan.com">RFC7653</a></u> (v6) and <u><a href="https://tools.ietf.org/html/rfc7724?ref=charliehuggan.com">RFC7724</a></u> (v4)) which allows for a requestor to ask for information of another devices DHCPv6 bindings, be that another DHCP server or relay agent. In my case, I&apos;ve got two JunOS DHCP relay agents which are holding DHCPv6 bindings - they need to hold the exact same routing and lease information in order to provide redundancy to the DHCPv6 client. ALQ assists by ensuring the leases remain synchronized between the two routers. </p><p>Before going further, see below the design I&apos;m using for testing (omitted some of the lab access components as they&apos;re not relevant to DHCP traffic flows). </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/08/image-16.png" class="kg-image" alt="DHCPv6 Active Leasequery Pt.1" loading="lazy" width="901" height="722" srcset="https://charliehuggan.com/content/images/size/w600/2020/08/image-16.png 600w, https://charliehuggan.com/content/images/2020/08/image-16.png 901w" sizes="(min-width: 720px) 720px"><figcaption>Lab diagram - redundant DHCPv6 servers and DHCPv6 relay agents</figcaption></figure><h3 id="dhcp-client-to-server-traffic-flow">DHCP Client to Server Traffic Flow</h3><p>Before going further, it&apos;s necessary to understand the traffic flow from the CPE, to the relay agents, to the servers, and the exchange of messages that takes place! So lets look into that in detail. Here is a diagram of the basic traffic flow with a single MX, I&apos;ll explain the flow in further detail with both of the Juniper routers below.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/09/image.png" class="kg-image" alt="DHCPv6 Active Leasequery Pt.1" loading="lazy" width="765" height="498" srcset="https://charliehuggan.com/content/images/size/w600/2020/09/image.png 600w, https://charliehuggan.com/content/images/2020/09/image.png 765w" sizes="(min-width: 720px) 720px"><figcaption>Simplified DHCPv6 traffic flow with single MX acting as relay agent</figcaption></figure><p>When the CPE boots, it will broadcast a DHCPv6 <strong>Solicit </strong>packet that will be received and processed by both R1 &amp; R2 relay agents. Both agents will forward the solicits to both DHCP servers, in a <strong>Relay-Forward</strong> message, encapsulating and forwarding on the clients initial solicit message. Here I have two KEA DHCP servers set up with a redundant configuration, therefore only the elected primary server will respond to the <strong>Relay-Forwards</strong> with a <strong>Relay-Reply </strong>which advertises to the client the all important DHCP IA_NA and IA_PD prefixes <a href="https://www.juniper.net/documentation/en_US/junos/topics/topic-map/dhcpv6-iana-prefix-delegation-addressing.html?ref=charliehuggan.com"><u>(Info)</u></a>. </p><p>So, these <strong>Relay-Reply (Advertise/Offer) </strong>messages are received by both R1 &amp; R2 from the primary DHCP server, and then both are forwarded to the DHCP client. The client will in-turn send a <strong>Request </strong>message back towards the primary DHCP server, which is accepting the lease advertisement/offer. Both relay agents will receive the client&apos;s request message and forward to the primary DHCP server in <strong>Relay-Forward</strong> packets. The server will respond to both request messages, finalizing the lease between the client and server, sending two final <strong>Relay-Replys</strong> towards R1 &amp; R2. </p><p>It is at this stage, that R1 &amp; R2 will install the lease into their JunOS subscriber database, and also install routes in their routing tables for the IA_NA and IA_PD prefixes - enabling connectivity to the client CPE! The final <strong>Relay-Reply </strong>is also forwarded to the client by R1 &amp; R2, and at this stage the client will install it&apos;s new IPv6 prefixes.</p><p><strong>In summary</strong>:</p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>CPE boots - once ready it sends a DHCPv6 <strong>Solicit</strong> message </em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>R1 &amp; R2 encapsulate solicit in <strong>Relay-Forward </strong>message and send to both DHCP servers</em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>Both DHCP servers receive the message - only the elected primary server will respond (if enabled via KEA). </em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>Primary DHCP server sends <strong>Relay-Reply</strong> to both R1 &amp; R2 with DHCP Offer (<strong>Advertise</strong>) holding IA_NA and IA_PD information</em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>Client receives DHCP <strong>Advertise </strong>message from R1 &amp; R2 and returns a R<strong>equest</strong> message to the DHCP server, accepting the offer</em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>R1 &amp; R2 send request via <strong>Relay-Forward</strong> &#xA0;packets unicast to the primary DHCP server</em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>Primary DHCP server receives the request and sends a final <strong>Relay-Reply</strong> to R1 &amp; R2, finalizing the lease with the client</em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>R1 &amp; R2 have been snooping the exchange the whole time, now that it sees the final <strong>Relay-Reply</strong> message, it will forward the acceptance to the client (<strong>Reply</strong> message), and install the lease information into its database. Specific for IPv6, it will install a route to the IA_NA prefix, and IA_PD prefix. </em></p><p><em> &#xA0; &#xA0;</em>&#x2022; &#xA0;<em>Both Juniper routers will now have subscriber information and routes back to the CPE!</em></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/08/image-8.png" class="kg-image" alt="DHCPv6 Active Leasequery Pt.1" loading="lazy" width="492" height="441"><figcaption>Output from &quot;show subscribers extensive&quot; - IPoE DHCP Subscriber on Juniper MX</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/08/image-7.png" class="kg-image" alt="DHCPv6 Active Leasequery Pt.1" loading="lazy" width="735" height="235" srcset="https://charliehuggan.com/content/images/size/w600/2020/08/image-7.png 600w, https://charliehuggan.com/content/images/2020/08/image-7.png 735w" sizes="(min-width: 720px) 720px"><figcaption>Access route for client IA_PD and Access-internal route for client IA_NA address</figcaption></figure><h3 id="active-leasequery">Active Leasequery</h3><p>OK now we have an IPv6 lease on our subscriber CPE! But lets say R1 in our diagram suffers a critical hardware failure, and the subscriber state and DHCP bindings are lost. At first, traffic will failover to R2 as long as you have VRRP/HSRP configured for your link-local addressing. If the first router comes back up and claims primary though - customer traffic destined to this router will be blackholed. </p><p>Here&apos;s where Active Leasequery (ALQ) finally comes to the rescue &#x1F9B8;&#x200D;&#x2642;&#xFE0F;! Lets say ALQ is configured between the core routers. Once R1 comes back online, an ALQ TCP session will be created automatically between the two devices. R2 will at this stage synchronize its bindings with R1, restoring the DHCP bindings on the device along with the subscriber database in the process. Below is verification of the session establishment:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/09/image-2.png" class="kg-image" alt="DHCPv6 Active Leasequery Pt.1" loading="lazy" width="829" height="70" srcset="https://charliehuggan.com/content/images/size/w600/2020/09/image-2.png 600w, https://charliehuggan.com/content/images/2020/09/image-2.png 829w" sizes="(min-width: 720px) 720px"><figcaption>The session is created on port 547, and we can see here the session is established between the two peers</figcaption></figure><p>The simpler way of confirming ALQ session establishment is to simply run &quot;<strong><em>show dhcpv6 active-leasequery neighbors</em></strong><em>&quot; </em>-<em> </em>At least, in theory! I&apos;m currently a month deep into a JTAC case with Juniper where we&apos;re trying to get this functionality working with a basic configuration. At this stage it&apos;s believed to be a bug preventing the feature from working on the MX10003 (version 19.4R1-S2.2). I have a continually breaking ALQ TCP session and none of the Juniper ALQ verification commands actually work&#xFE0F; yet &#x1F926;&#x200D;&#x2642;&#xFE0F;. &#xA0;</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://charliehuggan.com/content/images/2020/08/image-19.png" class="kg-image" alt="DHCPv6 Active Leasequery Pt.1" loading="lazy" width="593" height="370"><figcaption>My base configuration for DHCPv6 ALQ on R2. The peer-address is for R1.</figcaption></figure><p>In the next post I will talk about the actual ALQ configuration, session establishment process, and verification commands. This is assuming I can get the feature working with Juniper and it isn&apos;t a world ending bug &#x1F91E;! &#xA0;</p>]]></content:encoded></item></channel></rss>