<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Debian on nagg.eu</title><link>https://nagg.eu/tags/debian/</link><description>Recent content in Debian on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 21 Jan 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/debian/index.xml" rel="self" type="application/rss+xml"/><item><title>Mikrotik RouterOS WAN traffic sniff Suricata IDS</title><link>https://nagg.eu/mikrotik-routeros-wan-traffic-sniff-using-suricata-ids/</link><pubDate>Sat, 21 Jan 2023 00:00:00 +0000</pubDate><guid>https://nagg.eu/mikrotik-routeros-wan-traffic-sniff-using-suricata-ids/</guid><description>&lt;p&gt;Preface: this is the poor&amp;rsquo;s man way of hooking up Suricata IDS to &lt;del&gt;Mikrotik&lt;/del&gt;
any router.&lt;br&gt;
Better ways would be using port mirroring or putting Suricata host directly
in front of the router.&lt;/p&gt;
&lt;p&gt;My goal was to have all network traffic coming and going from internet
&lt;code&gt;mirrored&lt;/code&gt; into the suricata virtual machine.&lt;br&gt;
Network schema is the following:&lt;br&gt;
(internet) &amp;lt;-&amp;gt; routeros &amp;lt;-&amp;gt; debian_hypervisor &amp;lt;-&amp;gt; (linux bridge) &amp;lt;-&amp;gt; Suricata_VM&lt;/p&gt;
&lt;p&gt;There are few ways of doing this, the one which is in my opinion the lesser
evil involves:&lt;/p&gt;</description></item><item><title>Monitoring DNS BIND with Zabbix</title><link>https://nagg.eu/monitoring-dns-bind-with-zabbix/</link><pubDate>Wed, 17 Aug 2022 00:00:00 +0000</pubDate><guid>https://nagg.eu/monitoring-dns-bind-with-zabbix/</guid><description>&lt;p&gt;Shockingly enough out of the box Zabbix (version 6) does not include any template
to monitor a very crucial compontent every organization: DNS.&lt;br&gt;
Like most open source aficionado my DNS of choice is &lt;code&gt;BIND named&lt;/code&gt;.&lt;br&gt;
Luckily Zabbix has a pretty huge community and plenty of templates for it are
freely available, a quick search on the interwebz lead me to this
&lt;a href="https://share.zabbix.com/templates/applications-dns-template-bind-stat/#body"&gt;page&lt;/a&gt;.&lt;br&gt;
Kudos to whoever wrote this template, I just took it and tweaked it a little bit.&lt;/p&gt;</description></item><item><title>Debian QEMU/KVM bridged networking and VLAN</title><link>https://nagg.eu/debian-qemu-kvm-bridged-networking-and-vlan/</link><pubDate>Sun, 25 Jul 2021 00:00:00 +0000</pubDate><guid>https://nagg.eu/debian-qemu-kvm-bridged-networking-and-vlan/</guid><description>&lt;p&gt;By default on every Linux distro after installing &lt;code&gt;QEMU&lt;/code&gt; and &lt;code&gt;libvirt&lt;/code&gt; two
kinds of networking are available:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;NAT: VM sits behind a NAT.&lt;/li&gt;
&lt;li&gt;MACVTAP: without going into much details it acts more or less like a
bridged network, except not really. One of the most annoying limitations is
that host to guest communication and vice versa are not really working well.
Other important things might be broken as well, like for example VRRP.
This mode is good for quick and dirty testing but not really for a stable
environment.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;BRIDGED networking is also supported by &lt;code&gt;libvirt&lt;/code&gt; but requires some manual
work.&lt;br&gt;
A possible networking schema could be the following:&lt;/p&gt;</description></item><item><title>Keepalived and libvirt MACVTAP network interfaces</title><link>https://nagg.eu/keepalived-and-libvirt-macvtap-network-interfaces/</link><pubDate>Wed, 13 Jan 2021 00:00:00 +0000</pubDate><guid>https://nagg.eu/keepalived-and-libvirt-macvtap-network-interfaces/</guid><description>&lt;p&gt;Keepalived is a routing software written in C that can be used to setup load
balancing and high availiability for Linux machines.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;NOTE: hypervisor is Debian 10 (Buster) with &lt;code&gt;libvirt&lt;/code&gt; and &lt;code&gt;qemu/kvm&lt;/code&gt;, virtual
machines also are Debian 10 (Buster).&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="keepalived-configuration"&gt;Keepalived configuration&lt;/h2&gt;
&lt;p&gt;Install &lt;code&gt;keepalived&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ apt install keepalived
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Install &lt;code&gt;nginx&lt;/code&gt;, it will be use to check that keepalived is actually working:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ apt install nginx
$ systemctl enable --now nginx
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Configure &lt;code&gt;keepalived&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ vi /etc/keepalived/keepalived.conf
---
global_defs {
 enable_script_security # prevents tampering with the check script
 script_user root # defines which user runs the check script
}

