📝How I brought order in the chaos

Summary

I have been exploring different methods to enhance my productivity and note-taking system. Additionally, I am striving to establish organization within my personal archives stored on my Synology device. During my research, I came across the following methodologies: Johnny Decimal, Zettelkasten, PARA and the Build A Second Brain approach.

My objective is to integrate these four methods in a way that enables me to:

  1. Effectively store, retrieve, and manage my notes in an orderly manner.

  2. Establish a systematic approach for storing and retrieving personal documents on my Synology device.

  3. Implement a coherent structure across all the applications I utilize and require.

By combining these methodologies, I aim to streamline my note-taking and document management processes while maintaining a consistent organizational framework across various applications.

Contents

PARA (Projects, Areas, Resources, Archive)

Tiago Forte is a prominent productivity expert known for developing the PARA framework, which stands for Projects, Areas, Resources, and Archives. The PARA method is designed to help individuals organize and optimize their digital information and tasks. It involves categorizing information based on project-specific tasks, broader areas of responsibility, essential resources, and archival items. The PARA methodology aims to improve focus, efficiency, and clarity in managing personal and professional workflows.

On his website mentioned above, you find all the info you need, there is an ebook too on the matter.

As I am a Dutch guy, I took the Dutch translation for the PARA acronym

  • Projecten
  • Aandachtsgebieden
  • Redmiddelen
  • Archief

Within the folder “Projects” and “Areas” I created the 10 most common Areas of Attention.

  1. Health and well-being: This includes physical health, mental health, fitness, nutrition, and self-care practices.
  2. Family and relationships: This area includes family members, friends, romantic relationships, and social interactions that are important to you.
  3. Career and work: This encompasses your profession, career development, work goals, and professional achievements.
  4. Finances: Managing your finances, including budgeting, saving, investing, and debt repayment.
  5. Personal growth and development: This includes pursuing new skills, knowledge, and personal growth, as well as setting goals for self-improvement.
  6. Leisure and hobbies: Activities that provide you with pleasure and relaxation, such as hobbies, sports, arts, and other recreational pursuits.
  7. Living environment: Organizing and caring for your home, living space, and personal belongings.
  8. Community involvement: Volunteer work, charity work, or other activities that contribute to your community or society as a whole.
  9. Personal values and spirituality: Exploring and cultivating your personal values, beliefs, and spiritual growth.
  10. Time management and productivity: Developing effective time management and productivity habits to achieve your goals.

I try to fit my Projects and my Interests in those 10 areas.

For “Resources” I have not some a strict list of areas. This more fluid. These are an area that build over time.

For “Archive”, this is your “freezer” of information. Here is information that you don’t need anymore, but can be de-frosted when needed.

Johnny Decimal (JD)

Johnny.Decimal is a personal productivity system created by John Poelstra. It is based on the idea of organizing and categorizing information using a numeric hierarchy. Each level in the hierarchy represents a different category, and items are assigned unique numbers based on their location within the hierarchy. The system is designed to help individuals manage their digital and physical information effectively and improve their productivity.

On his website (mentioned above) you will find a detailed description of how JD works and can be implemented in your folder structure across your apps.

Fusing PARA and JD

If we fusing these two together (JD and PARA) I came up with something like this:

It’s all in Dutch but you get the picture.

I made 4 “root” folder

  • 10_Projects
  • 20_Areas
  • 30_Resouces
  • 40_Archives

The 20_Areas (or in Dutch 20_Aandachtsgebieden) is wat you see in the image as an example. From 20.00-09 till 20.90-99 you have your 10 MAIN Areas.

As I open here the Area “20.50-59 Leisure and hobbies” (or in Dutch 20.50-59 Vrije tijd en hobby’s) you can see I summed up all my hobbies in the subfolders.

  • 20.51 Fotografie
  • 20.52 Programming
  • 20.53 Koken
  • 20.54 Schrijven
  • 20.55 Piano
  • 20.56 Computers
  • 20.57 Apple
  • 20.58 Vertier

And within “20.51 Photography” I have al the individual items I care about in Photography (for now).

  • 20.51.01 Phonographer
  • 20.51.02 Albelli
  • 20.51.03 Info

Can I see how the Johnny.Decimal Numbers all nicely lock in place. The advance is that if you share the folder structure with someone or you want to refer to a item in the structure you can simple say:

“Hey, look in 20.51.02 Albelli”

And that person (or yourself from a note), will know the PATH to that location without having to tell them:

“Goto /Users/marco/Resilio/20_aandachtsgebieden/20.50-59 Vrije tijd en hobby’s/20.51 Fotografie/20.51.02 Albelli”

They exactly where to find this folder and it’s content. It’s all locked in side those numbers. Easi-Peasi! And you can do this in apps too. Say for instance in Things3 or like in the image blow in an app called Noteplan3 where I keep all my text-notes for stuff I find interesting.

🛜Blocking (or Allowing) whole Countries or a Provider or a Network with your Ubiquiti Edgerouter

I recently picked up a nice second hand Ubiquiti Edgerouter X from Marktplaats, which is the Dutch Craigslist. I wanted to play with a firewall in my network. This quickly became a complete rebuild of the network with multiple Vlans in my house. Which was enjoyable because exploring and learning is always a good thing.

This learning also counts for the firewall in the Edgerouter (which runs EdgeOS). I had some experience with firewalls in a very far past with a product called Checkpoint Firewall-1. I am unsure if it still exists. The company Checkpoint still does, though.

Playing around with the firewall wasn’t very hard. Of course, you need to learn the interface and the possibilities of the Firewall. I checked three videos on YouTube to get a head start. This video jumpstarted the head start for me.

As I progressed and got all the firewall rules in place as I wanted them, I really wanted to block off certain countries to be able to reach my webserver, which is behind a nginx reverse-proxy. The Ubiquiti doesn’t have preloaded sets of country networks. And I would rather not add all the networks used by a country manually. This is a daunting task. If I check for my country for example, there are 5999 networks (date:2024-01-18). This is impossible. So this must be done smarter.

Adding a complete country to a network-group in EdgeOS

For this solution, we lean heavily on te website http://www.ipdeny.com/ with the following script I wrote.

I saved this script on the Edgerouter in my $HOME directory with the following name: create_networkgroup_countrycode.sh

#!/bin/sh

# Name: create_networkgroup_asn.sh
# Coder: Marco Janssen (mastodon [@marc0janssen@mastodon.online](https://micro.blog/marc0janssen@mastodon.online))
# date: 2024-01-17 21:30:00
# update: 2024-01-31 21:39:00

