A short memo how to backup any PostgreSQL database: In .pgpass (you should keep this file protected): netbox-db-backup.sh: That will also find and delete backup files older than MAXDAYS.
Tag: linux
Get Linux Distribution Name and Version with Python
Since Debian 10 Buster there is no minor version number in lsb_release output or /etc/os-release anymore. Bug has been filed, but apparently there is no will to get the full version number back. The dist() and linux_distribution() functions in the platform module in Python have been deprecated in 3.5 and removed in 3.8.0: Also, the […]
Oneshot Service in Linux Systemd
My trusty old VDR box started behaving erratically: sometimes the IR remote didn’t do anything. Rebooting the whole box usually helped, but not always. Eventually I was able to narrow the problem down: for some reason the LIRC serial driver did not correctly detect the IR receiver in the serial port at the boot. I […]
Linux Routing Memos
These are just small hints and memos what to do on a Debian Linux setup. This is not a complete guide on doing a secured routing environment with Linux. /etc/sysctl.conf: net.ipv4.ip_forward=1 Configure /etc/network/interfaces iptables -t nat -A POSTROUTING -o <upstream_interface> -j MASQUERADE apt-get install iptables-persistent apt-get install iftop apt-get install conntrack conntrack -L -s 10.11.1.10 […]
NetBox Install on Debian 9
When installing NetBox on Debian 9 and Apache, the instructions in http://netbox.readthedocs.io/en/latest/ are fine, just some small additional operations are needed. The libapache2-mod-wsgi-py3 package needs to be installed as well, otherwise you will get errors about the “WSGIPassAuthorization on” command when starting Apache [this has later been addressed in commit b917e8d] Disable the “000-default” site […]
TLS Certificates in Debian and Apache
Adding TLS configurations in Apache: cat > /etc/ssl/private/myserver.key chmod 0640 /etc/ssl/private/myserver.key chgrp ssl-cert /etc/ssl/private/myserver.key cat > /etc/ssl/certs/myserver.crt cd /etc/apache2/sites-available cp default-ssl.conf myserver-ssl.conf vi myserver-ssl.conf – add ServerName if needed – RedirectMatch ^/$ https://myserver.mydomain.com/appname (if needed) – edit SSLCertificateFile and SSLCertificateKeyFile a2ensite myserver-ssl a2enmod ssl vi 000-default.conf – add ServerName if needed – Redirect / https://myserver.mydomain.com/ […]
Sending Twitter DMs in Zabbix Actions
When configuring actions in Zabbix for example for problem alerts, there is a built-in method for sending email notifications. Here are the instructions for sending alerts as Twitter direct messages. These instructions are based on a Debian 8 Jessie installation where Zabbix has been installed from the packages in the Zabbix repository. You maybe want […]
SoftEther VPN with a VPN Address Pool
For replacing a physical remote access VPN implementation with a VPN server in a virtual machine, one of the options is SoftEther. There is a lot of documentation in the site but somehow I felt the material was hard to absorb. In this post I describe the reference implementation I managed to complete with SoftEther. […]
Setting Up a Syslog Server
In the field of networking it is very useful to have a centralized location for your logs as the system itself (the network) is distributed. Syslog is the usual method of collecting the logs. There are lots of different solutions to collect syslogs, ranging from general-purpose servers or virtual machines running some syslog daemon software […]
Installing VMware Tools on Debian Linux
[Updated on 1-Apr-2017: For a long time now I haven’t bothered with installing VMware Tools manually anymore. Instead I’ve just used the open-vm-tools package included in Debian, so a plain “apt-get install open-vm-tools” does the job. I’ve understood that some features are missing when compared to the original VMware Tools, so be sure to check […]