vrrp_script chk_nginx {
 script &amp;#34;/opt/scripts/nginx-check.sh&amp;#34;
 interval 2 # run script every 2 seconds
 weight 2 # add 2 points if OK
}

vrrp_instance VI_1 {
 interface enp2s0 # interface to monitor
 virtual_router_id 51
 priority 101 # MASTER 101, BACKUP 100
 advert_int 1
 nopreempt # comment to not have the VIP go back to MASTER 
 # -&amp;gt; when it comes back online
 authentication {
 auth_type PASS
 auth_pass myPass # maximum 8 chars
 }
 virtual_ipaddress {
 10.10.0.12/24 # VIP (Virtual IP Address)
 }
 track_script {
 chk_nginx
 }
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also add a script to check if &lt;code&gt;nginx&lt;/code&gt; is alive and well:&lt;/p&gt;</description></item><item><title>Wireguard VPN Linux and IOS setup guide</title><link>https://nagg.eu/wireguard-vpn-linux-and-ios-setup-guide/</link><pubDate>Mon, 04 Jan 2021 00:00:00 +0000</pubDate><guid>https://nagg.eu/wireguard-vpn-linux-and-ios-setup-guide/</guid><description>&lt;p&gt;Wireguard is an open source software and communication protocol which aims to
provide a simpler and safer alternative to OpenVPN.&lt;br&gt;
Compared to OpenVPN both client and server configuration are much simpler and
mantaining a PKI is also not required.&lt;br&gt;
Performance wise Wireguard is also faster than OpenVPN.&lt;/p&gt;
&lt;h2 id="server-debian-10-codename-buster"&gt;SERVER: Debian 10 (Codename Buster)&lt;/h2&gt;
&lt;p&gt;As of today Wireguard is not included in Debian 10 stable repos, so it is
required to enable &lt;a href="https://backports.debian.org/Instructions/"&gt;backports&lt;/a&gt;
to install it:&lt;/p&gt;</description></item><item><title>LUKS encrypted TGT ISCSI target and initiator</title><link>https://nagg.eu/luks-encrypted-tgt-iscsi-target-and-initiator/</link><pubDate>Sat, 26 Dec 2020 00:00:00 +0000</pubDate><guid>https://nagg.eu/luks-encrypted-tgt-iscsi-target-and-initiator/</guid><description>&lt;p&gt;After the CentOS fiasco (good job Redhat/IBM) and since we are more or less in
lockdown I decided to invest a couple of days to migrate my home infra from
CentOS 7 to Debian 10.&lt;br&gt;
One of my physical machines, which was also CentOS 7 based, is used as ISCSI
target.&lt;/p&gt;
&lt;h2 id="debian-10---server-aka-target"&gt;Debian 10 - Server A.K.A. Target&lt;/h2&gt;
&lt;p&gt;Install the required packages:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ sudo apt-get install tgt dkms 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create a device backstore:&lt;/p&gt;</description></item><item><title>Siemens IOT2050</title><link>https://nagg.eu/siemens-iot2050/</link><pubDate>Sun, 24 May 2020 00:00:00 +0000</pubDate><guid>https://nagg.eu/siemens-iot2050/</guid><description>&lt;p&gt;A few weeks ago Siemens released a very much needed upgrade of the IOT2000
platform; the newcomer is called IOT2050 and is a huge step forward compared
to the very very underpowered IOT2040.&lt;br&gt;
I have had one for a few days laying on my desk but I just found the time to
play with it today.&lt;br&gt;
Other than the new hardware, the officially supported operating system also
changed from Yocto Linux to Debian Buster (kudos for dropping Yocto).&lt;/p&gt;</description></item><item><title>Zabbix and XMPP alerts</title><link>https://nagg.eu/zabbix-and-xmpp-alerts/</link><pubDate>Mon, 23 Oct 2017 17:44:14 +0000</pubDate><guid>https://nagg.eu/zabbix-and-xmpp-alerts/</guid><description>&lt;p&gt;Zabbix should theoretically be able out of the box to send alerts via XMPP.&lt;br&gt;
For some reason this functionality does not work as intended, luckily it is
possible to specify a custom script to send alerts; combining the
aforementioned script with the Perl library sendxmpp is the easiest way to
enable Zabbix from sending notifications via XMPP.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ yum install sendxmpp
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create a bash script, this will be invoked by Zabbix to send notifications:&lt;/p&gt;</description></item></channel></rss>