if [ $# -eq 0 ]; then
	echo "No parameters provided. Provide a countrycode. Example nl or de"
else
	countrycode="$1"
	NOW=$(date +"%Y%m%d")
	
	echo "*** Downloading networkaddress blocks for countrycode $countrycode"
	curl "http://www.ipdeny.com/ipblocks/data/countries/$countrycode.zone" -o "./$countrycode.zone" -s
	
	echo "*** Writing networkgroup script"
	echo "delete firewall group network-group $countrycode.zone" > "./networkgroup-$countrycode.$NOW.sh"
	echo "set firewall group network-group $countrycode.zone description \"All networks $countrycode\" on $NOW" >> "./networkgroup-$countrycode.$NOW.sh"
	sed -e "s/^/set firewall group network-group $countrycode.zone network /" "./$countrycode.zone" >> "./networkgroup-$countrycode.$NOW.sh"
	cp "./networkgroup-$countrycode.$NOW.sh" nwgs.sh
	
	echo "*** Archiving zone-list"
	mv "$countrycode.zone" "$countrycode.zone.$NOW"
	
	echo 
	echo "Now execute the following commands on the prompt of your Edgerouter"
	echo 
	echo "configure"
	echo ". ./nwgs.sh"
	echo "commit"
	echo "save"
	echo "exit"
fi

What will this script do?

  1. It will check if you give it a parameter with a single country code. For example, nl or dk or de.
  2. Then it will try to download the network address blocks for the country-code and save it in a file. For The Netherlands (if you give it country-code nl) it will create a file called “nl.zone”.
  3. Then it will try to write a script for you which creates a network group in the Edgerouter. The file will be called “networkgroup-nl.<date>.sh (if you give it country-code nl).
  4. The script which is generated in step 3 will be copied to a shorter name “nwgs.sh” for your convenience. You can archive the longer one in step 3 and use the shorter one in this step.
  5. The zone list used in step 3 will also be archiving for you in a format “nl.zone.<date>” (if you give it country-code nl).
  6. Finally, you get further instructions to use the script and create the network-group.

Running the script

  1. Get this script on your Edgerouter (ssh, scp, sftp) and place it in a directory of your likings. I place it in my $HOME on the router.

  2. Name the script “create_networkgroup_countrycode.sh”

  3. Make sure the script is executable: chmod +x ./create_networkgroup_countrycode.sh

  4. Run the script (in this example for The Netherlands, i.e., nl):
    ./create_networkgroup_countrycode.sh nl

  5. Execute the following commands after the script has run.

    configure . ./nwgs.sh commit save exit

A note of warning

For The Netherlands alone it will add 5999 networks to your Edgerouter. (Date: 2024-01-18). To run the generated network group script with the above command . ./nwgs.sh will take you some 18 minutes on the router. The following step commit will take you another 9 minutes on the router. If you now open your Edgerouter GUI, you will see the steps created a network-group called “nl.zone” of 5999 items. To open this group in the GUI takes a long(er) time. A reboot of the router takes 25 minutes with 5999 networks, don’t think your router is bricked…. It just needs loads of time to boot with this kind of lists.

What is next?

Now you have your network-group called “nl.zone” (for this example) in the Edgerouter. You can use it like any other resource in a firewall rule. You can now allow this network-group through your firewall and block all others that are not in this group (so allow only this country to your webserver or whatever). Or you can block this network-group from your webserver and allow all other countries. It’s up to you.

Adding a complete provider to a network-group in EdgeOS

Maybe for you, it is not necessary to allow or block complete countries. I started using the following method, to only allow certain providers in my country to reach my webserver. Why? First, I only share this content with family members so not all networks are needed to achieve this. Second I did not like the long boot times of the Edgerouter with a complete country list. It was not necessary for me to allow a complete country to my server, I just wanted my family members. Why didn’t you just allow their home IP address of their ISP, you would say? Well, they are dynamic, and I would rather not revise the rules often. So I allow their complete provider.

For this solution, I used to following URL’s, but maybe you have beter ones on the internet.

https://www.nirsoft.net/countryip/nl_owner.html

https://asntool.com/

https://www.textcleanr.com/

https://networksdb.io/

  1. Nirsoft gives a nice overview of all the providers with the IP-addressblocks.
  2. ASNTOOL helps to get all the networks in an Autonomous System.
  3. TEXTCLEAR helps to clean up the list you get from ASNTOOL.
  4. NETWORKSDB is an example of a website to find your ASN.

ASN stands for Autonomous System Number in networks. It is a unique identifier that is globally available and allows an autonomous system (AS) to exchange routing information with other ASes. An AS is a large network or group of networks that operates under a single routing policy. Each AS is assigned a unique ASN, which is a number used to differentiate and identify the AS in the global routing system. ASNs are essential for network operators to control routing within their networks and facilitate the exchange of routing information.

Save the following script in the $HOME of your Edgerouter (or any directory of your likings). And give it the name “create_networkgroup_asn.sh”.

#!/bin/bash

# Name: create_networkgroup_asn.sh
# Coder: Marco Janssen (mastodon [@marc0janssen@mastodon.online](https://micro.blog/marc0janssen@mastodon.online))
# date: 2024-01-17 21:30:00
# update: 2024-01-31 20:50:00

print_usage() {
  echo "No parameters provided. Provide an ASN with IP blocks. Example: AS1136."
}

create_networkgroup_script() {
  local asn
  local temp_filename
  local output_filename
  local archive_filename
  local networkgroup_script_filename
  
  asn="$1"
  temp_filename=".temp.txt"
  output_filename="$asn.txt"
  archive_filename="$asn.$NOW.txt"
  networkgroup_script_filename="networkgroup-$asn.$NOW.sh"

  echo "*** Writing new $asn output"
  whois -h whois.radb.net -- "-i origin $asn" | grep -Eo "([0-9.]+){4}/[0-9]+" | uniq -s 0 > "$temp_filename"

  echo "*** Getting owner of $asn"
  local owner
  owner=$(whois -h whois.radb.net -- "-i origin $asn" | grep "^descr:" | awk '{print $2}' | sort | uniq -c | sort -nr | head -1 | awk '{ print $NF }')
  echo "--- Owner of $asn: $owner"

  echo "*** Checking for changes in $asn"
  if [[ -f "$output_filename" && $(diff "$output_filename" "$temp_filename") == "" ]]; then
    echo "--- No Changes in $asn"
    
    echo "*** Cleaning temporary output"
    rm "$temp_filename"
    
  else
    echo "*** Writing networkgroup script for $asn"
    cat <<EOF >"$networkgroup_script_filename"
delete firewall group network-group $asn
set firewall group network-group $asn description "All networks $asn by $owner on $NOW"
$(sed -e "s/^/set firewall group network-group $asn network /" "$temp_filename")
EOF

    cp "$networkgroup_script_filename" nwgs.sh

    echo "*** Archiving $asn output"
    cp "$temp_filename" "$archive_filename"
    mv "$temp_filename" "$output_filename"

    echo 
    echo "Now execute the following commands on the prompt of your Edgerouter"
    echo 
    echo "configure"
    echo ". ./nwgs.sh"
    echo "commit"
    echo "save"
    echo "exit"    
  fi
}

main() {
  if [[ $# -eq 0 ]]; then
    print_usage
  else
    
    NOW=$(date +"%Y%m%d")
    ASN="$1"
    
    readonly NOW
    readonly ASN
    
    create_networkgroup_script "$ASN"
  fi
}

main "$@"

What will this script do?

  1. It will check if you give it a parameter with the name your ASN. For example, AS1136.
  2. Write a textfile with all the networks in the AS
  3. Try to get the owner of an AS
  4. Then it will try to write a script for you which creates a network group in the Edgerouter. The file will be called “networkgroup-AS1136.<date>.sh (if you give it ASN AS1136).
  5. The script which is generated in step 4 will be copying to a shorter name “nwgs.sh” for your convenience. You can archive the longer one in step 4 and use the shorter one in this step.
  6. Finally, you get further instructions to use the script and create the net-workgroup.

Running the script

  1. Find the ASN you like to use for your network group. This can be done, for example, with the following site to find your ASN: https://networksdb.io/

    Another way to get and ASN for your desired provider is to look up their IPblocks. I do this with a site from Nirsoft, https://www.nirsoft.net/countryip/nl.html. Here with the IPblocks for The Netherlands. If you want to have the ASN for a provider called “Alma International B.V.” for example, you just take the first available IP-address in their block “2.16.0.1”.

  2. Get the above script on your Edgerouter (ssh, scp, sftp) and place it in a directory of your likings. I place it in my $HOME on the router.

  3. Name the script “create_networkgroup_asn.sh”

  4. Make sure the script is executable: chmod +x ./create_networkgroup_asn.sh

  5. Run the script (in this example for Alma International B.V., i.e., AS20940):
    ./create_networkgroup_asn.sh AS20940

  6. Execute the following commands after the script has run.

    configure . ./nwgs.sh commit save exit

A note

These network-groups are considerably smaller, I don’t really notice any extra boottime of the router.

What is next?

Now you have your network-group called “AS20940” (for this example) in the Edgerouter. You can use like it like any other resource in a firewall rule. You can now allow this network-group through your firewall and block all others that are not in this group (so allow only this provider to your webserver or whatever). Or you can block this network-group from your webserver and allow all other providers. It’s up to you.

📝

✏️ Uittredingsdatum

Met pijn in haar vingertoppen hangt Emma aan de gevel van de lokale kerk in haar dorp. Uiteraard in het donker, ze mag niet gezien worden door de lokale wetsdienaar. Ze heeft dit al vaak gedaan. Niet alleen hier hangend aan de kerk, maar ook aan andere hoge en gevaarlijke objecten. Het beoefenen van parkour zit al 12 jaar in haar bloed vanaf haar 15de. Het jaar dat ze leerde over haar uittredingsdatum op haar geboorteakte. Zoals bij alle kinderen op die leeftijd wordt die datum dan ceremonieel in de kerk bekend gemaakt. Het maakt het kind direct bewust van de keuzes die gemaakt moeten worden en het pad dat gevolgd moet worden in het tijdsbestek op aarde.

Niemand weet hoe laat het zal gebeuren en op welke wijze op die bewuste datum. Dat is in de handen van God, maar de datum staat vast. Iets om naar toe te leven en te werken. De kinderen die leren dat ze maar een beperkte tijd op aarde hebben, moeten vaak intensief begeleid worden. In sommige gevallen tot mentale problemen aan toe. Vanaf het moment dat Emma wist wat haar uittredingsdatum was, voelde het voor haar als een bevrijding. Ze kon haar tijd gaan indelen, plannen maken, haar leven uitstippelen. Welke dingen deed ze niet en welke dingen deed ze juist wel? Het besef kwam al snel dat haar keuzes en handelen niet tot haar dood zouden leiden, althans niet tot een dag voor die bewuste datum. Fatalistisch is ze nooit geworden hierdoor, maar het maakte wel dat ze koos de meer extreme sporten en hobbies uit te oefenen. Met bijbehorende ziekenhuisopnames uiteraard. Maar doodsangsten hebben haar ouders nooit gehad.

Vrienden maken was soms lastig. Vooral als ze haar datum met een potentiële levenspartner uitwisselde en waarvan bleek dat zijn datum erg verschilde met die van haar. Dat maakte het vaak tot een korte amoureuze relatie, maar nooit tot die bestendige relatie die ze zocht. Dit heeft haar wel getekend door de jaren heen. Het maakte dat ze zich alleen voelde. Natuurlijk was er de warme band met haar ouders en vriendinnen, maar dat was toch anders. Die vriendschapsbanden met vriendinnen waren vaak wel diepe en innige verstandhoudingen, gezien de tijd die er dan bleek te zijn als de data werden uitgewisseld.

Emma haar datum is morgen, morgen zal er een einde komen naar haar tijd. Daarom hangt ze nu voor de laatste keer aan de gevel, de gevel van de kerk die ze al zo vaak beklommen had. Deze dag, voor middernacht, kan ze dat nog ongestraft doen. Wanneer ze met een mooie salto afspringt van de richel aan kerkmuur, denkt ze aan morgen. Ze heeft met een aantal vriendinnen afgesproken. Ze wil er geen heisa van maken. Het moet een mooie dag worden. Wat ze morgen gaat doen met die vriendinnen weet ze eigenlijk nog niet zo goed. Moet ze haar hart volgen en gaan bungee-jumpen of parachutespringen? Of wordt het een gezellige, maar misschien fatale high tea? 📚📝

✏️ Zeevisser

Met de zilte zeewind door onze haren staken we de zeedijk bij Borssele over. Lopend uiteraard want tante had de auto geparkeerd onderaan de dijk. De zon was zo fel en zo heet dat het asfalt gesmolten was en de zolen van onze schoenen bleven plakken aan de zwarte ondergrond. We gingen het strand op, daar wilde je zijn als kind. Rennen op het strand en het liefst ook beestjes vangen. Want als kleine jongen uit de Betuwe hadden we die mooie kwalletjes en krabbetjes niet in de boomgaarden.

Het strand van Borssele voorzag in een voor ons grote en handige attractie in dat opzicht. Een soort wildwaterbaan over het strand waar je alleen maar je schepnetje in hoefde te houden om de mooiste creaties uit de zee te vangen. Dat ze wat suf waren door de klappen van de koelwaterpompen van de kerncentrale dat deerde niet als jonge zeevisser. We stonden tussen de grote zeemeeuwen aan de rand van de stroom die ook hun slag sloegen. Best indrukwekkend wanneer die zeemeeuwen duidelijk maakten dat ze ook een plaats hadden langs deze fastfood van zeedelicatessen.

’s Avonds zaten de gevangen krabbetjes allemaal in miniatuur zeeaquaria op het balkon van het appartement van mijn tante. Ieder in zijn eigen Tupperwarebakje, want daar grossierde mijn tante dan weer in. Velen van hen, als niet allemaal, hebben hun laatste rustplaats in de tuin van het appartementencomplex gevonden.

Jaren later vertelde mijn tante dat je het strand niet meer zou herkennen. De kerncentrale stond er uiteraard nog maar het strand zou opgeslokt zijn. Niet door de zee, maar door de groter wordende energievraag. Ik weet het niet, ik ben er nooit meer wezen kijken. Zou ook niet meer weten waar we parkeerden. Dat zie je natuurlijk ook niet zo goed vanaf de achterbank tussen de schepnetten en de plastic bakjes. ✏️🗺️🌱

✏️Duik horloge

De slagen van de klok in de kerktoren gaven aan dat ik opnieuw te laat voor het avondeten zou zijn. Klokkijken was nog geen van mijn basisbekwaamheden in die tijd. Ik had van mijn ouders wel een mooi duikhorloge gekregen. Daar zat zo’n handige ring op die moeders op vijf uur draaide, zodat ik kon zien wanneer ik moest gaan rennen. Maar ja, als je aan het voetballen bent in de tuin achter het gemeentehuis en je bent aan het winnen, dan helpt zo’n duikhorloge ook niet om vijf uur.

Ik rende onder de kerktoren door, langs de gracht, zo door de poort naar huis. Ik wist dat moeders niet met open armen klaar zou staan. Dit was al de zoveelste keer namelijk. En op tijd thuis voor het eten was een norm die gehaald moest worden bij ons thuis. Mijn vader was diabeet en in die dagen was discipline en aardappelen wegen het enige voor hem waarmee hij controle hield. En die discipline werd ook van mij verwacht, van een jonge voetballer met duikhorloge.

Het eten smaakte goed, al was moeders wel op oorlogspad met me. Er werd niet veel gezegd aan tafel. Ik wist ook al welke penalty ik tegen zou gaan krijgen. In de tijd tussen het bidden na het eten en de enkele reis slaapkamer, kreeg ik nog even een opfrisser van het duikhorloge. Geslagen werd er nooit, maar een eenzame opsluiting was er geregeld voor me.

Want voetballen doe je namelijk met genopte schoenen en niet met een deel van een duikuitrusting. Vader werd nooit kwaad, hij was ook een voetballer. Hij snapte me wel. Hij zou me waarschijnlijk ook eerder een wedstrijdklok gegeven hebben dan een duikhorloge.

Het slaapkamerraam gaf een prima uitzicht op de buurt en ik droomde alweer het volgende duel in de tuin achter het gemeentehuis. ✏️⚽︎📖

✏️ Papa’s Goede Werk

Hij kon alles horen, maar durfde zijn ogen niet te openen. Liggende in de kast onder de trap hoort hij de soldaten schreeuwen. Zijn moeder heeft de grootste moeite om ze buiten te houden. Plots hoort hij haar gillen.

‘Als papa eens hier zou zijn,’ fluistert de kleine Aleksandr in zichzelf. Hij balt zijn kleine knuistjes. Mama heeft hem duidelijk verteld dat hij, hoe dan ook, onder de trap moest blijven. Papa doet goed werk voor Oekraïne, was hem verteld. Wat papa precies deed, wist de kleine man niet. Maar het zou niet lang meer duren of papa zou thuiskomen.

Hij had tegen zijn moeder gezegd dat als hij later groot zou zijn, hij ook dat goede werk van papa wilde doen. Voor Oekraïne, net als papa. Maar Aleksandr hoopte wel dat dan de oorlog voorbij zou zijn.

Plots gaat de deur van de kast met een ferme zwaai open. Mama staat in de deuropening. ‘Alles is weer rustig, Aleksandr,’ zegt ze en probeert het trillen van haar stem te verbergen. Haar haren zien er verwilderd uit, haar kleren lijken in de plooi getrokken. Door de zwarte vegen op haar wangen ziet de kleine man sporen van tranen lopen, maar mama tovert een lach op haar gezicht.

Aleksandr zijn knuistjes ontspannen, ‘Als papa eens hier zou zijn,’ denkt hij. 📝🎨

✏️ Altijd een beproeving

Afgepeigerd na het sporten dekt Frits in de keuken. Na het verlies van zijn eerste 93 kilo nog altijd een terging. Zijn vrouw vergt het uiterste van hem. 🏃‍♂️🏃‍♀️🏃

✏️ Tuinslangtrots

Na vijf jaar loopt hij toevallig door haar straat. Terwijl ze rustig de tuin water staat te geven, pikt ze een glimp op van hem door de struiken aan de rand van haar perceel. Ze voelt de woede weer, de vernedering van die zak hooi.

Wanneer hij in zijn dandy outfit voorbij komt aan haar voortuin, draait ze zich expres naar hem toe. De straal van de tuinslang recht in gezicht van de nieuwe vlam aan zijn zijde.

‘Hé, jij hier?’, lacht ze. Wat opgelucht dat hij niet de getroffene is, zegt hij, ‘Joh, wat leuk je weer te zien. Weer eens afspreken?’

Terwijl de inmiddels gebluste vlam haar make-up fatsoeneert en hij geen aandacht voor haar heeft, weet ze, ‘Eens een zak hooi, altijd een zak hooi.’ En blust hem ook nog even na met de tuinslang. ✏️🌱💬

✏️ Glorieuze kampeermomenten

Hij wilde eigenlijk niet naar buiten op een avond als deze. De regen stroomde langs het tentdoek naar beneden. Met hoge nood toch haastend naar de campingwc. Hij kon ternauwernood de toiletrol droog houden. Met het water in zijn sportschoenen en onder hoge druk, was dan toch de verlossing nabij.

Kak, campingpas vergeten. 🏕️⛺️📝✏️

✏️ Driemaal Scheepsrecht

Ze stond al meer dan een half uur voor zijn deur. In de regen, maar dat deerde haar niet. Haar blik gefocust op de knop van de deurbel. Ze twijfelde of ze zou gaan drukken. Of het nog gepast was om te drukken. Ze wist dat ze dit keer te ver was gegaan. Ze wist dat het nu mogelijk te laat was. Te laat om nog excuus aan te bieden.

Weer keek ze vertwijfeld naar de deurbel. Haar anders zo mooie haren zagen er niet uit door de regen. Wat zou ze moeten zeggen? Hoe zou hij reageren? Het was al de derde keer geweest, maar toch kwam ze altijd terug naar hem.

De andere keren was het onwetendheid. Dommigheid. Onoplettendheid. Maar nu had ze beter moeten weten, beter voorbereid moeten zijn op de valkuilen. Het ging allemaal ook zo snel. Alsof ze er ingeluisd was. Maar ze besefte dat ze zelf had moeten opletten.

Als ze uiteindelijk omdraait en weg wil rennen, komt hij met een ferme pas de tuin ingelopen. ‘Ik kom net bij de slager vandaan’, roept hij. Snel beschermt hij haar voor de regen en opent de voordeur. ‘Schatje’, zegt hij, ‘als we morgen weer kunnen barbecueën zal ik dan maar de hamburgers doen? Driemaal laten verbranden is scheepsrecht hé’. 📝✏️

📟Pretty Good Privacy with keybase.io

2020 : This post is obsolete since Keybase was acquired by Zoom.

Used PGP back in the 90s just because it was possible. The internet was growing, and my friends and I liked to experiment in those days with all that we found on the internet. PGP was one of those things. We had great fun back then, but never used it again the following decades.

But a few days ago I saw a talk from Mike Godwin about privacy on the internet. He pointed out https://www.keybase.io/ in his talk as a start to set up PGP and ways to communicate with him.

I got curious again about PGP and Keybase.io, and I had no trouble at all to quickly set up an account and a PGP key pair with these guys. They have nice low-level tooling to encrypt and decrypt messages on their website.

What I wanted again was a way to have my email encrypted, like I had back then in the 90s when my friends and I played around with it. I found a great tutorial on the internet from the Electronic Frontier Foundation on how to het PGP setup on a MAC.

It is set up with Thunderbird Mail Client and within this tutorial they let you generate a PGP key pair with GnuPG. Which will do the job, but I wanted to set it up with my Keybase.io key pair. I needed to export my Keybase.io key pair to the GnuPG keychain.

Reading the docs at their site, I found out that I could pull my Keybase.io Key to GnuPG keychain by the following command.

keybase pgp pull-private --all

But this gave me the following error

▶ ERROR .keys doesn't exist

Just following this workaround to fix it.

Make sure that in the linked device to your keybase.io account, the option “Forbid account changes from the website” is disabled in the advanced settings. By disabling this option, more possibles are enabled on the keybase.io site. One of them is to export your private key.

After you have disabled this option on your device, go to the website of keybase.io and visit your profile page. And find an “edit” link behind the signature of the public key. Select the edit link, and you get the option to export your private key.

Copy the key and save it to your desktop. Use the following command to import the private key to the GnuPG keychain. Where “Private_Key.asc” holds your private key.

gpg2 --allow-secret-key-import --import Private_Key.asc

Also save your public key to your desktop. And import this one with the following command. Where “Public_Key.asc” holds your public key.

gpg2 --import Public_Key.asc

This serie of actions will replace the generation of a PGP key pair with GnuPG and import your keybase.io key pair.

Don’t forget to delete your private key from your desktop.

Make sure it’s cleaned up!

Now finish the thunderbird tutorial from EFF with the keybase.io key pair. And you have a PGP mailclient setup with keybase.io. There is also a nice integration possible with the macOS MAIL.APP with https://gpgtools.org, but this requires a paid license. Whatever suites your needs.

Ok, I hope this helps you.

Find me here on keybase.io and if you like to send me a PGP encrypted email, here is my public key. But this one can also be found on keybase.io.

Oh, and don’t forget to send me your public key or your keybase.io profile page, so I can download your public key if you shared it. If you want a message back, of course ;-).

Use the following command to pull in my public key in your GnuPG keychain. And a follow on keybase.io.

curl https://keybase.io/marc0janssen/pgp_keys.asc | gpg2 --import

keybase follow marc0janssen

Thanks for reading! 📝🖋️

👨🏽‍💻Starbit Commander

This game is my first coding for The BBC Micro:bit. The goal is to have a nice target to practice and learn microPython on this device. But first I wanted to have a go on the makeCode editor for the Micro:bit.

I made this simple little game. Flying a spaceship through an astroid field. Occasionally, a blinking power-up will appear. This gives the advance to survive an astroid collision. Catching two power-ups will destroy all astroids in the field. Astroids will speed up in time, but slow down if a double power-up is acquired.

To edit this repository in MakeCode.

🎮🖖🏻🚀

👨🏽‍💻Simple Simon Says

The game Simon in the late 70s was maybe the first “computer” game I played. Well, perhaps it was a real computer. I was just a kid, but the game always stayed with me. In my mind, that is. The game was from a friend, and we played it for ages.

Now with the Micro:bit I wanted to revive this memory and use the Micro:bit as a vehicle to get this to life again. Below is my make code attempt. I used a Micro:bit version2 for this.

This Simon listens to Button A, Button B, Button C (the touch sensitive logo), Button D (= Button A+B).

It was fun to create and a good way to set me off with the possibilities of the Micro:bit…

To edit this repository in MakeCode:

✏️ Kleine baguette met gerookte kipfilet

Weer op weg naar huis met de trein. En elke dag staat hij daar bij de ingang, of uitgang zoals je wilt, van het station. Dagelijks groet hij de mensen die hun trein moeten halen, in de hoop dat hij een groet terug krijgt. En natuurlijk een kleine bijdrage. Velen lopen hem voorbij en groeten niet eens. 

Ik zie hem bijna dagelijks, hij groet me dan ook bijna dagelijks. En dagelijks wordt de sociale druk voor mij groter. Hij lijkt elke dag vriendelijker te worden. Hij spreekt me altijd beleefd aan en nooit opdringerig. Hij is gewoon vriendelijk en dat is zijn sterke kant.

Ik heb me voorgenomen om geen geld te geven. Dat is niet helpen. Ja, van de wal in de sloot. Nu ben ik niet mijn broeders hoeder, maar ik wil ook dat hij geen rotzooi koopt. Het is natuurlijk een groot vooroordeel wat ik hiermee heb. Alsof iedere persoon die op deze manier in zijn dagelijkse onderhoud moet voorzien, rotzooi koopt van het geld dat hij ophaalt.

Maar ik heb toch besloten om hem in natura voor zijn vriendelijke groet te betalen. Ook vandaag groet hij me weer beleefd en ik ben ook weer vriendelijk naar hem. Maar in plaats van direct naar perron vijf te lopen, neem ik even de afslag naar de Hema op het station. Ik kijk naar alle lekkere broodjes en schat in dat deze heer vandaag wel eens zin zou kunnen hebben in een kleine baguette met gerookte kipfilet.

Als ik terugloop naar de ingang van het station en hem aanspreek, kijkt me hij enigszins verbaasd, maar erg dankbaar aan. Ik zeg hem dat ik hoop dat het broodje hem zal smaken en wens hem een fijne dag. Hij dankt me beleefd en allerhartelijkst. Je ziet het geluk in zijn ogen. Het geeft me een goed gevoel. Ik maak uiteindelijk nog een kort praatje met hem, maar dan wil ik toch echt mijn trein halen op perron vijf.

Ik heb deze man nog jaren gegroet bij het station en vaker een broodje gekocht. We zijn nu sinds corona 3 jaar verder, ik ben weinig meer op het station. Het is nu thuiswerken. Ik denk nog wel eens aan hem. En of hij nu nog steeds bij het station staat. En of hij soms nog wel eens wat te eten krijgt van iemand. Of eigenlijk hoop ik dat hij zelf dat broodje kan gaan kopen, want dat zou ik deze vriendelijke man van harte toewensen. 🍞✏️🗺️

✏️ Een inclusieve Kerst

Nadine zat wat beteuterd aan het kerstontbijt op eerste Kerstdag. Er stond van alles op tafel. Kaiserbroodjes, een kerststol, de meest uiteenlopende vleeswaren en 1001 soorten zoetwaren.

Maar haar aandacht was gevestigd op de gingerbread poppen en een grote ontbijtkoek. “Zeg mam”, zei Nadine, “zijn we nu wel gemberneutraal voor de Kerst?” 🍞🎨📝

✏️ Keuzebegoocheling

Ze woonde al 15 jaar bij deze familie. Ze had nooit ergens anders gewoond en wilde ook nergens anders naartoe. Ze was bij hen gaan wonen direct na haar geboorte, zo’n acht weken later. Ze had vaak gehoord, “We hebben haar gekozen omdat ze de enige grijze was”.

Maar ze wist wel beter. Een eeuwenoude onwetendheid onder de mensen, maar een goed bewaard geheim door haar soort. Iets wat van generatie op generatie wordt overgedragen. Haar soort hield de mythe voor hun eigen gewin in stand. Ze moesten boven alles niet op de tenen van hun dienaren trappen. Zeker geen slapende honden wakker maken.

Na 15 jaar en vele fijne momenten met catnip verder, heeft ze nooit echt spijt gehad van haar keuze. Ze bleef de indruk wekken dat haar dienaren haar gekozen hadden. Iets wat de mensen geloven, maar wat haar soort al eeuwen lang wist af te dwingen. 🐈🐱✏️

✏️ Explosieve vrienden

In tegenstelling tot andere illegalen, word je in bepaalde kringen met open armen ontvangen. We zouden er samen, op die speciale avond, een knallend feest van maken. Alleen op dat ene verraderlijke moment veranderde de kameraadschap. Het kostte me mijn rechterhand. Je verdween ineens en plotsklaps, maar liet veel verdriet en spijt achter. 📝✏️

✏️ Vrijwillig verplicht

De kalkoen gebraden, met eenzijdige instemming. ✏️📝🍞

✏️ Groen adoptiekind

Zo’n tien jaar is hij daar opgegroeid, tussen zijn familie, zijn vrienden en soortgenoten. Maar vandaag wordt hij geadopteerd, losgemaakt van zijn roots. Op een speciale avond met hem, wil iedereen hem zien. Hij hoort er voor nu echt bij. In deze periode, een speciaal plekje in ieders hart. Voor twee weken dan. 📝,✏️

✏️ Heeft geluk ook een prijs?

Gehaast verlaat ik het kantoor aan de Koningskade, ik moet de trein naar Utrecht CS halen om 20:55 vanaf Den Haag Centraal. Het is iedere keer hetzelfde liedje, ook vandaag weer. Te veel werk en te weinig uren in een dag. Fatsoenlijk een trein halen, zodat je jezelf niet een ongeluk hoeft haasten, is er niet bij. Ik doe het zelf, moet gewoon ook eerder weggaan.

Snel de spullen ingepakt om 20:30. De jas aantrekken doe ik in de lift, terwijl deze te langzaam naar beneden zakt. Er is tijd genoeg vanaf de 15de etage om jezelf aan te kleden. Eenmaal op straat is het donker en koud. De Koningskade is druk met auto’s die, vanaf de A12 via de Zuid-Hollandlaan, de kruising opdraaien. Ik moet lang wachten bij de verkeerslichten. Ik heb minder dan 20 minuten om de trein op spoor vijf te halen.

Terwijl ik wacht bij de kruising hoor ik ineens een gedempte stem. Onverstaanbaar voor mij door het voorbij razende verkeer. Ik kijk om me heen. Er staat een jonge vrouw een meter of drie bij me vandaan. Ze is, net als ik, de enige op dit tijdstip bij de oversteekplaats. Omdat ik haar wat te lang en vragend aankijk, kijkt ze geïrriteerd terug. Tot de vraag, wat zegt u?, komt het niet. Ze moet het wel geweest zijn, maar wat zei ze?

De verkeerslichten bij de zebra springen plots op groen en in een snelle draf steek ik over naar het Malieveld. Ik loop alleen, vluchtig over het voetpad langs de bomen. Wanneer ik naar links kijk, zie ik het donkere gapende gat van het Malieveld. Plots hoor ik opnieuw de gedempte stem. Weer versta ik niet wat er gezegd wordt. Ik kijk om me heen, maar zie niemand. Althans, niemand die dichtbij genoeg is. Ik begin te twijfelen aan mezelf. Is er iets met me?

Ik loop verder langs het paviljoen en zo Koekamp binnen. De ganzen liggen stil in het koude donkere water. De bankjes langs het voetpad zijn leeg. Met een ferme pas loop ik door, richting het station. Als ik moet wachten bij de oversteekplaats van de Bezuidenhoutseweg hoor ik opnieuw de gedempte stem. Weer onverstaanbaar, maar ik realiseer me nu dat het onder me vandaan komt.

Op het moment dat ik buk om mijn nieuwsgierige oor op de tegels van het voetpad te leggen, knalt er ineens een Mercedes-SUV over de lage betonblokken. Op zijn zijkant vliegt deze over mij heen en landt op zijn dak achter me op het fietspad. Als ik verschrikt en trillend opsta, hoor ik de stem ineens weer. Dit keer heel duidelijk: “Je staat bij me in het krijt, gozer”. Ik kijk weer om me heen, maar de paar mensen die er zijn, rennen naar de SUV. Onwaarschijnlijk dat zij het geweest zijn.

De trillingen lopen me over de rug, wat is dit? Als door een naald gestoken, steek ik ineens de Bezuidenhoutseweg over en zorg ik dat ik als de wiedeweerga op dat perron terechtkom. Ik denk niet na, wil alleen maar weg, naar huis. Ik besef me nog niet helemaal wat er zojuist allemaal gebeurd is. Wanneer ik met de trein het station verlaat richting Utrecht, prent ik mezelf in dat het toeval was. Nee, het was geluk, ja dat was het. Geluk dat ik bukte, om te luisteren. Maar waar naar precies? Ik krijg het koud bij de gedachte, ben ik doelbewust geholpen? Maar door wie of wat? En erger, tegen welke prijs? 📝✏️💬

✏️ Afrikaanse exoten

Met een harde klap van de dichtgeslagen massief houten voordeur sta ik binnen. Net op tijd voordat de uit de kluiten gewassen veelvraten een kans krijgen om mijn schamele onderkomen binnen te dringen. Met miljoenen trekken ze door de natuurgebieden en landerijen. Ze zijn op zoek naar voedsel. Ze willen overleven, net als ik. Net als de mensheid op dit moment.

Het lijkt wel of ze de groenten ruiken die ik hier in huis verbouw. Hoeveel meer mensen dit hier in de omgeving ook doen weet ik niet. Ik heb al weken geen mens meer gezien. Ik weet überhaupt niet of er nog mensen in de buurt wonen. Alles is veranderd sinds die uitbraak van de gemodificeerde Afrikaanse exoten bij de staatslaboratoria. Ze zouden een nieuwe voedselbron zijn. De aarde zou niet meer te redden zijn met de megaveestapels van nu. Die exoten zouden de redding worden voor de mensheid, de aarde. Hoe heeft het zover kunnen komen?

De aarde lijkt langzaam te sterven. De schaarse berichtgeving die nog doorkomt op internet en in de media liegen er niet om. Grote delen van Nederland zijn kaal gevreten, mensen zijn op de vlucht. Op zoek naar eten gaan ze elke woning af. Alle landen in Europa melden zwermen van deze veelvraten. Jarenlang beleid voor het gebruik van groene gewasbeschermingsmiddelen in de landbouw vanuit Brussel heeft ervoor gezorgd dat er geen bestrijdingsmiddelen beschikbaar zijn die hier tegen opgewassen zijn. En de massa’s die nu over Europa trekken, hebben niets te duchten van eventuele natuurlijke vijanden. Die waren niet uit Afrika meegenomen met de bedoelde voedselbron.

Terwijl ik de zojuist bemachtigde mest en water verdeel over mijn groene goud, zwelt het geluid van de miljoenen exoten aan. Ik gluur door de kieren van de door mij dichtgetimmerde ramen. Plotseling wordt er stevig op de massief houten deur gebonkt. ✏️🌱📚

📺Setting Up Jellyseerr for Emby

Jellyseerr is a free and open source software application for managing requests for your media library. It is a a fork of Overseerr built to bring support for Jellyfin & Emby media servers! Follow this link for more info.

Docker

Docker-compose.yml

version: '3'
services:
    jellyseerr:
       image: fallenbagel/jellyseerr:latest
       container_name: jellyseerr
       environment:
            - TZ=Europe/Amsterdam
            - JELLYFIN_TYPE=emby
       ports:
            - 5055:5055
       volumes:
            - /path/to/dir/config:/app/config
       restart: unless-stopped

docker-compose -p "jellyseerr" -f /path/to/file/docker-compose.yml up -d --remove-orphans

Swag

NGINX - jellyseerr.subdomain.conf

The following code should be included in file at the following location: /path/to/dir/swag/config/nginx/proxy-confs/jellyseerr.subdomain.conf

The trick is to copy the jellyseerr.subdomain.conf.sample file to jellyseerr.subdomain.conf. You can create a new file from scratch, but the Swag startup could complain the file does not have to correct timestamp. This is a warning not a “showstopper”.

## Version 2022/09/08
# make sure that your dns has a cname set for jellyseerr and that your jellyseerr container is named jellyseerr

server {
    listen 80;
    server_name jellyseerr.*;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name jellyseerr.*;
        server_name jellyseerr.yourdomain.com;
        resolver 1.1.1.1 1.0.0.1 valid=300s;
        resolver_timeout 10s;
        gzip on;
        gzip_vary on;
        gzip_min_length 1000;
        gzip_proxied any;
        gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
        gzip_disable "MSIE [1-6]\.";
        
    location / {
            proxy_pass http://192.168.1.1:5055;
            proxy_read_timeout    90;
            proxy_connect_timeout 90;
            proxy_redirect        off;
            proxy_set_header      Host $host;
            proxy_set_header      X-Real-IP $remote_addr;
            proxy_set_header      X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header      Proxy "";
        }
        
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme; 
}

fail2ban - jail.local

Add the configuration below to the file: /path/to/dir/swag/config/fail2ban/jail.local

The path /jellyseerr_log/ should be added to your docker-compose.yml of SWAG.

This config let the intruder try 3 times, if failed within 10 minutes they’re blocked for 1 hour. IP’s from 192.168.1.0/24 are ignored.

[jellyseerr]

enabled		= true
filter		= jellyseerr
port		= http,https
logpath		= /jellyseerr_log/overseerr-*.log
maxretry	= 3
findtime	= 10m
bantime		= 1h
ignoreip	= 192.168.1.0/24

fail2ban - jellyseerr.conf

Add the following config to /path/to/dir/swag/config/fail2ban/filter.d/jellyseerr.conf

# Fail2Ban for jellyseerr
#
#


[Definition]

failregex = \[info\]\[Auth\]: Failed login attempt from user with incorrect Jellyfin credentials \{"account":\{"ip":"<HOST>","email":".*","password":"__REDACTED__"\}\}
ignoreregex =

📺🎮

🛜OpenWRT and Common Internet File System (CIFS)

This protocol is based on the widely used samba protocol. CIFS is a network protocol for sharing files, printers, serial ports, and other communications between computers. I gonna use this protocol to connect my NAS device to my OpenWrt-powered box.

Installing the packages

To get everything up and running, we need to install the following package on the linksys device, kmod-cifs_2.4.30-brcm-5_mipsel.ipk. If you wish, you can also install the mount helper package, cifsmount_1.5-2_mipsel.ipk. I decided not to do so.

A quick check

If we want to do a quick check if all is working, follow the following procedure.

root@Hellhound:~# insmod cifs
Using /lib/modules/2.4.30/cifs.o

Make a directory to mount the share on the remote machine.

root@Hellhound:~# mkdir /tmp/mnt

Now we can try to mount the share.

root@Hellhound:~# mount -t cifs //192.168.1.2/share /tmp/mnt -o unc=\\\\192.168.1.2\\share,ip=192.168.1.2,user=admin,pass=geheim ,dom=workgroup

Just double check it is mounted.

root@Hellhound:~# df
//192.168.1.2/share243748864 46485504 197263360 19% /tmp/mnt

Setting up the system

The above mount command is a hell of a command to execute every time you need your NAS device to be connected to your OpenWrt box. So, we are going to make life a little easier for yourself. We will edit the /etc/fstab. If you don’t have a fstab file, make one now. To the fstab file, we add the following line.

//192.168.1.2/share   /mnt/bulky   cifs  unc=\\192.168.1.2\share, ip=192.168.1.2,user=admin,password=geheim,dom=workgroup,rw 0 0

The cifs kernel module does not need to loaded separately. The package also installs the file /etc/modules.d/30-cifs. This will load the module at boot-time. Now we can mount the share with the following command.

root@Hellhound:~# mount /mnt/bulky

Since OpenWrt does not execute the command

mount -a

at boot-time, the configured mount points in fstab are not automagicly mounted at boot-time. To solve this, I added the mount command.

mount /mnt/bulky

to the file /etc/init.d/S95custom-user-startup. 📚📖🎮

🛜OpenWRT and SNMP bandwidth monitor

I would appreciate it if we could monitor the bandwidth of the network devices in our wrt54gs. To do so, we need SNMP enabled on our device and some kind of application to monitor the snmp messages. I choose PRTG to monitor the SNMP messages sent.

Installing the package

We need to install the snmp daemon on OpenWrt. So, we require the following package, snmpd_5.1.2-2_mipsel.ipk. Optionally, you van install the package snmp-utils_5.1.2-2_mipsel.ipk. Since I have my router modded with the MMC/SD card mod, I am going to install the package on this card with the following command.

root@Hellhound:~# ipkg -d opt install snmpd_5.1.2-2_mipsel.ipk

In my case, this will install the package on the mount point /opt. I will refer to this in the paper. Change it to your setup accordingly.

Set up the package

Now we need to set up the snmp package. If you install it in the root of linux, there is no problem. But if you installed op your MMC/SD card you need to take some extra steps. First we have to copy the /opt/etc/default, /opt/etc/init.d and /opt/etc/snmp to the /etc directory. Now we have to copy the file /etc/init.d/snmpd to the file /etc/init.d/S60snmpd. After copying this file, we have to add 2 lines to the script. This is only needed for the ones who have installed the package on the MMC/SD-card. The new file will look like this.

#!/bin/sh

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:
/opt/usr/bin:/opt/usr/sbin
export LD_LIBRARY_PATH=/lib:/usr/lib:/opt/lib:/opt/usr/lib

DEFAULT=/etc/default/snmpd
LIB_D=/var/lib/snmp
LOG_D=/var/log
RUN_D=/var/run
PID_F=$RUN_D/snmpd.pid

[ -f $DEFAULT ] && . $DEFAULT

case $1 in
start)
[ -d $LIB_D ] || mkdir -p $LIB_D
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
snmpd $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?

You can also follow the instructions on this page. You will need the script in paragraph 4.3. So, you don’t have to follow the instructions pointed out above here. Just follow the instructions on that page in paragraph 4.3.

What’s next?

You can now reboot your router and the snmpd daemon will start automatically. Now it is time to set up a monitoring tool. I used PRTG, but there are others around. It is out of the scope of this paper to describe the use of PRTG. There is enough material around to help you on that one. 📝🖋️

🛜OpenWRT and Snort

Set up snort on OpenWrt

After installing the MMC/SD card mod, I have enough room to install snort on my wrt54gs. So, this paper will assume that the package will be set up on the MMC/SD card. Which is mounted on /opt. You can read about setting up the MMC/SD card on this page.

Installing the package

To install snort on your wrt54gs install the following package

root@Hellhound:~# ipkg -d opt install snort_2.4.4-1_mipsel.ipk

This will install snort in the directory /opt.

Remote syslog

I want snort to log all its messages to a remote syslog server. I already discussed this on the page which discussed using fwbuilder with OpenWrt. Look on this page to set up wallwatcher.

Downloading rules files

We need to get some rule files. These rule files can be downloaded from the snort website. Download the snort 2.4 rule files from this website. These rule files need to be unpacked in the directory /opt/etc/snort/rules/

root@Hellhound:~# tar zxf snortrules-pr-2.4.tar.gz

Setting up snort

Now we have to set up the snort.conf file. In this file, many snort settings are configured. We want to set up snort in a way it will log all messages to our remote syslog, it this case wallwatcher. The first thing we have to do is to set the option HOME_NET

var HOME_NET 192.168.1.0/24

Next, we have to uncomment a line in the snort.conf file.

output alert_syslog: LOG_AUTH LOG_ALERT

We need to change the rules path

var RULE_PATH /opt/etc/snort/rules

At the bottom of the snort.conf there are a lot of rule files included. Make sure you comment all the rule files at first. Just to make sure that we do not flood the memory of the wrt54gs and hang the device when we start snort.

Make the directory snort in the directory /var/log

root@Hellhound:~# mkdir /var/log/snort

Giving snort a test run

To check if snort is running correctly on your device, give the following command on the prompt and open a website in your favorite browser.

root@Hellhound:~# snort -v -i vlan1

This will give you the following output

01/25-22:02:12.344117 195.37.77.141:80 -> 10.0.0.100:2053
TC`1 P TTL:46 TOS:0x0 ID:55048 IpLen:20 DgmLen:40 DF
***A**** Seq: 0xC5D2F3DE Ack: 0xBD63343B Win: 0x5B4 TcpLen: 20
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

End the test run by pressing crtl-C.

Running Snort

Now we know snort runs okay, we set up the rule files. These can be uncommented at the bottom of the /opt/etc/snort/snort.conf file. I would advise you to enable the rule files one by one and keep an eye on your memory usage. After each run of snort check your memory and determine if you can enable another rule. Run snort with the following command.

root@Hellhound:~# snort -c /opt/etc/snort/snort.conf -i vlan1&

Check your memory usage by the following command

root@Hellhound:~# top

If snort is detecting any “bad” traffic, it will be logged to your remote syslog server.

Checking your setup

Snort can be quiet sometimes, how do we check if snort is doing its job?? To check your setup, kill the snort proces that is running at the moment. Make sure you have the LOCAL.RULES enabled in the snort.conf file. Then edit local.rules and add the following line of code.

alert ip any any -> any any (msg:"Got an IP Packet"; classtype:not-suspicious; sid:2000000; rev:1;)

Now start snort with the following command

root@Hellhound:~# snort -c /opt/etc/snort/snort.conf -i vlan1&

And keep a good eye on your remote syslog server…. I will start logging network traffic. 📝🖋️