Microtic devices have a huge range of functionalities, but there are various strange and inexplicable limitations, which can make you wonder for a long time “WHY?”. It is a similar restriction, that only IP addresses for NTP servers can be placed in the dhcp pool settings, to be distributed to customers but not hosts. If we want to use a server from ntp pool and to distribute it to customers behind microtics we have a serious problem – or we need to put IP addresses from the ntp pool project, as they are currently being resolved, but we have no guarantee, that they will continue to work for the future or we have to think of another scheme. I decided to be either…

The Microtic OS offers the ability to writing scripts. I can not say, that I am an expert there, but I don't mind using it, when i need. We will briefly create a script, which resolves 4 The NTP server and then configure our dhcp pool with them. The script is quite simple:

{
:local s0 [resolve bg.pool.ntp.org]
:local s1 [resolve bg.pool.ntp.org]
:local s2 [resolve bg.pool.ntp.org]
:local s3 [resolve bg.pool.ntp.org]

/ip dhcp-server network set ntp-server="$s0,$s1,$s2,$s3" numbers=0
}

Then all we have to do is make the script run once a week, say – at least for me this is a very reasonable period and that, that I have 4 the NTP address is safe enough even if one of them stops working:

/system scheduler
add interval=1w name=ntpSet policy=\
    read,write,policy \
    start-date=nov/02/2020 start-time=20:17:14

DN42 is a wonderful project that allows you to develop your BGP skills without breaking the product environment, without having to have expensive devices to make a lab to do simulations with GNS3. At the same time, it should not be a purely laboratory environment in which there are no real-world problems. I participate with 1 node in the project for about a year. One of the problems in the project is 1:1 with the real world – when someone announces prefixes that they shouldn't announce. Because I'm lazy and I don't write filters by hand all the time, I solved the problem with an elementary bash script that generates a prefix-list named dn42 and I pour the valid prefixes in it.

#!/bin/bash</pre>
vtysh -c 'conf t' -c "no ip prefix-list dn42"; #drop old prefix list

while read pl
do
vtysh -c 'conf t' -c "$pl"; #insert prefix list row by row
done < <(curl -s https://ca.dn42.us/reg/filter.txt | grep -e ^[0-9] | awk '{ print "ip prefix-list dn42 seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g");
vtysh -c 'wr' #write new prefix list

The list of valid prefixes is taken https://ca.dn42.us/reg/filter.txt from where the main pipeline + a few modifications on my part to be able to generate prefix sheets. Commands are executed through vtysh.

For the 4th consecutive year, the conference on free software and hardware will be held TuxCon. Personally for me this is the strongest Plovdiv conference that is being held, as it is not only aimed at developers, and the target group is much larger and the audience is very colorful. If my memory serves me right, I don't think so, that I have missed an edition so far. This annual edition is especially for me, since I have a presentation. I will talk about dnsdist and whether it is useful for your infrastructure. I chose the topic I will talk about myself. I felt the need to show it to the world, as she is relatively young, and so far I have hardly found anything in it that I do not like. I don't remember the last time I was so impressed by something new and working extremely well at the same time.

As you know CentOS 5 е EOL (End-Of-Life) from March 31st 2017. Which leads to the following very interesting problem:

# yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
&amp;amp;amp;amp;nbsp;Eg. Invalid release/
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
&amp;amp;amp;amp;nbsp;Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/extras/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: extras

The problem is short, that lists the CentOS mirrors 5 they are already lost and when we try to take content directly we get the following refusal:

# curl 'http://mirrorlist.centos.org/?release=5&amp;amp;amp;amp;arch=i386&amp;amp;amp;amp;repo=os'
Invalid release

In general, the most sensible idea is to reinstall the tin with a normal distribution., which supports a working distribution upgrade. Unfortunately, this is not the case with me, and this is not an option on the table at all. So we had to play a bit of a gypsy scheme – we start using Vault mirror. In a moment of perfectly clear creature and common sense I know, that I will not receive, any updates that are not the purpose of the exercise, а искаме просто да има работещ yum с, който да инсталирам пакет, който ми е необходим. За целта за коментираме всички mirrorlist променливи и добавяме baseurl в /etc/yum.repos.d/CentOS-Base.repo. Накрая получаваме yum repo от вида на

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;amp;amp;arch=$basearch&amp;amp;amp;amp;repo=os
baseurl=http://vault.centos.org/5.11/os/i386/
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;amp;amp;arch=$basearch&amp;amp;amp;amp;repo=updates
baseurl=http://vault.centos.org/5.11/updates/i386/
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;amp;amp;arch=$basearch&amp;amp;amp;amp;repo=extras
baseurl=http://vault.centos.org/5.11/extras/i386/
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Finally we play a yum clean all && yum update. If everything ends without getting an error, then we have successfully completed the scheme and we can safely install the obsolete packages.

Mozilla Thunderbird

The idea is identical to my post Firefox databases VACUUM and REINDEX. For some time now, Debian has lost the rebranded versions of Mozilla products. When I migrated from Icedowe to Thunderbird, I thought about it, that I have not defragmented my database, and so far a serious amount of letters have leaked through my email client, email accounts and servers, users and passwords. The script is identical to the one from my previous post only with a slight modification for where to look for the files 🙂

Linux version

for db in $(find ~/.thunderbird/$(grep Path ~/.thunderbird/profiles.ini | cut -d'=' -f2) -maxdepth 1 -name "*.sqlite" -type f)
do
echo "VACUUM ${db}"
sqlite3 ${db} VACUUM
sqlite3 ${db} REINDEX
done

Mac os version

for db in $(find ~/Library/Thunderbird/$(grep Path ~/Library/Thunderbird/profiles.ini | cut -d'=' -f2)  -maxdepth 1  -name "*.sqlite" -type f)
do
echo "VACUUM && REINDEX ${db}"
sqlite3 "${db}" VACUUM;
sqlite3 "${db}" REINDEX;
done

Unlike Firefox's profile folder, Thunderbird's is in a pretty good way (without space) and no change to the delimiter is required.