Tango Luxembourg using private IP addresses for Fiber internet access

When I moved in Luxembourg, I subscribed to Tango Luxembourg Fiber internet access. Back then, I got the usual dynamic public IP address “for free”. It was changing every 36 hours but at least it was a public one. Recently, I changed my subscription to the 1 gigabit/s offer and soon after, I realized my VPNs and 6to4 tunnel was not working anymore. After a brief troubleshooting session, I found out I was receiving a private IP address instead of the usual public 94.252.x.x . ...

August 11, 2021 · 2 min

Deprecation of apt-key in Debian-based distributions

I recently installed an Ubuntu 21.04 and when I wanted to install Atom editor, I was given the following warning about apt-key being deprecated: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). After a bit of Googling around, I stumbled on this post on askubuntu.com explaining why apt-key was being deprecated. Then the folks at docker.com give a nice easy command to convert an old PGP key in base64 to a keyring. ...

August 7, 2021 · 1 min

Gitlab-runner and docker behind a proxy

After reading many articles and trying many things, this is how I solved it. For docker daemon itself to use a proxy, configure environment variables using systemd file /etc/systemd/system/docker.service.d/http-proxy.conf : [Service] Environment="HTTP_PROXY=http://user:pass@proxy.domain.com:3128/" Environment="HTTPS_PROXY=http://user:pass@proxy.domain.com:3128/" Environment="NO_PROXY=localhost,docker,*.domain.com" For gitlab-runner daemon itself to use a proxy, configure environment variables using systemd file /etc/systemd/system/gitlab-runner.service.d/http-proxy.conf : [Service] Environment="HTTP_PROXY=http://user:pass@proxy.domain.com:3128/" Environment="HTTPS_PROXY=http://user:pass@proxy.domain.com:3128/" Environment="NO_PROXY=localhost,docker,*.domain.com" Reload systemd and restart docker daemon: systemctl daemon-reload systemctl restart docker For git commands run by gitlab-runner to use a proxy, use gitlab-runner config file. In /etc/gitlab-runner/config.toml , under [[runners]] , add the following line: ...

August 3, 2021 · 1 min

Post install steps with Gitlab

It happens I recently had to install Gitlab and was a bit lost about what to do right after the setup finished, perhaps this will help. By default, Gitlab stores its data files in /var/opt/gitlab and its backups in /var/opt/gitlab/backups. It would be a good idea to use dedicated partitions for each of those directories. Let’s say you use /dev/sdb1 for Gitlab data and /dev/sdc1 for the backups. gitlab-ctl stop mkdir /mnt/gitlab mount /dev/sdb1 /mnt/gitlab mkdir /mnt/gitlab/backups mount /dev/sdc1 /mnt/gitlab/backups tar -C /var/opt -cf - gitlab | tar -C /mnt -xpsf - umount /mnt/gitlab/backups umount /mnt/gitlab mv /var/opt/gitlab /var/opt/gitlab.old mkdir /var/opt/gitlab mount /dev/sdb1 /var/opt/gitlab mount /dev/sdc1 /var/opt/gitlab/backups gitlab-ctl start Do not forget to edit /etc/fstab. Configure your timezone: https://docs.gitlab.com/ee/administration/timezone.html Note: all usual timezones are not available. ...

July 22, 2021 · 3 min

IPsec tunnel between Ubuntu 20.04 and Mikrotik router using strongSwan

Here is how to establish an IPsec tunnel between an Ubuntu 20.04 host and a Mikrotik router using IKEv2. The 2 endpoints of the tunnel are: ubuntu.xentoo.info : the Ubuntu server. This server has a local private subnet 10.0.0.0/24 and a fixed public IPv4 address 1.2.3.4 . The hostname ubuntu.xentoo.info resolves to the public IP address. mikrotik.xentoo.info : the Mikrotik router. This router has a local private subnet 192.168.0.0/24 and a dynamic public IPv4 address. I will use fqdn identifiers, pre-shared-key and both IKE and ESP will have the same parameters: ...

March 6, 2021 · 3 min

Install Firely III on Ubuntu 19.04

“Firefly III” is a (self-hosted) manager for your personal finances. You can find more about it on the following sites: https://github.com/firefly-iii/firefly-iii https://docs.firefly-iii.org/ Install prerequisites Let’s first install the requirements to run Firefly. Firefly documentation says it runs on PHP 7.2 but that’s wrong, it needs >=7.3 . Unfortunately, Ubuntu 19.04 comes with PHP 7.2 by default, so we need to use a PPA to have a more recent version. ondrej/php PPA has version 7.4 at this time, that will be perfect. ...

January 5, 2020 · 3 min

Using a Mikrotik router with Tango Fiber (Luxembourg)

Hi guys, I moved to Luxembourg and I have opted for Tango Fiber. Their router is a Fritz!box which I do not like at all. I have a spare Mikrotik router, so here is how to configure. Tango Fiber uses PPPoE over VLAN 35, MTU is 1480. You need to ask the PPP credentials via a contact form on the website, they will answer within a few days. I have decided to use ether1 to connect the Fiber and create a VLAN interface named ether1.35 on it. ...

May 26, 2018 · 1 min

Compile pjsip with pjsua on Ubuntu 16.04

As a personal note to myself :-) apt-get install make gcc pkg-config libasound2-dev wget http://www.pjsip.org/release/2.6/pjproject-2.6.tar.bz2 tar -xjf pjproject-2.6.tar.bz2 cd pjproject ./configure && make dep && make sudo make install sudo cp pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu /usr/local/bin/pjsua That’s it!

May 4, 2017 · 1 min

Extend snmpd to add detailed CPU statistics, per CPU (again)

For easier use with Cacti, it is easier to group statistics per type instead of per CPU. So you would have a parent OID for CPU time spent by user with many values (one per CPU). Put the following in /etc/snmp/percpudetail: #!/bin/bash case "$1" in "user") grep ^cpu /proc/stat | awk '{print 2}' ;; "nice") grep ^cpu /proc/stat | awk '{print 3}' ;; "system") grep ^cpu /proc/stat | awk '{print 4}' ;; "idle") grep ^cpu /proc/stat | awk '{print 5}' ;; "iowait") grep ^cpu /proc/stat | awk '{print 6}' ;; "irq") grep ^cpu /proc/stat | awk '{print 7}' ;; "softirq") grep ^cpu /proc/stat | awk '{print 8}' ;; esac Make it executable: ...

April 14, 2017 · 1 min

Extend snmpd to add detailed CPU statistics, per cpu

I needed to export detailed CPU statistics from Linux servers using SNMP. While UCD-SNMP-MIB export some detailed stats, it only does it for the whole system. I may have missed something easier though :-) So here is a BASH script, put it in /etc/snmp/percpustats: #!/bin/bash /bin/grep "^$1 " /proc/stat | sed -e 's/^cpu[0-9]* *//' | tr ' ' '\n' Make it executable: chmod +x /etc/snmp/percpustats This simple script takes a single argument, which is the cpu id you want to look at. By “cpu id”, I mean the first word of cpu* lines in /proc/stat . So cpu, cpu0, cpu1, etc. Here is a sample content of my /proc/stat file: ...

April 13, 2017 · 2 min