Configure a Syslog server using Rsyslog

Knowledge Required: Comfortable in a Linux shell Tools required: Linux derivative (this example uses Debian) Syslog is a common transport for sending application or security logs over a network. It’s more than likely that you want to aggregate all these syslog feeds into a central location so you can manage them effectively. Commonly this is done for security operations so that these feeds can be passed onto a platform such as a SIEM to identify suspicious behaviors within logs. ...

August 25, 2022 · Nathan W

Show a dynamic loading message with VueJS reactivity on your components

Knowledge Required: A few hours of VueJS Tools required: VueJS When you have a page or component that loads dynamic data (such as from an API), it’s important to communicate to the end user that the your page is busy loading content. It can also be used as a protection mechanism for making sure users can’t do actions until you’re ready. For example, if you have a component which updates user details, you first want to ensure that you’ve loaded the user details into the page before allowing them the opportunity to submit any updates. ...

August 11, 2022 · Nathan W

OpenMediaVault - Update existing users home location after data migration

Knowledge Required: Low Tools required: OpenMediaVault (6.0) OpenMediaVault is a powerful NAS application which allows users to make files available on the network. In my use case, I have used it for some time and needed to migrate data from one drive to another. However, upon migration, despite changing the home folder location within the GUI, the underlying Linux system will not automatically update the location of user’s home folders. ...

May 30, 2022 · Nathan W

Creating banner notifications in Javascript

Knowledge Required: Moderate Tools required: Javascript I recently found myself in the Azure portal where there’s an informative dialog which tells you when a change has been made and then disappears. This led me to wonder how I could write my own version in Javascript. This post is going to be fairly fast paced as it will require you to have basic knowledge of Javascript but don’t worry, you should be able to get away with copy and pasting code listed below and then customizing afterwards. ...

February 16, 2022 · Nathan W

Control and monitor systemd services from Ansible

Knowledge Required: Moderate Tools required: Ansible Ansible is a fantastic way to run remote commands in a scaleable manner, such as commands for health check monitoring. One of the things you may wish to monitor is systemd services. Unless you’re a real hipster, the chances are that if you’re running Linux, your services are managed by systemd. The code Lets take a look at how we can manage systemd services in Ansible, through an Ansible task: ...

February 7, 2022 · Nathan W

Python: optimise reading key values in Python dictionaries

Knowledge Required: Moderate Tools required: Python Skip To Results Working with Python dictionaries doesn’t have to boring! For those who are new here, dictionary objects store their data in [key,value] pairs. Getting data from a dictionary is fairly simple and most tutorials will show you something like: my_dict={"mykey":"myvalue"} #to get the value of "mykey" you'd do the following value=my_dict["mykey"] The above only works if you know that the key named “mykey” is in your dictionary. If you tried to request a key which wasn’t present in the dictionary, you’d get something that looked like the following: ...

January 12, 2022 · Nathan W

Configure custom index patterns in Filebeat

Knowledge Required: Little Tools required: Elasticsearch, Logstash If you’re running Elasticsearch, there are many ways to get data in. One popular option is Filebeat. By default, Filebeat will submit logs to an index which contains the phrase ‘Filebeat’ and also includes the verion number. Similar to: Screenshot of Kibana (Data -> Index Management) The default behaviour is that Filebeat will create an index name specified in the config if it doesn’t exist, so we don’t need to worry about manually creating the index in Elastcisearch! ...

January 1, 2022 · Nathan W

Kibana & Elastic: index and pattern creation

Knowledge Required: Moderate Tools required: Elasticsearch, Kibana, curl Before you can search documents in Kibana, there are a couple of things you’ll need to get going. One of those is telling Kibana which data it should run your search against. As a quick recap, Kibana requires a backend collection of data to search and this is done through Elasticsearch. Architecturally, this usually looks something like: [ElasticSearch:9200] <-----> [Kibana:5601] ...

January 1, 2022 · Nathan W

Sending HTML forms in the background with JavaScript

Typically when you have a HTML form, the objective is to send data to a seperate page to handle the form contents. By default, you’ll get redirected to the destination page which isn’t always helpful. Analytics tracking or file uploads may wish to occur in the background without redirecting the user. We can have this behaviour with some help from JavaScript! Setting up a form: When you set up a form, you’ll probably have something which looks a bit like this: ...

December 30, 2021 · Nathan W

$(cat about_me.md)

Who am I? I spend my personal time engineering and my professional time in Cybersecurity. College introduced me to coding with visual basic and ever since then, I’ve learnt from building things, so it’s how I spent most of my time. I am motivated by overcoming a new technical challenge and I hope that shows by the range of tools you’ll see me use in my current (and future!) posts. ...

December 29, 2021 · Nathan W