<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.meurisse.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vincent</id>
	<title>wiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.meurisse.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vincent"/>
	<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/wiki/Special:Contributions/Vincent"/>
	<updated>2026-04-17T10:15:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.7</generator>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=sslh&amp;diff=692</id>
		<title>sslh</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=sslh&amp;diff=692"/>
		<updated>2020-09-05T08:50:33Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Fix stop command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:sslh installation guide}}&lt;br /&gt;
{{Debian}}[http://www.rutschle.net/tech/sslh.shtml sslh] is a program that allows you to run several programs on port 443. Mainly it allows your [[SSH|SSH server]] and [[Nginx|web server]] to share the same port.&lt;br /&gt;
&lt;br /&gt;
This guide will show how to install sslh in transparent mode with [[nftables]]. It will also use the lighter &amp;lt;code&amp;gt;sslh-select&amp;lt;/code&amp;gt; instead of the simpler &amp;lt;code&amp;gt;sslh-fork&amp;lt;/code&amp;gt;. For other modes of operation, refer to [https://github.com/yrutschle/sslh the documentation].&lt;br /&gt;
&lt;br /&gt;
{{Warning|msg=}}Using SSH can be a violation of your corporate internet use policy. Please act responsibly. In particular, &#039;&#039;&#039;never ever create a reverse tunnel&#039;&#039;&#039; from your company network. Also this tool is not disguising SSH traffic as web but simply changing the port and can be easily detected by your network administrator.&lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
Before running this guide, you will need:&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install sslh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;When it ask you how sslh should be run, choose &amp;lt;code&amp;gt;standalone&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
sslh has several modes of operation. In this tutorial, we will use transparent mode with sslh-select. &lt;br /&gt;
&lt;br /&gt;
=== OpenSSH ===&lt;br /&gt;
We will start by configuring OpenSSH to listen on a second port. We do that by modifying &amp;lt;code&amp;gt;/etc/ssh/ssd_config&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
# What ports, IPs and protocols we listen for&lt;br /&gt;
Port 2200&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
ListenAddress 203.0.113.23:2200 # direct access&lt;br /&gt;
ListenAddress 203.0.113.23:2201 # access through sslh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can now [[SSH#Restart|restart your SSH server]].&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Now we will need to free port 443 so that it can be used by sslh. Edit file &amp;lt;code&amp;gt;/etc/nginx/snippets/listen-https.conf&amp;lt;/code&amp;gt; and change the port for IPV4&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
listen [2001:db8:3:47d0::2e:7]:443 ssl spdy;&lt;br /&gt;
listen 203.0.113.23:4433 ssl spdy;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Do not restart Nginx yet.&lt;br /&gt;
&lt;br /&gt;
=== Routing ===&lt;br /&gt;
Create file  &amp;lt;code&amp;gt;/etc/nftables/sslh.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
# Use ip as we want to configure sslh only for IPV4&lt;br /&gt;
table ip sslh {&lt;br /&gt;
        chain output {&lt;br /&gt;
                type route  hook output  priority -150;&lt;br /&gt;
                oif eth0  tcp sport { 2201, 4433 }  counter  mark set 0x4155;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and register it in &amp;lt;code&amp;gt;/etc/nftables.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
include &amp;quot;/etc/nftables/sslh.conf&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and manually activate it with&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo nft -f  /etc/nftables/sslh.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sslh ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/systemd/system/sslh.service.d/override.conf&amp;lt;/code&amp;gt; (you will have to create the folder)&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Service]&lt;br /&gt;
&lt;br /&gt;
# Replace the start command and make it use sslh-select &lt;br /&gt;
ExecStart=&lt;br /&gt;
ExecStart=/usr/sbin/sslh-select --foreground $DAEMON_OPTS&lt;br /&gt;
&lt;br /&gt;
# Run sslh as an user and use capabilities to bind ports&lt;br /&gt;
User=sslh&lt;br /&gt;
# Systemd 229&lt;br /&gt;
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_ADMIN&lt;br /&gt;
# Systemd 228 and bellow&lt;br /&gt;
#SecureBits=keep-caps&lt;br /&gt;
#Capabilities=cap_net_bind_service,cap_net_admin+pie&lt;br /&gt;
&lt;br /&gt;
# Limit access&lt;br /&gt;
PrivateTmp=true&lt;br /&gt;
PrivateDevices=true&lt;br /&gt;
ProtectSystem=full&lt;br /&gt;
ProtectHome=true&lt;br /&gt;
&lt;br /&gt;
# Set routing rules automaticaly on script start&lt;br /&gt;
PermissionsStartOnly=true&lt;br /&gt;
&lt;br /&gt;
# Check for mark 0x4155 (set by nftables) and forward packet to table 0x4155&lt;br /&gt;
ExecStartPre=/sbin/ip rule add fwmark 0x4155 lookup 0x4155&lt;br /&gt;
ExecStopPost=/sbin/ip rule del fwmark 0x4155&lt;br /&gt;
&lt;br /&gt;
# Table 0x4155 to route all packets back to loopback interface&lt;br /&gt;
ExecStartPre=/sbin/ip route add local 0.0.0.0/0 dev lo table 0x4155&lt;br /&gt;
ExecStopPost=/sbin/ip route del local 0.0.0.0/0 dev lo table 0x4155&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If using the &amp;lt;code&amp;gt;Capabilities=&amp;lt;/code&amp;gt; rule for systemd 228-, you need to give the binary some capabilities as well&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo setcap cap_net_bind_service,cap_net_admin+ei /usr/sbin/sslh-select&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Next edit file &amp;lt;code&amp;gt;/etc/default/sslh&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# Default options for sslh initscript&lt;br /&gt;
# sourced by /etc/init.d/sslh&lt;br /&gt;
&lt;br /&gt;
# Disabled by default, to force yourself&lt;br /&gt;
# to read the configuration:&lt;br /&gt;
# - /usr/share/doc/sslh/README.Debian (quick start)&lt;br /&gt;
# - /usr/share/doc/sslh/README, at &amp;quot;Configuration&amp;quot; section&lt;br /&gt;
# - sslh(8) via &amp;quot;man sslh&amp;quot; for more configuration details.&lt;br /&gt;
# Once configuration ready, you *must* set RUN to yes here&lt;br /&gt;
# and try to start sslh (standalone mode only)&lt;br /&gt;
&lt;br /&gt;
RUN=no&lt;br /&gt;
&lt;br /&gt;
# binary to use: forked (sslh) or single-thread (sslh-select) version&lt;br /&gt;
# systemd users: don&#039;t forget to modify /lib/systemd/system/sslh.service&lt;br /&gt;
DAEMON=/usr/sbin/sslh&lt;br /&gt;
&lt;br /&gt;
DAEMON_OPTS=&amp;quot;-n --transparent --listen 203.0.113.23:443 --tls 203.0.113.23:4433 --ssh 203.0.113.23:2201&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Changes done from the default&lt;br /&gt;
* &amp;lt;code&amp;gt;-n&amp;lt;/code&amp;gt; Don&#039;t resolve domain name of connecting ip in logs. This allow to not loose time doing a DNS lookup for each new client&lt;br /&gt;
* &amp;lt;code&amp;gt;--transparent&amp;lt;/code&amp;gt; SSH and webserver will see connection as if it where coming directly from the outside. In particular, you will get the correct connecting IP address in the logs.&lt;br /&gt;
* &amp;lt;code&amp;gt;--listen 203.0.113.23:443&amp;lt;/code&amp;gt; IP and port sslh listen to&lt;br /&gt;
* &amp;lt;code&amp;gt;--tls 203.0.113.23:4433&amp;lt;/code&amp;gt; IP and port of Nginx&lt;br /&gt;
* &amp;lt;code&amp;gt;--ssh 203.0.113.23:2201&amp;lt;/code&amp;gt; IP and port of OpenSSH&lt;br /&gt;
* Remove &amp;lt;code&amp;gt;--user&amp;lt;/code&amp;gt; option. The modification in the systemd script make it run with the correct user from the start.&lt;br /&gt;
* Remove &amp;lt;code&amp;gt;--pidfile&amp;lt;/code&amp;gt; option. It is useless with systemd.&lt;br /&gt;
&lt;br /&gt;
=== Start ===&lt;br /&gt;
You can now restart Nginx and start sslh&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl reload nginx &amp;amp;&amp;amp; systemctl start sslh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Linux Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=sslh&amp;diff=691</id>
		<title>sslh</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=sslh&amp;diff=691"/>
		<updated>2020-09-04T09:59:42Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* sslh */ default config for systemd &amp;gt;= 229&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:sslh installation guide}}&lt;br /&gt;
{{Debian}}[http://www.rutschle.net/tech/sslh.shtml sslh] is a program that allows you to run several programs on port 443. Mainly it allows your [[SSH|SSH server]] and [[Nginx|web server]] to share the same port.&lt;br /&gt;
&lt;br /&gt;
This guide will show how to install sslh in transparent mode with [[nftables]]. It will also use the lighter &amp;lt;code&amp;gt;sslh-select&amp;lt;/code&amp;gt; instead of the simpler &amp;lt;code&amp;gt;sslh-fork&amp;lt;/code&amp;gt;. For other modes of operation, refer to [https://github.com/yrutschle/sslh the documentation].&lt;br /&gt;
&lt;br /&gt;
{{Warning|msg=}}Using SSH can be a violation of your corporate internet use policy. Please act responsibly. In particular, &#039;&#039;&#039;never ever create a reverse tunnel&#039;&#039;&#039; from your company network. Also this tool is not disguising SSH traffic as web but simply changing the port and can be easily detected by your network administrator.&lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
Before running this guide, you will need:&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install sslh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;When it ask you how sslh should be run, choose &amp;lt;code&amp;gt;standalone&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
sslh has several modes of operation. In this tutorial, we will use transparent mode with sslh-select. &lt;br /&gt;
&lt;br /&gt;
=== OpenSSH ===&lt;br /&gt;
We will start by configuring OpenSSH to listen on a second port. We do that by modifying &amp;lt;code&amp;gt;/etc/ssh/ssd_config&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
# What ports, IPs and protocols we listen for&lt;br /&gt;
Port 2200&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
ListenAddress 203.0.113.23:2200 # direct access&lt;br /&gt;
ListenAddress 203.0.113.23:2201 # access through sslh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can now [[SSH#Restart|restart your SSH server]].&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
Now we will need to free port 443 so that it can be used by sslh. Edit file &amp;lt;code&amp;gt;/etc/nginx/snippets/listen-https.conf&amp;lt;/code&amp;gt; and change the port for IPV4&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
listen [2001:db8:3:47d0::2e:7]:443 ssl spdy;&lt;br /&gt;
listen 203.0.113.23:4433 ssl spdy;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Do not restart Nginx yet.&lt;br /&gt;
&lt;br /&gt;
=== Routing ===&lt;br /&gt;
Create file  &amp;lt;code&amp;gt;/etc/nftables/sslh.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
# Use ip as we want to configure sslh only for IPV4&lt;br /&gt;
table ip sslh {&lt;br /&gt;
        chain output {&lt;br /&gt;
                type route  hook output  priority -150;&lt;br /&gt;
                oif eth0  tcp sport { 2201, 4433 }  counter  mark set 0x4155;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and register it in &amp;lt;code&amp;gt;/etc/nftables.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
include &amp;quot;/etc/nftables/sslh.conf&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and manually activate it with&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo nft -f  /etc/nftables/sslh.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sslh ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/systemd/system/sslh.service.d/override.conf&amp;lt;/code&amp;gt; (you will have to create the folder)&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Service]&lt;br /&gt;
&lt;br /&gt;
# Replace the start command and make it use sslh-select &lt;br /&gt;
ExecStart=&lt;br /&gt;
ExecStart=/usr/sbin/sslh-select --foreground $DAEMON_OPTS&lt;br /&gt;
&lt;br /&gt;
# Run sslh as an user and use capabilities to bind ports&lt;br /&gt;
User=sslh&lt;br /&gt;
# Systemd 229&lt;br /&gt;
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_ADMIN&lt;br /&gt;
# Systemd 228 and bellow&lt;br /&gt;
#SecureBits=keep-caps&lt;br /&gt;
#Capabilities=cap_net_bind_service,cap_net_admin+pie&lt;br /&gt;
&lt;br /&gt;
# Limit access&lt;br /&gt;
PrivateTmp=true&lt;br /&gt;
PrivateDevices=true&lt;br /&gt;
ProtectSystem=full&lt;br /&gt;
ProtectHome=true&lt;br /&gt;
&lt;br /&gt;
# Set routing rules automaticaly on script start&lt;br /&gt;
PermissionsStartOnly=true&lt;br /&gt;
&lt;br /&gt;
# Check for mark 0x4155 (set by nftables) and forward packet to table 0x4155&lt;br /&gt;
ExecStartPre=/sbin/ip rule add fwmark 0x4155 lookup 0x4155&lt;br /&gt;
ExecStopPost=/sbin/ip rule del fwmark 0x4155&lt;br /&gt;
&lt;br /&gt;
# Table 0x4155 to route all packets back to loopback interface&lt;br /&gt;
ExecStartPre=/sbin/ip route add local 0.0.0.0/0 dev lo table 0x4155&lt;br /&gt;
ExecStopPost=/sbin/ip route del table 0x4155&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If using the &amp;lt;code&amp;gt;Capabilities=&amp;lt;/code&amp;gt; rule for systemd 228-, you need to give the binary some capabilities as well&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo setcap cap_net_bind_service,cap_net_admin+ei /usr/sbin/sslh-select&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Next edit file &amp;lt;code&amp;gt;/etc/default/sslh&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# Default options for sslh initscript&lt;br /&gt;
# sourced by /etc/init.d/sslh&lt;br /&gt;
&lt;br /&gt;
# Disabled by default, to force yourself&lt;br /&gt;
# to read the configuration:&lt;br /&gt;
# - /usr/share/doc/sslh/README.Debian (quick start)&lt;br /&gt;
# - /usr/share/doc/sslh/README, at &amp;quot;Configuration&amp;quot; section&lt;br /&gt;
# - sslh(8) via &amp;quot;man sslh&amp;quot; for more configuration details.&lt;br /&gt;
# Once configuration ready, you *must* set RUN to yes here&lt;br /&gt;
# and try to start sslh (standalone mode only)&lt;br /&gt;
&lt;br /&gt;
RUN=no&lt;br /&gt;
&lt;br /&gt;
# binary to use: forked (sslh) or single-thread (sslh-select) version&lt;br /&gt;
# systemd users: don&#039;t forget to modify /lib/systemd/system/sslh.service&lt;br /&gt;
DAEMON=/usr/sbin/sslh&lt;br /&gt;
&lt;br /&gt;
DAEMON_OPTS=&amp;quot;-n --transparent --listen 203.0.113.23:443 --tls 203.0.113.23:4433 --ssh 203.0.113.23:2201&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Changes done from the default&lt;br /&gt;
* &amp;lt;code&amp;gt;-n&amp;lt;/code&amp;gt; Don&#039;t resolve domain name of connecting ip in logs. This allow to not loose time doing a DNS lookup for each new client&lt;br /&gt;
* &amp;lt;code&amp;gt;--transparent&amp;lt;/code&amp;gt; SSH and webserver will see connection as if it where coming directly from the outside. In particular, you will get the correct connecting IP address in the logs.&lt;br /&gt;
* &amp;lt;code&amp;gt;--listen 203.0.113.23:443&amp;lt;/code&amp;gt; IP and port sslh listen to&lt;br /&gt;
* &amp;lt;code&amp;gt;--tls 203.0.113.23:4433&amp;lt;/code&amp;gt; IP and port of Nginx&lt;br /&gt;
* &amp;lt;code&amp;gt;--ssh 203.0.113.23:2201&amp;lt;/code&amp;gt; IP and port of OpenSSH&lt;br /&gt;
* Remove &amp;lt;code&amp;gt;--user&amp;lt;/code&amp;gt; option. The modification in the systemd script make it run with the correct user from the start.&lt;br /&gt;
* Remove &amp;lt;code&amp;gt;--pidfile&amp;lt;/code&amp;gt; option. It is useless with systemd.&lt;br /&gt;
&lt;br /&gt;
=== Start ===&lt;br /&gt;
You can now restart Nginx and start sslh&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl reload nginx &amp;amp;&amp;amp; systemctl start sslh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Linux Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=690</id>
		<title>KeePassXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=690"/>
		<updated>2019-04-05T06:40:17Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Browser Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
Download and install KeePassXC from https://keepassxc.org/download/&lt;br /&gt;
&lt;br /&gt;
== Create Password Database ==&lt;br /&gt;
Click on &#039;&#039;Database&#039;&#039; → &#039;&#039;New Database…&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can keep all defaults, you just need to choose the master password.&lt;br /&gt;
{{Warning|msg=If you forget this password, you will loose access to all the data.&lt;br /&gt;
For security reasons, there is no password recover.&lt;br /&gt;
Choose the password wisely.}}&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== Minimize to tray ===&lt;br /&gt;
I like to have KeePassXC always open, but yet not use space in the taskbar&lt;br /&gt;
&lt;br /&gt;
==== Autostart ====&lt;br /&gt;
&lt;br /&gt;
===== Linux =====&lt;br /&gt;
create a shortcut in the folder ~/.config/autostart&lt;br /&gt;
&lt;br /&gt;
===== Windows =====&lt;br /&gt;
create a shortcut in the folder shell:startup&lt;br /&gt;
&lt;br /&gt;
==== Minimize to tray ====&lt;br /&gt;
In KeePassXC go to &#039;&#039;Tools&#039;&#039; → &#039;&#039;Settings&#039;&#039; and change the following[[File:Keepass-Minimize-Settings.png|none|frame]]&lt;br /&gt;
&lt;br /&gt;
=== Browser integration ===&lt;br /&gt;
&lt;br /&gt;
==== KeePassXC configuration ====&lt;br /&gt;
In KeePassXC go to &#039;&#039;Tools&#039;&#039; → &#039;&#039;Settings&#039;&#039; and change the following&lt;br /&gt;
&lt;br /&gt;
[[File:keepassxc - browser integration.png|frameless|471x471px]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Browser Configuration ====&lt;br /&gt;
Install the keepassxc-browser extension for your browser. You can find the link in the settings page above.&lt;br /&gt;
&lt;br /&gt;
== Access your passwords ==&lt;br /&gt;
&lt;br /&gt;
=== Websites ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Desktop applications ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=689</id>
		<title>KeePassXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=689"/>
		<updated>2019-04-01T15:00:52Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Configure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
Download and install KeePassXC from https://keepassxc.org/download/&lt;br /&gt;
&lt;br /&gt;
== Create Password Database ==&lt;br /&gt;
Click on &#039;&#039;Database&#039;&#039; → &#039;&#039;New Database…&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can keep all defaults, you just need to choose the master password.&lt;br /&gt;
{{Warning|msg=If you forget this password, you will loose access to all the data.&lt;br /&gt;
For security reasons, there is no password recover.&lt;br /&gt;
Choose the password wisely.}}&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== Minimize to tray ===&lt;br /&gt;
I like to have KeePassXC always open, but yet not use space in the taskbar&lt;br /&gt;
&lt;br /&gt;
==== Autostart ====&lt;br /&gt;
&lt;br /&gt;
===== Linux =====&lt;br /&gt;
create a shortcut in the folder ~/.config/autostart&lt;br /&gt;
&lt;br /&gt;
===== Windows =====&lt;br /&gt;
create a shortcut in the folder shell:startup&lt;br /&gt;
&lt;br /&gt;
==== Minimize to tray ====&lt;br /&gt;
In KeePassXC go to &#039;&#039;Tools&#039;&#039; → &#039;&#039;Settings&#039;&#039; and change the following[[File:Keepass-Minimize-Settings.png|none|frame]]&lt;br /&gt;
&lt;br /&gt;
=== Browser integration ===&lt;br /&gt;
&lt;br /&gt;
==== KeePassXC configuration ====&lt;br /&gt;
In KeePassXC go to &#039;&#039;Tools&#039;&#039; → &#039;&#039;Settings&#039;&#039; and change the following&lt;br /&gt;
&lt;br /&gt;
[[File:keepassxc - browser integration.png|frameless|471x471px]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Browser Configuration ====&lt;br /&gt;
Install the keepassxc-browser extension for your browser. You can find the link in the settings page above.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=File:keepassxc_-_browser_integration.png&amp;diff=688</id>
		<title>File:keepassxc - browser integration.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=File:keepassxc_-_browser_integration.png&amp;diff=688"/>
		<updated>2019-04-01T14:20:06Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;keepassxc - browser integration&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=687</id>
		<title>KeePassXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=687"/>
		<updated>2019-04-01T14:01:55Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
Download and install KeePassXC from https://keepassxc.org/download/&lt;br /&gt;
&lt;br /&gt;
== Create Password Database ==&lt;br /&gt;
Click on &#039;&#039;Database&#039;&#039; → &#039;&#039;New Database…&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can keep all defaults, you just need to choose the master password.&lt;br /&gt;
{{Warning|msg=If you forget this password, you will loose access to all the data.&lt;br /&gt;
For security reasons, there is no password recover.&lt;br /&gt;
Choose the password wisely.}}&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== Minimize to tray ===&lt;br /&gt;
I like to have KeePassXC always open, but yet not use space in the taskbar&lt;br /&gt;
[[File:Keepass-Minimize-Settings.png|none|frame]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B ===&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=File:Keepass-Minimize-Settings.png&amp;diff=686</id>
		<title>File:Keepass-Minimize-Settings.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=File:Keepass-Minimize-Settings.png&amp;diff=686"/>
		<updated>2019-04-01T14:00:44Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Vincent uploaded a new version of File:Keepass-Minimize-Settings.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Keepass-Minimize-Settings&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=File:Keepass-Minimize-Settings.png&amp;diff=685</id>
		<title>File:Keepass-Minimize-Settings.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=File:Keepass-Minimize-Settings.png&amp;diff=685"/>
		<updated>2019-04-01T13:59:14Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Keepass-Minimize-Settings&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=684</id>
		<title>KeePassXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=684"/>
		<updated>2019-04-01T10:13:26Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
Download and install KeePassXC from https://keepassxc.org/download/&lt;br /&gt;
&lt;br /&gt;
== Create Password Database ==&lt;br /&gt;
Click on &#039;&#039;Database&#039;&#039; → &#039;&#039;New Database…&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can keep all defaults, you just need to choose the master password.&lt;br /&gt;
{{Warning|msg=If you forget this password, you will loose access to all the data.&lt;br /&gt;
For security reasons, there is no password recover.&lt;br /&gt;
Choose the password wisely.}}&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Minimize to tray ===&lt;br /&gt;
General → Basic Settings → Startup → Minimize window at startup&lt;br /&gt;
&lt;br /&gt;
General → Basic Settings → General → Minimize instead of app exit&lt;br /&gt;
&lt;br /&gt;
General → Basic Settings → General → Show a system &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B ===&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=683</id>
		<title>KeePassXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=KeePassXC&amp;diff=683"/>
		<updated>2019-04-01T09:18:28Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Created page with &amp;quot;{{WIP}}  = Install = Download and install KeePassXC from https://keepassxc.org/download/  = Create Password Database = Click on &amp;#039;&amp;#039;Database&amp;#039;&amp;#039; → &amp;#039;&amp;#039;New Database…&amp;#039;&amp;#039;.  You can...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
Download and install KeePassXC from https://keepassxc.org/download/&lt;br /&gt;
&lt;br /&gt;
= Create Password Database =&lt;br /&gt;
Click on &#039;&#039;Database&#039;&#039; → &#039;&#039;New Database…&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can keep all defaults, you just need to choose the master password.&lt;br /&gt;
{{Warning|msg=If you forget this password, you will loose access to all the data.&lt;br /&gt;
For security reasons, there is no password recover.&lt;br /&gt;
Choose the password wisely.}}&lt;br /&gt;
&lt;br /&gt;
= Configure =&lt;br /&gt;
&lt;br /&gt;
=== Minimize to tray ===&lt;br /&gt;
B&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=nftables&amp;diff=682</id>
		<title>nftables</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=nftables&amp;diff=682"/>
		<updated>2018-12-22T06:56:45Z</updated>

		<summary type="html">&lt;p&gt;Vincent: https links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://netfilter.org/projects/nftables/ nftables] is the new firewall of the linux kernel. It has several advantages over the existing {ip, ip6, arp,eb}tables:&lt;br /&gt;
* Only one command&lt;br /&gt;
* Rules that target both IPV4 and IPV6&lt;br /&gt;
* More concise syntax&lt;br /&gt;
*[https://wiki.nftables.org/wiki-nftables/index.php/Main_differences_with_iptables See details on the official wiki]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install nftables&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You might also want to remove &amp;lt;code&amp;gt;iptables&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt purge iptables&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== Create main table ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/nftables/main_config.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
# DNS&lt;br /&gt;
add element  inet main  udp_port_out { 53 }&lt;br /&gt;
add element  inet main  tcp_port_out { 53 }&lt;br /&gt;
# Network Time Protocol&lt;br /&gt;
add element  inet main  udp_port_out { 123 }&lt;br /&gt;
# OpenPGP HTTP Keyserver&lt;br /&gt;
add element  inet main  tcp_port_out { 11371 }&lt;br /&gt;
# SSH&lt;br /&gt;
add element  inet main  tcp_port_in { 2200 }&lt;br /&gt;
add element  inet main  tcp_port_out { 2200 }&lt;br /&gt;
# Web&lt;br /&gt;
add element  inet main  tcp_port_out { 80, 443 }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Create file &amp;lt;code&amp;gt;/etc/nftables/main.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
add table inet main&lt;br /&gt;
&lt;br /&gt;
#Ports open for any IP address&lt;br /&gt;
add set  inet main  tcp_port_out { type inet_service; }&lt;br /&gt;
add set  inet main  tcp_port_in { type inet_service; }&lt;br /&gt;
add set  inet main  udp_port_out { type inet_service; }&lt;br /&gt;
add set  inet main  udp_port_in { type inet_service; }&lt;br /&gt;
add set  inet main  user_out { type uid; }&lt;br /&gt;
add set  inet main  user_in { type uid; }&lt;br /&gt;
&lt;br /&gt;
include &amp;quot;/etc/nftables/main_config.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Remove spam in logs. Get your top noise whith&lt;br /&gt;
# grep Drop_in /var/log/syslog|sed -r &#039;s/.*?PROTO=([A-Z]+).*?DPT=([0-9]+).*/\1 \2/&#039;|sort|uniq -c|sort -rn&lt;br /&gt;
add set  inet main  tcp_scan_ports { type inet_service; }&lt;br /&gt;
add set  inet main  udp_scan_ports { type inet_service; }&lt;br /&gt;
add element  inet main  tcp_scan_ports {&lt;br /&gt;
22, # SSH&lt;br /&gt;
23, # Telnet&lt;br /&gt;
1433, # MS SQL Login&lt;br /&gt;
8080, # HTTP Alternate&lt;br /&gt;
50661 # Apple Xsan&lt;br /&gt;
}&lt;br /&gt;
add element  inet main  udp_scan_ports {&lt;br /&gt;
53, # DNS&lt;br /&gt;
5060, # SIP&lt;br /&gt;
53413 # https://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
chain inet main input {&lt;br /&gt;
        type filter  hook input  priority 0;&lt;br /&gt;
&lt;br /&gt;
        # accept any localhost traffic&lt;br /&gt;
        iif lo  accept&lt;br /&gt;
&lt;br /&gt;
        # accept traffic originated from us&lt;br /&gt;
        ct state established,related  accept&lt;br /&gt;
        ct state invalid  log prefix &amp;quot;Invalid_in &amp;quot;  drop&lt;br /&gt;
&lt;br /&gt;
        # accept neighbour discovery otherwise IPv6 connectivity breaks.&lt;br /&gt;
        ip6 nexthdr icmpv6  icmpv6 type { nd-neighbor-solicit,  nd-router-advert, nd-neighbor-advert }  accept&lt;br /&gt;
&lt;br /&gt;
        # accept ping&lt;br /&gt;
        ip protocol icmp  icmp type { echo-request }  accept&lt;br /&gt;
&lt;br /&gt;
        tcp  dport @tcp_port_in  ct state new  accept&lt;br /&gt;
        udp  dport @udp_port_in  ct state new  accept&lt;br /&gt;
        meta skuid @user_in  ct state new  accept&lt;br /&gt;
&lt;br /&gt;
        tcp dport @tcp_scan_ports drop&lt;br /&gt;
        udp dport @udp_scan_ports drop&lt;br /&gt;
&lt;br /&gt;
        # count and drop any other traffic&lt;br /&gt;
        counter  log prefix &amp;quot;Drop_in &amp;quot;  drop&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
chain inet main output {&lt;br /&gt;
        type filter  hook output  priority 0;&lt;br /&gt;
&lt;br /&gt;
        # accept any localhost traffic&lt;br /&gt;
        oif lo  accept&lt;br /&gt;
&lt;br /&gt;
        ct state established,related  accept&lt;br /&gt;
        ct state invalid  log prefix &amp;quot;Invalid_out &amp;quot;  drop&lt;br /&gt;
&lt;br /&gt;
        # accept neighbour discovery otherwise IPv6 connectivity breaks.&lt;br /&gt;
        ip6 nexthdr icmpv6  icmpv6 type { nd-neighbor-solicit,  nd-router-advert, nd-neighbor-advert }  accept&lt;br /&gt;
&lt;br /&gt;
        # accept ping&lt;br /&gt;
        ip protocol icmp  icmp type { echo-request }  accept&lt;br /&gt;
&lt;br /&gt;
        tcp  dport @tcp_port_out  ct state new accept&lt;br /&gt;
        udp  dport @udp_port_out  ct state new accept&lt;br /&gt;
        meta skuid @user_out  ct state new  accept&lt;br /&gt;
&lt;br /&gt;
        counter  log prefix &amp;quot;Drop_out &amp;quot;  drop&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;{{Warning}}Double check the port for SSH before activating the script.&lt;br /&gt;
&lt;br /&gt;
=== Activation Scripts ===&lt;br /&gt;
&lt;br /&gt;
==== /etc/nftables.conf ====&lt;br /&gt;
Edit file &amp;lt;code&amp;gt;/etc/nftables.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
flush ruleset&lt;br /&gt;
&lt;br /&gt;
include &amp;quot;/etc/nftables/main.conf&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This file is executed when you start nftables. You can also manually execute it without issue.&lt;br /&gt;
&lt;br /&gt;
==== /etc/nftables/reload_main.conf ====&lt;br /&gt;
This script is used to reload only the main table without the others. The point is to integrate with tools like [[Fail2Ban]] which are inserting rules in the firewall. By reloading just the main table, you can activate your new rules without impacting Fail2Ban.&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/nftables/reload_main.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
delete table inet main&lt;br /&gt;
&lt;br /&gt;
include &amp;quot;/etc/nftables/main.conf&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;and make it executable&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo chmod +x /etc/nftables/reload_main.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test ==&lt;br /&gt;
Test your firewall with the following command&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo -- sh -c &#039;nft -f /etc/nftables.conf; sleep 30; nft flush ruleset&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;It will activate the firewall and reset it after 30 seconds. It allows you to not lock yourself out of your machine.&lt;br /&gt;
&lt;br /&gt;
== Enable ==&lt;br /&gt;
{{Warning}}It is recommended that you test your firewall before enabling it at boot time. An incorrectly configured firewall can lock you out of your machine.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl enable nftables&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:nftables]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Main_Page&amp;diff=681</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Main_Page&amp;diff=681"/>
		<updated>2018-12-22T06:53:00Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Services */ httpS://map.meurisse.org&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to my personal wiki.&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration Guides ==&lt;br /&gt;
&lt;br /&gt;
These guides are intended as a reference when I need to reinstall a piece of software. However feel free to use them and I will be very glad if they can be useful to anyone.&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Linux Server|Linux servers]]&lt;br /&gt;
* [[:Category:Linux Desktop|Linux desktops]]&lt;br /&gt;
* [[:Category:Android|Android]]&lt;br /&gt;
* [[:Category:Windows|Windows]]&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
&lt;br /&gt;
List of open tools that I provide&lt;br /&gt;
;https://map.meurisse.org&lt;br /&gt;
:Map with a distance calculator. Based on [https://www.openstreetmap.org OpenStreetMap].&lt;br /&gt;
;https://ip.meurisse.org&lt;br /&gt;
:Your IP address. Pure, simple, nothing more.&lt;br /&gt;
:Use https://ipv4.meurisse.org and https://ipv6.meurisse.org for specific protocols.&lt;br /&gt;
&lt;br /&gt;
== Machine List ==&lt;br /&gt;
&lt;br /&gt;
List of the [[Machines|computers/servers/routers/whatever]] that I have or had.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Firefox&amp;diff=680</id>
		<title>Firefox</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Firefox&amp;diff=680"/>
		<updated>2018-12-21T07:57:01Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* About:config */ add tab restore settings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Privacy ==&lt;br /&gt;
&lt;br /&gt;
=== 3rd party cookies ===&lt;br /&gt;
Cookies are pieces of information that a website can store on your computer. There are two types of cookies:&lt;br /&gt;
* First party cookies: these are the cookies from the site you are visiting. They are used for example for the log-in functionality of most websites.&lt;br /&gt;
* Third party cookies: they are set by other website. For example, any time you visit a website with a like button from Facebook, Facebook will set a cookie on your computer. This allows them to follow them on most of the website you are going to. This is used by advertiser to know the websites you go to and show you the same advertising on all websites. In practice, very few websites use this for functionalities. It is quite safe to disable them.&lt;br /&gt;
Go to Preferences, and then, in the Privacy section, set Accept third-party-cookies to Never.&lt;br /&gt;
&lt;br /&gt;
[[File:Firefox History Settings.png|border]]&lt;br /&gt;
&lt;br /&gt;
=== WebRTC ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/WebRTC WebRTC] is a protocol that allows peer to peer communication between browsers. This is for example for audio/video chat. To allow faster connections to computer within the same local network, this protocol allows the browser to share all your local IP addresses.&lt;br /&gt;
&lt;br /&gt;
This has two major problems:&lt;br /&gt;
* If a website contain malware, knowing your addresses is helping it to infect your network.&lt;br /&gt;
* This can be used to [https://en.wikipedia.org/wiki/Device_fingerprint fingerprint] your device and track you around the web.&lt;br /&gt;
To stop the leak, go to &amp;lt;code&amp;gt;about:config&amp;lt;/code&amp;gt; and change this setting&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
media.peerconnection.ice.no_host=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== About:config ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Setting&lt;br /&gt;
!Value&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|extensions.pocket.enabled&lt;br /&gt;
|false&lt;br /&gt;
|Disable the pocket integration&lt;br /&gt;
|-&lt;br /&gt;
|browser.tabs.closeWindowWithLastTab&lt;br /&gt;
|false&lt;br /&gt;
|Prevent Firefox from closing when you close last tab&lt;br /&gt;
|-&lt;br /&gt;
|browser.sessionstore.restore_on_demand&lt;br /&gt;
|true&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |Avoid all tabs reloading at once when you restart Firefox.&lt;br /&gt;
Tabs will be loaded on click.&lt;br /&gt;
|-&lt;br /&gt;
|browser.sessionstore.restore_pinned_tabs_on_demand&lt;br /&gt;
|true&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Android]]&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=MariaDB&amp;diff=679</id>
		<title>MariaDB</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=MariaDB&amp;diff=679"/>
		<updated>2018-08-22T15:20:31Z</updated>

		<summary type="html">&lt;p&gt;Vincent: sudo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}{{Debian}}MariaDB is a drop-in replacement for the well-known MySQL database.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
apt install mariadb-server&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The installation script will prompt you for root password. This is the password for the super-administrator account of your MariaDB server. It is different from the root account of your Linux machine. Make sure you use something secure and that you remember it.&lt;br /&gt;
&lt;br /&gt;
=== Securing ===&lt;br /&gt;
Run the following script as root&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mysql_secure_installation&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The script will start by asking your MariaDB root password. It will then ask if you wand to change it. If you have set a secure password at the previous step, it is safe to answer no.&lt;br /&gt;
&lt;br /&gt;
The script will then propose to you a few configuration changes. Unless you know what you are doing, accept all changes.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ mysql -u root -p&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PhpMyAdmin ==&lt;br /&gt;
You can now install [[PhpMyAdmin]]. It allows you to view and administrate your databases from your browser. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Nginx&amp;diff=678</id>
		<title>Nginx</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Nginx&amp;diff=678"/>
		<updated>2018-08-12T13:27:20Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* snippets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Nginx installation guide}}&lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
This guide is written for Debian Stretch. Other Debian based distributions should work as well.&lt;br /&gt;
&lt;br /&gt;
While not mandatory, the guide makes use of the following programs to enhance the security of the installation&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[Fail2Ban]]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install nginx-light libnginx-mod-http-headers-more-filter&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nginx_modsite ===&lt;br /&gt;
nginx_modsite is a script that allows to activate or deactivate a site simply, without having to handle symlinks manually. In Debian, it is distributed in source form as part of the &amp;lt;code&amp;gt;nginx-doc&amp;lt;/code&amp;gt; package. The easiest is to download it directly from [https://anonscm.debian.org/cgit/collab-maint/nginx.git/tree/debian/help/examples/nginx_modsite the source repository]:&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo curl -o /usr/local/sbin/nginx_modsite &amp;quot;https://anonscm.debian.org/cgit/collab-maint/nginx.git/plain/debian/help/examples/nginx_modsite&amp;quot;&lt;br /&gt;
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current&lt;br /&gt;
                                 Dload  Upload   Total   Spent    Left  Speed&lt;br /&gt;
100  4625  100  4625    0     0  12836      0 --:--:-- --:--:-- --:--:-- 12847&lt;br /&gt;
$ sudo chmod +x /usr/local/sbin/nginx_modsite&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
Replace file &amp;lt;code&amp;gt;/etc/nginx/nginx.conf&amp;lt;/code&amp;gt; with:&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
user www-data;&lt;br /&gt;
worker_processes auto;&lt;br /&gt;
pid /run/nginx.pid;&lt;br /&gt;
include /etc/nginx/modules-enabled/*.conf;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
  worker_connections 768;&lt;br /&gt;
  # multi_accept on;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
  ##&lt;br /&gt;
  # Basic Settings&lt;br /&gt;
  ##&lt;br /&gt;
  sendfile on;&lt;br /&gt;
  tcp_nopush on;&lt;br /&gt;
  tcp_nodelay on;&lt;br /&gt;
  keepalive_timeout 65;&lt;br /&gt;
  types_hash_max_size 2048;&lt;br /&gt;
&lt;br /&gt;
  include /etc/nginx/mime.types;&lt;br /&gt;
  default_type application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
  ##&lt;br /&gt;
  # Logging Settings&lt;br /&gt;
  ##&lt;br /&gt;
  access_log /var/log/nginx/access.log;&lt;br /&gt;
  error_log /var/log/nginx/error.log;&lt;br /&gt;
&lt;br /&gt;
  ##&lt;br /&gt;
  # Virtual Host Configs&lt;br /&gt;
  ##&lt;br /&gt;
  include /etc/nginx/conf.d/*.conf;&lt;br /&gt;
  include /etc/nginx/sites-enabled/*;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== conf.d ===&lt;br /&gt;
The conf.d folder stores shared configuration shared between all the sites hosted on your server.&lt;br /&gt;
&lt;br /&gt;
Create the following files:&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/dns.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# DNS resolver&lt;br /&gt;
# It is required for OCSP Stapling. It might also be used if you use a hostname for upstream servers&lt;br /&gt;
resolver 127.0.0.1;&lt;br /&gt;
# If you don&#039;t have a DNS resolver on your machine you can use google public ones instead&lt;br /&gt;
#resolver 8.8.8.8 8.8.4.4;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/gzip.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
gzip on;&lt;br /&gt;
&lt;br /&gt;
# Insert header &amp;quot;Vary: Accept-Encoding&amp;quot; in responses&lt;br /&gt;
# https://www.maxcdn.com/blog/accept-encoding-its-vary-important/&lt;br /&gt;
gzip_vary on;&lt;br /&gt;
&lt;br /&gt;
gzip_comp_level 6;&lt;br /&gt;
&lt;br /&gt;
gzip_proxied any;&lt;br /&gt;
&lt;br /&gt;
gzip_min_length 500;&lt;br /&gt;
&lt;br /&gt;
gzip_types&lt;br /&gt;
  application/atom+xml&lt;br /&gt;
  application/atom_xml&lt;br /&gt;
  application/javascript&lt;br /&gt;
  application/json&lt;br /&gt;
  application/ld+json&lt;br /&gt;
  application/manifest+json&lt;br /&gt;
  application/rss+xml&lt;br /&gt;
  application/text&lt;br /&gt;
  application/vnd.geo+json&lt;br /&gt;
  application/vnd.microsoft.icon&lt;br /&gt;
  application/vnd.ms-fontobject&lt;br /&gt;
  application/x-json&lt;br /&gt;
  application/x-font-opentype&lt;br /&gt;
  application/x-font-truetype&lt;br /&gt;
  application/x-font-ttf&lt;br /&gt;
  application/x-javascript&lt;br /&gt;
  application/x-web-app-manifest+json&lt;br /&gt;
  application/xhtml+xml&lt;br /&gt;
  application/xml&lt;br /&gt;
  application/xml+rss&lt;br /&gt;
  font/eot&lt;br /&gt;
  font/opentype&lt;br /&gt;
  font/otf&lt;br /&gt;
  image/bmp&lt;br /&gt;
  image/svg+xml&lt;br /&gt;
  image/vnd.microsoft.icon&lt;br /&gt;
  image/x-icon&lt;br /&gt;
  text/cache-manifest&lt;br /&gt;
  text/css&lt;br /&gt;
  text/javascript&lt;br /&gt;
  text/plain&lt;br /&gt;
  text/vcard&lt;br /&gt;
  text/vnd.rim.location.xloc&lt;br /&gt;
  text/vtt&lt;br /&gt;
  text/x-component&lt;br /&gt;
  text/x-cross-domain-policy&lt;br /&gt;
  text/xml;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/php.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;See documentation to [[PHP|install PHP]].&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/server_tokens.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Hide nginx version&lt;br /&gt;
# This doesn&#039;t provides any real security but makes hackers life a bit more difficult&lt;br /&gt;
server_tokens off;&lt;br /&gt;
more_clear_headers Server;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/ssl.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
ssl_protocols TLSv1.2;&lt;br /&gt;
ssl_prefer_server_ciphers on;&lt;br /&gt;
&lt;br /&gt;
# Cipher list from https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility&lt;br /&gt;
ssl_ciphers &amp;quot;ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# If you have a version of openssl &amp;lt; 1.1.0, you need to remove X25519 from the list&lt;br /&gt;
ssl_ecdh_curve X25519:secp256k1:secp384r1;&lt;br /&gt;
&lt;br /&gt;
# Support OSCP Stapling. Check that resolver from in dns.conf is working&lt;br /&gt;
ssl_stapling on;&lt;br /&gt;
ssl_stapling_verify on;&lt;br /&gt;
ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;&lt;br /&gt;
&lt;br /&gt;
# Support SSL session cache&lt;br /&gt;
ssl_session_timeout 1d;&lt;br /&gt;
ssl_session_cache shared:NginxCache:50m;&lt;br /&gt;
ssl_session_tickets off; # https://timtaubert.de/blog/2014/11/the-sad-state-of-server-side-tls-session-resumption-implementations/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== snippets ===&lt;br /&gt;
The snippets folder allows you to store bits of configuration that you can later include in virtual hosts configuration.This saves a lot of typing and errors when creating a new site.&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nging/conf.d/acme-challenge.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;See [[Let’s Encrypt]]&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nging/conf.d/hsts.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# The standard add_header from Nginx has two issues:&lt;br /&gt;
#  - it will result in duplicate headers if the proxied content set it as well&lt;br /&gt;
#  - if a subblock uses add_header as well, parent block headers are ignored&lt;br /&gt;
# Using more_set_headers fixes both issues&lt;br /&gt;
&lt;br /&gt;
# WARNING&lt;br /&gt;
# Make sure you have HTTPS correctly setup before including this file.&lt;br /&gt;
# Failing to do so will render your site inaccessible.&lt;br /&gt;
&lt;br /&gt;
# Activate HTTP Strict Transport Security&lt;br /&gt;
# max-age value is in seconds. 63072000 is 2 years&lt;br /&gt;
more_set_headers &amp;quot;Strict-Transport-Security: max-age=63072000; includeSubDomains&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# If subdomains are still using insecure HTTP, remove the includeSubDomains:&lt;br /&gt;
# more_set_headers &amp;quot;Strict-Transport-Security: max-age=63072000&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/security-headers.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Some safe security headers that can almost always be used&lt;br /&gt;
&lt;br /&gt;
# The standard add_header from Nginx has two issues:&lt;br /&gt;
#  - it will result in duplicate headers if the proxied content set it as well&lt;br /&gt;
#  - if a subblock uses add_header as well, parent block headers are ignored&lt;br /&gt;
# Using more_set_headers fixes both issues&lt;br /&gt;
&lt;br /&gt;
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection&lt;br /&gt;
more_set_headers &amp;quot;X-XSS-Protection: 1; mode=block&amp;quot;;&lt;br /&gt;
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options&lt;br /&gt;
more_set_headers &amp;quot;X-Content-Type-Options: nosniff&amp;quot;;&lt;br /&gt;
# Prevent access from flash and PDF&lt;br /&gt;
more_set_headers &amp;quot;X-Permitted-Cross-Domain-Policies: none&amp;quot;;&lt;br /&gt;
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy&lt;br /&gt;
more_set_headers &amp;quot;Referrer-Policy: strict-origin-when-cross-origin&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/x-frame-options-deny.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;/etc/nginx/snippets/x-frame-options-sameorigin.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# The standard add_header from Nginx has two issues:&lt;br /&gt;
#  - it will result in duplicate headers if the proxied content set it as well&lt;br /&gt;
#  - if a subblock uses add_header as well, parent block headers are ignored&lt;br /&gt;
# Using more_set_headers fixes both issues&lt;br /&gt;
&lt;br /&gt;
# Prevent all usages of the website in an iframe.&lt;br /&gt;
# Warning: This might break the site if it uses iframes for internal&lt;br /&gt;
# functionalities. You might want to use the less strict&lt;br /&gt;
# x-frame-options-sameorigin.conf in that case.&lt;br /&gt;
more_set_headers &amp;quot;X-Frame-Options: DENY&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# The standard add_header from Nginx has two issues:&lt;br /&gt;
#  - it will result in duplicate headers if the proxied content set it as well&lt;br /&gt;
#  - if a subblock uses add_header as well, parent block headers are ignored&lt;br /&gt;
# Using more_set_headers fixes both issues&lt;br /&gt;
&lt;br /&gt;
# Prevent usage of the website in an iframe from other domains.&lt;br /&gt;
# Warning: This will still allow iframe on your own domain.&lt;br /&gt;
# For a more strict policy, use x-frame-options-deny.conf&lt;br /&gt;
more_set_headers &amp;quot;X-Frame-Options: SAMEORIGIN&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/https-permanent-redirect.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Reply to the browser with a permanent redirect to the secure version of the page&lt;br /&gt;
# Wrapped in a location block so that other snippets (acme-challenge.conf) can override that.&lt;br /&gt;
location / {&lt;br /&gt;
    return 301 https://$host$request_uri;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/listen-http.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;/etc/nginx/snippets/listen-https.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Obviously, you need to replace the example IP addresses by the one of your server. You can get the IP of your server with the commands &amp;lt;code&amp;gt;curl https://ipv6.meurisse.org&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;curl https://ipv4.meurisse.org&amp;lt;/code&amp;gt;.&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
listen [2001:db8:3:47d0::2e:7]:80;&lt;br /&gt;
listen 203.0.113.23:80;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
listen [2001:db8:3:47d0::2e:7]:443 ssl http2;&lt;br /&gt;
listen 203.0.113.23:443 ssl http2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/ssl.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
ssl on;&lt;br /&gt;
ssl_stapling on;&lt;br /&gt;
&lt;br /&gt;
# The standard add_header from Nginx has two issues:&lt;br /&gt;
#  - it will result in duplicate headers if the proxied content set it as well&lt;br /&gt;
#  - if a subblock uses add_header as well, parent block headers are ignored&lt;br /&gt;
# Using more_set_headers fixes both issues&lt;br /&gt;
&lt;br /&gt;
more_set_headers &#039;Expect-CT: max-age=86400&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Auth ===&lt;br /&gt;
&amp;lt;span id=&amp;quot;http-auth-anchor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== Install ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install apache2-utils&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Create Password File ====&lt;br /&gt;
If the folder doesn&#039;t exist, you need to create it using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkdir /etc/nginx/htpasswd&lt;br /&gt;
$ sudo chmod 710 /etc/nginx/htpasswd&lt;br /&gt;
$ sudo chown root:www-data /etc/nginx/htpasswd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The create the user file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo touch /etc/nginx/htpasswd/generic.htpasswd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want different website to have different users, you can create as many password files as you want.&lt;br /&gt;
&lt;br /&gt;
==== Add User ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo htpasswd /etc/nginx/htpasswd/generic.htpasswd jdoe&lt;br /&gt;
New password: &lt;br /&gt;
Re-type new password: &lt;br /&gt;
Adding password for user jdoe&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To update a password user, just run the same command.&lt;br /&gt;
&lt;br /&gt;
Nginx will pick the modified file automatically. There is nothing to restart.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
To restrict access to a site or part of it, add the following lines to a &amp;lt;code&amp;gt;server&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;location&amp;lt;/code&amp;gt; config&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
auth_basic &amp;quot;You shall not pass!&amp;quot;;&lt;br /&gt;
auth_basic_user_file /etc/nginx/htpasswd/generic.htpasswd;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
You need to open TCP ports 80 and 443 in your firewall. {{nftables/config|category = Web|tcp_port_out = |udp_port_out = |user_out = |tcp_port_in = 80, 443|udp_port_in = }}&lt;br /&gt;
&lt;br /&gt;
=== httpoxy ===&lt;br /&gt;
The [https://httpoxy.org/ httpoxy] security flow is a flow targeting CGI scripts using the &#039;&#039;Proxy&#039;&#039; HTTP header. It is possible to mitigate it by filtering out this header in fastcgi and proxy calls in Nginx.&lt;br /&gt;
&lt;br /&gt;
Edit files &amp;lt;code&amp;gt;/etc/nginx/fastcgi.conf&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/nginx/fastcgi_params&amp;lt;/code&amp;gt; and add these lines&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# httpoxy.org&lt;br /&gt;
fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Also edit file &amp;lt;code&amp;gt;/etc/nginx/proxy_params&amp;lt;/code&amp;gt; add add these lines&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# httpoxy.org&lt;br /&gt;
proxy_set_header Proxy &amp;quot;&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== /var/www/ permissions ===&lt;br /&gt;
Setting the [https://en.wikipedia.org/wiki/Setgid setgid] bit on the &amp;lt;code&amp;gt;/var/www/&amp;lt;/code&amp;gt; allows to make sure that new files are readable by Nginx.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo chmod 2750 /var/www/&lt;br /&gt;
$ sudo chown root:www-data /var/www/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This also revoke the default read permission to user outside the &amp;lt;code&amp;gt;www-data&amp;lt;/code&amp;gt; group. They don&#039;t need it and some data might not be public here.&lt;br /&gt;
&lt;br /&gt;
== New Site ==&lt;br /&gt;
This section shows how to create a new website in your Nginx server. Instructions here a very generic and will need to be adapted for your specific case.&lt;br /&gt;
&lt;br /&gt;
In the following sections, we are showing the conf for a site called &#039;&#039;mysite.example.org&#039;&#039;. You need to replace all occurrences of &#039;&#039;mysite&#039;&#039;.example.org by the name of the site you want to create.&lt;br /&gt;
&lt;br /&gt;
{{Nginx/New Site|domain = mysite.example.org|config = server {&lt;br /&gt;
    include snippets/listen-http.conf;&lt;br /&gt;
    server_name mysite.example.org;&lt;br /&gt;
&lt;br /&gt;
    access_log /var/log/nginx/mysite.example.org.access.log;&lt;br /&gt;
    error_log /var/log/nginx/mysite.example.org.error.log info;&lt;br /&gt;
&lt;br /&gt;
    include snippets/acme-challenge.conf;&lt;br /&gt;
    include snippets/https-permanent-redirect.conf;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
    include snippets/listen-https.conf;&lt;br /&gt;
    server_name mysite.example.org;&lt;br /&gt;
&lt;br /&gt;
    access_log /var/log/nginx/mysite.example.org.access.log;&lt;br /&gt;
    error_log /var/log/nginx/mysite.example.org.error.log info;&lt;br /&gt;
&lt;br /&gt;
    include snippets/acme-challenge.conf;&lt;br /&gt;
    #include snippets/ssl.conf;&lt;br /&gt;
    #ssl_certificate      /etc/letsencrypt/live/mysite.example.org/fullchain.pem;&lt;br /&gt;
    #ssl_certificate_key  /etc/letsencrypt/live/mysite.example.org/privkey.pem;&lt;br /&gt;
    #include snippets/hsts.conf;&lt;br /&gt;
&lt;br /&gt;
    include snippets/security-headers.conf;&lt;br /&gt;
    include snippets/x-frame-options-deny.conf;&lt;br /&gt;
&lt;br /&gt;
    root /var/www/mysite.example.org;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Fail2Ban ==&lt;br /&gt;
Webservers are usually a good target for hackers. A lot of them contain outdated, insecure and misconfigured software and if your server run languages like PHP, the attacker would be able to execute pretty much any action once he cracked your server.&lt;br /&gt;
&lt;br /&gt;
Warning: The rules described here protect against generic attacks on your webserver. If you install some specific software that has it&#039;s own authentication (owncoud, roundcube...) you need to create rules for it.&lt;br /&gt;
&lt;br /&gt;
=== nginx-http-auth ===&lt;br /&gt;
First rule is pretty simple simple. It protect against http authentication (the ugly popups asking your password before you enter the site).&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/nginx-http-auth.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[nginx-http-auth]&lt;br /&gt;
enabled = true&lt;br /&gt;
port    = http,https&lt;br /&gt;
logpath = /var/log/nginx/*error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nginx-botsearch ===&lt;br /&gt;
This rule match 404 errors when bots try to find unsecure software on your server. While it should generally work fine, you should check ban report to make sure you don&#039;t lock out legitimate users.&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/nginx-botsearch.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[nginx-botsearch]&lt;br /&gt;
enabled  = true&lt;br /&gt;
port     = http,https&lt;br /&gt;
logpath  = /var/log/nginx/*error.log&lt;br /&gt;
maxretry = 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Fail2Ban]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Web Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Nginx&amp;diff=677</id>
		<title>Nginx</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Nginx&amp;diff=677"/>
		<updated>2018-08-12T13:10:17Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Update gzip mime types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Nginx installation guide}}&lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
This guide is written for Debian Stretch. Other Debian based distributions should work as well.&lt;br /&gt;
&lt;br /&gt;
While not mandatory, the guide makes use of the following programs to enhance the security of the installation&lt;br /&gt;
* [[nftables]]&lt;br /&gt;
* [[Fail2Ban]]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install nginx-light libnginx-mod-http-headers-more-filter&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nginx_modsite ===&lt;br /&gt;
nginx_modsite is a script that allows to activate or deactivate a site simply, without having to handle symlinks manually. In Debian, it is distributed in source form as part of the &amp;lt;code&amp;gt;nginx-doc&amp;lt;/code&amp;gt; package. The easiest is to download it directly from [https://anonscm.debian.org/cgit/collab-maint/nginx.git/tree/debian/help/examples/nginx_modsite the source repository]:&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo curl -o /usr/local/sbin/nginx_modsite &amp;quot;https://anonscm.debian.org/cgit/collab-maint/nginx.git/plain/debian/help/examples/nginx_modsite&amp;quot;&lt;br /&gt;
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current&lt;br /&gt;
                                 Dload  Upload   Total   Spent    Left  Speed&lt;br /&gt;
100  4625  100  4625    0     0  12836      0 --:--:-- --:--:-- --:--:-- 12847&lt;br /&gt;
$ sudo chmod +x /usr/local/sbin/nginx_modsite&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
Replace file &amp;lt;code&amp;gt;/etc/nginx/nginx.conf&amp;lt;/code&amp;gt; with:&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
user www-data;&lt;br /&gt;
worker_processes auto;&lt;br /&gt;
pid /run/nginx.pid;&lt;br /&gt;
include /etc/nginx/modules-enabled/*.conf;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
  worker_connections 768;&lt;br /&gt;
  # multi_accept on;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
  ##&lt;br /&gt;
  # Basic Settings&lt;br /&gt;
  ##&lt;br /&gt;
  sendfile on;&lt;br /&gt;
  tcp_nopush on;&lt;br /&gt;
  tcp_nodelay on;&lt;br /&gt;
  keepalive_timeout 65;&lt;br /&gt;
  types_hash_max_size 2048;&lt;br /&gt;
&lt;br /&gt;
  include /etc/nginx/mime.types;&lt;br /&gt;
  default_type application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
  ##&lt;br /&gt;
  # Logging Settings&lt;br /&gt;
  ##&lt;br /&gt;
  access_log /var/log/nginx/access.log;&lt;br /&gt;
  error_log /var/log/nginx/error.log;&lt;br /&gt;
&lt;br /&gt;
  ##&lt;br /&gt;
  # Virtual Host Configs&lt;br /&gt;
  ##&lt;br /&gt;
  include /etc/nginx/conf.d/*.conf;&lt;br /&gt;
  include /etc/nginx/sites-enabled/*;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== conf.d ===&lt;br /&gt;
The conf.d folder stores shared configuration shared between all the sites hosted on your server.&lt;br /&gt;
&lt;br /&gt;
Create the following files:&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/dns.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# DNS resolver&lt;br /&gt;
# It is required for OCSP Stapling. It might also be used if you use a hostname for upstream servers&lt;br /&gt;
resolver 127.0.0.1;&lt;br /&gt;
# If you don&#039;t have a DNS resolver on your machine you can use google public ones instead&lt;br /&gt;
#resolver 8.8.8.8 8.8.4.4;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/gzip.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
gzip on;&lt;br /&gt;
&lt;br /&gt;
# Insert header &amp;quot;Vary: Accept-Encoding&amp;quot; in responses&lt;br /&gt;
# https://www.maxcdn.com/blog/accept-encoding-its-vary-important/&lt;br /&gt;
gzip_vary on;&lt;br /&gt;
&lt;br /&gt;
gzip_comp_level 6;&lt;br /&gt;
&lt;br /&gt;
gzip_proxied any;&lt;br /&gt;
&lt;br /&gt;
gzip_min_length 500;&lt;br /&gt;
&lt;br /&gt;
gzip_types&lt;br /&gt;
  application/atom+xml&lt;br /&gt;
  application/atom_xml&lt;br /&gt;
  application/javascript&lt;br /&gt;
  application/json&lt;br /&gt;
  application/ld+json&lt;br /&gt;
  application/manifest+json&lt;br /&gt;
  application/rss+xml&lt;br /&gt;
  application/text&lt;br /&gt;
  application/vnd.geo+json&lt;br /&gt;
  application/vnd.microsoft.icon&lt;br /&gt;
  application/vnd.ms-fontobject&lt;br /&gt;
  application/x-json&lt;br /&gt;
  application/x-font-opentype&lt;br /&gt;
  application/x-font-truetype&lt;br /&gt;
  application/x-font-ttf&lt;br /&gt;
  application/x-javascript&lt;br /&gt;
  application/x-web-app-manifest+json&lt;br /&gt;
  application/xhtml+xml&lt;br /&gt;
  application/xml&lt;br /&gt;
  application/xml+rss&lt;br /&gt;
  font/eot&lt;br /&gt;
  font/opentype&lt;br /&gt;
  font/otf&lt;br /&gt;
  image/bmp&lt;br /&gt;
  image/svg+xml&lt;br /&gt;
  image/vnd.microsoft.icon&lt;br /&gt;
  image/x-icon&lt;br /&gt;
  text/cache-manifest&lt;br /&gt;
  text/css&lt;br /&gt;
  text/javascript&lt;br /&gt;
  text/plain&lt;br /&gt;
  text/vcard&lt;br /&gt;
  text/vnd.rim.location.xloc&lt;br /&gt;
  text/vtt&lt;br /&gt;
  text/x-component&lt;br /&gt;
  text/x-cross-domain-policy&lt;br /&gt;
  text/xml;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/php.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;See documentation to [[PHP|install PHP]].&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/server_tokens.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Hide nginx version&lt;br /&gt;
# This doesn&#039;t provides any real security but makes hackers life a bit more difficult&lt;br /&gt;
server_tokens off;&lt;br /&gt;
more_clear_headers Server;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/conf.d/ssl.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
ssl_protocols TLSv1.2;&lt;br /&gt;
ssl_prefer_server_ciphers on;&lt;br /&gt;
&lt;br /&gt;
# Cipher list from https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility&lt;br /&gt;
ssl_ciphers &amp;quot;ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# If you have a version of openssl &amp;lt; 1.1.0, you need to remove X25519 from the list&lt;br /&gt;
ssl_ecdh_curve X25519:secp256k1:secp384r1;&lt;br /&gt;
&lt;br /&gt;
# Support OSCP Stapling. Check that resolver from in dns.conf is working&lt;br /&gt;
ssl_stapling on;&lt;br /&gt;
ssl_stapling_verify on;&lt;br /&gt;
ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;&lt;br /&gt;
&lt;br /&gt;
# Support SSL session cache&lt;br /&gt;
ssl_session_timeout 1d;&lt;br /&gt;
ssl_session_cache shared:NginxCache:50m;&lt;br /&gt;
ssl_session_tickets off; # https://timtaubert.de/blog/2014/11/the-sad-state-of-server-side-tls-session-resumption-implementations/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== snippets ===&lt;br /&gt;
The snippets folder allows you to store bits of configuration that you can later include in virtual hosts configuration.This saves a lot of typing and errors when creating a new site.&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nging/conf.d/acme-challenge.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;See [[Let’s Encrypt]]&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nging/conf.d/hsts.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Activate HTTP Strict Transport Security&lt;br /&gt;
# max-age value is in seconds. 31536000 is 1 year&lt;br /&gt;
&lt;br /&gt;
add_header Strict-Transport-Security max-age=31536000 always;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/security-headers.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Some safe security headers that can almost be used for any site&lt;br /&gt;
&lt;br /&gt;
# https://stackoverflow.com/a/24998106/1631174&lt;br /&gt;
add_header X-XSS-Protection &amp;quot;1; mode=block&amp;quot; always;&lt;br /&gt;
# https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-Content-Type-Options&lt;br /&gt;
add_header X-Content-Type-Options nosniff always;&lt;br /&gt;
# Prevent access from flash and PDF&lt;br /&gt;
add_header X-Permitted-Cross-Domain-Policies none always;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/x-frame-options-deny.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;/etc/nginx/snippets/x-frame-options-sameorigin.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Prevent all usages of the website in an iframe.&lt;br /&gt;
# Warning: This might break the site if it uses iframes for internal&lt;br /&gt;
# functionalities. You might want to use the less strict&lt;br /&gt;
# x-frame-options-sameorigin.conf in that case.&lt;br /&gt;
&lt;br /&gt;
add_header X-Frame-Options DENY always;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Prevent usage of the website in an iframe from other domains.&lt;br /&gt;
# Warning: This might break the site if it uses iframes for internal&lt;br /&gt;
# functionalities. You might want to use the less strict&lt;br /&gt;
# x-frame-options-sameorigin.conf in that case.&lt;br /&gt;
&lt;br /&gt;
add_header X-Frame-Options SAMEORIGIN always;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/https-permanent-redirect.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# Reply to the browser with a permanent redirect to the secure version of the page&lt;br /&gt;
# Wrapped in a location block so that other snippets (acme-challenge.conf) can override that.&lt;br /&gt;
location / {&lt;br /&gt;
    return 301 https://$host$request_uri;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/listen-http.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;/etc/nginx/snippets/listen-https.conf&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Obviously, you need to replace the example IP addresses by the one of your server. You can get the IP of your server with the commands &amp;lt;code&amp;gt;curl https://ipv6.meurisse.org&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;curl https://ipv4.meurisse.org&amp;lt;/code&amp;gt;.&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
listen [2001:db8:3:47d0::2e:7]:80;&lt;br /&gt;
listen 203.0.113.23:80;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
listen [2001:db8:3:47d0::2e:7]:443 ssl http2;&lt;br /&gt;
listen 203.0.113.23:443 ssl http2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/nginx/snippets/ssl.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
ssl on;&lt;br /&gt;
ssl_stapling on;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Auth ===&lt;br /&gt;
&amp;lt;span id=&amp;quot;http-auth-anchor&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==== Install ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install apache2-utils&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Create Password File ====&lt;br /&gt;
If the folder doesn&#039;t exist, you need to create it using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkdir /etc/nginx/htpasswd&lt;br /&gt;
$ sudo chmod 710 /etc/nginx/htpasswd&lt;br /&gt;
$ sudo chown root:www-data /etc/nginx/htpasswd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The create the user file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo touch /etc/nginx/htpasswd/generic.htpasswd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want different website to have different users, you can create as many password files as you want.&lt;br /&gt;
&lt;br /&gt;
==== Add User ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo htpasswd /etc/nginx/htpasswd/generic.htpasswd jdoe&lt;br /&gt;
New password: &lt;br /&gt;
Re-type new password: &lt;br /&gt;
Adding password for user jdoe&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To update a password user, just run the same command.&lt;br /&gt;
&lt;br /&gt;
Nginx will pick the modified file automatically. There is nothing to restart.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
To restrict access to a site or part of it, add the following lines to a &amp;lt;code&amp;gt;server&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;location&amp;lt;/code&amp;gt; config&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
auth_basic &amp;quot;You shall not pass!&amp;quot;;&lt;br /&gt;
auth_basic_user_file /etc/nginx/htpasswd/generic.htpasswd;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
You need to open TCP ports 80 and 443 in your firewall. {{nftables/config|category = Web|tcp_port_out = |udp_port_out = |user_out = |tcp_port_in = 80, 443|udp_port_in = }}&lt;br /&gt;
&lt;br /&gt;
=== httpoxy ===&lt;br /&gt;
The [https://httpoxy.org/ httpoxy] security flow is a flow targeting CGI scripts using the &#039;&#039;Proxy&#039;&#039; HTTP header. It is possible to mitigate it by filtering out this header in fastcgi and proxy calls in Nginx.&lt;br /&gt;
&lt;br /&gt;
Edit files &amp;lt;code&amp;gt;/etc/nginx/fastcgi.conf&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/nginx/fastcgi_params&amp;lt;/code&amp;gt; and add these lines&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# httpoxy.org&lt;br /&gt;
fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Also edit file &amp;lt;code&amp;gt;/etc/nginx/proxy_params&amp;lt;/code&amp;gt; add add these lines&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
# httpoxy.org&lt;br /&gt;
proxy_set_header Proxy &amp;quot;&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== /var/www/ permissions ===&lt;br /&gt;
Setting the [https://en.wikipedia.org/wiki/Setgid setgid] bit on the &amp;lt;code&amp;gt;/var/www/&amp;lt;/code&amp;gt; allows to make sure that new files are readable by Nginx.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo chmod 2750 /var/www/&lt;br /&gt;
$ sudo chown root:www-data /var/www/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This also revoke the default read permission to user outside the &amp;lt;code&amp;gt;www-data&amp;lt;/code&amp;gt; group. They don&#039;t need it and some data might not be public here.&lt;br /&gt;
&lt;br /&gt;
== New Site ==&lt;br /&gt;
This section shows how to create a new website in your Nginx server. Instructions here a very generic and will need to be adapted for your specific case.&lt;br /&gt;
&lt;br /&gt;
In the following sections, we are showing the conf for a site called &#039;&#039;mysite.example.org&#039;&#039;. You need to replace all occurrences of &#039;&#039;mysite&#039;&#039;.example.org by the name of the site you want to create.&lt;br /&gt;
&lt;br /&gt;
{{Nginx/New Site|domain = mysite.example.org|config = server {&lt;br /&gt;
    include snippets/listen-http.conf;&lt;br /&gt;
    server_name mysite.example.org;&lt;br /&gt;
&lt;br /&gt;
    access_log /var/log/nginx/mysite.example.org.access.log;&lt;br /&gt;
    error_log /var/log/nginx/mysite.example.org.error.log info;&lt;br /&gt;
&lt;br /&gt;
    include snippets/acme-challenge.conf;&lt;br /&gt;
    include snippets/https-permanent-redirect.conf;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
    include snippets/listen-https.conf;&lt;br /&gt;
    server_name mysite.example.org;&lt;br /&gt;
&lt;br /&gt;
    access_log /var/log/nginx/mysite.example.org.access.log;&lt;br /&gt;
    error_log /var/log/nginx/mysite.example.org.error.log info;&lt;br /&gt;
&lt;br /&gt;
    include snippets/acme-challenge.conf;&lt;br /&gt;
    #include snippets/ssl.conf;&lt;br /&gt;
    #ssl_certificate      /etc/letsencrypt/live/mysite.example.org/fullchain.pem;&lt;br /&gt;
    #ssl_certificate_key  /etc/letsencrypt/live/mysite.example.org/privkey.pem;&lt;br /&gt;
    #include snippets/hsts.conf;&lt;br /&gt;
&lt;br /&gt;
    include snippets/security-headers.conf;&lt;br /&gt;
    include snippets/x-frame-options-deny.conf;&lt;br /&gt;
&lt;br /&gt;
    root /var/www/mysite.example.org;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Fail2Ban ==&lt;br /&gt;
Webservers are usually a good target for hackers. A lot of them contain outdated, insecure and misconfigured software and if your server run languages like PHP, the attacker would be able to execute pretty much any action once he cracked your server.&lt;br /&gt;
&lt;br /&gt;
Warning: The rules described here protect against generic attacks on your webserver. If you install some specific software that has it&#039;s own authentication (owncoud, roundcube...) you need to create rules for it.&lt;br /&gt;
&lt;br /&gt;
=== nginx-http-auth ===&lt;br /&gt;
First rule is pretty simple simple. It protect against http authentication (the ugly popups asking your password before you enter the site).&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/nginx-http-auth.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[nginx-http-auth]&lt;br /&gt;
enabled = true&lt;br /&gt;
port    = http,https&lt;br /&gt;
logpath = /var/log/nginx/*error.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nginx-botsearch ===&lt;br /&gt;
This rule match 404 errors when bots try to find unsecure software on your server. While it should generally work fine, you should check ban report to make sure you don&#039;t lock out legitimate users.&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/nginx-botsearch.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[nginx-botsearch]&lt;br /&gt;
enabled  = true&lt;br /&gt;
port     = http,https&lt;br /&gt;
logpath  = /var/log/nginx/*error.log&lt;br /&gt;
maxretry = 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Fail2Ban]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Web Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Exim&amp;diff=676</id>
		<title>Exim</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Exim&amp;diff=676"/>
		<updated>2018-05-03T11:29:14Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Update certmanage command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisite ==&lt;br /&gt;
This article is part of the [[Emails/Complete|emails]] series. It is assumed that you already covered [[Dovecot]].&lt;br /&gt;
&lt;br /&gt;
This guide also uses the following software:&lt;br /&gt;
* [[Let’s Encrypt]] or another way to get certificates&lt;br /&gt;
* [[nftables]] as a firewall&lt;br /&gt;
* [[Fail2Ban]]. Optional but recommended for security. &lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install exim4-daemon-heavy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Note: The heavy version is needed to use Dovecot as an authentication mechanism.&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== Base ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/exim4/conf.d/main/00_local_settings&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
daemon_smtp_ports = smtp : 587&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== TLS Certificates ===&lt;br /&gt;
&lt;br /&gt;
==== Create folder ====&lt;br /&gt;
Unlike other programs, Exim doesn&#039;t read it&#039;s certificate as the root user. So it will be unable to read them from the standard let’sencrypt folder. We will create a folder readable by Exim where we can safely drop certificates later&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkdir -m 710 /etc/exim4/private&lt;br /&gt;
$ sudo chgrp Debian-exim /etc/exim4/private&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Get certificate ====&lt;br /&gt;
# Edit file &amp;lt;code&amp;gt;/etc/nginx/sites-enabled/noweb&amp;lt;/code&amp;gt; an add a &amp;lt;code&amp;gt;server_name&amp;lt;/code&amp;gt; line for &amp;lt;code&amp;gt;smtp.example.org&amp;lt;/code&amp;gt;&lt;br /&gt;
# Activate your new domain in Nginx&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl reload nginx.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Edit file &amp;lt;code&amp;gt;/usr/local/sbin/renew_certificates&amp;lt;/code&amp;gt; and add the following to the config list&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;domains&amp;quot;: [&amp;quot;smtp.example.org&amp;quot;],&lt;br /&gt;
    &amp;quot;reload&amp;quot;: [[&amp;quot;cp&amp;quot;, &amp;quot;--preserve=all&amp;quot;, &amp;quot;/etc/letsencrypt/live/smtp.example.org/fullchain.pem&amp;quot;, &amp;quot;/etc/letsencrypt/live/smtp.example.org/privkey.pem&amp;quot;, &amp;quot;/etc/exim4/private/&amp;quot;], [&amp;quot;/bin/systemctl&amp;quot;, &amp;quot;reload&amp;quot;, &amp;quot;exim4.service&amp;quot;]]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Get Your certificate{{Let’s Encrypt/New Cert Command|domain = smtp.example.org|command = cp --preserve=all /etc/letsencrypt/live/smtp.example.org/{fullchain,privkey}.pem /etc/exim4/private/&lt;br /&gt;
/bin/systemctl reload exim4.service}}&lt;br /&gt;
&lt;br /&gt;
==== Use Certificate ====&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/exim4/conf.d/main/00_local_settings&amp;lt;/code&amp;gt; and add the following lines&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
MAIN_TLS_ENABLE = true&lt;br /&gt;
MAIN_TLS_CERTIFICATE = /etc/exim4/private/fullchain.pem&lt;br /&gt;
MAIN_TLS_PRIVATEKEY = /etc/exim4/private/privkey.pem&lt;br /&gt;
# GNUTLS ciphers: https://www.gnutls.org/manual/html_node/Priority-Strings.html&lt;br /&gt;
# test using: gnutls-cli -l --priority PFS:+RSA:...&lt;br /&gt;
tls_require_ciphers = PFS:+RSA:-ARCFOUR-128:-3DES-CBC:-MD5:-SIGN-RSA-MD5:-CAMELLIA-128-CBC:-CAMELLIA-256-CBC:-CURVE-SECP192R1:%SERVER_PRECEDENCE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
We will use dovecot to verify user login and password. It lets us have only one database of users and share it between the different email infrastructure parts (smtp, imap...)&lt;br /&gt;
&lt;br /&gt;
==== Dovecot ====&lt;br /&gt;
First modify the file &amp;lt;code&amp;gt;/etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt;. Find the section &amp;lt;code&amp;gt;service auth&amp;lt;/code&amp;gt; and add the following lines&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
service auth {&lt;br /&gt;
    ...&lt;br /&gt;
    # Authentication socket used by Exim&lt;br /&gt;
    unix_listener auth-client {&lt;br /&gt;
        mode = 0600&lt;br /&gt;
        user = Debian-exim&lt;br /&gt;
    }&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;And apply config with&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl restart dovecot.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Exim ====&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/exim4/conf.d/auth/15_dovecot&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
dovecot_login:&lt;br /&gt;
  driver = dovecot&lt;br /&gt;
  public_name = LOGIN&lt;br /&gt;
  server_socket = /run/dovecot/auth-client&lt;br /&gt;
  server_set_id = $auth1&lt;br /&gt;
&lt;br /&gt;
dovecot_plain:&lt;br /&gt;
  driver = dovecot&lt;br /&gt;
  public_name = PLAIN&lt;br /&gt;
  server_socket = /run/dovecot/auth-client&lt;br /&gt;
  server_set_id = $auth1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Smart catch ===&lt;br /&gt;
This is my #1 spam fighting technique. It allows me to have an infinite number of email addresses while still preventing spammers to generate them.&lt;br /&gt;
&lt;br /&gt;
You can check the [[Exim/SmartCatch|installation instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Dovecot Delivery ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/exim4/conf.d/router/899_dovecot&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
## router/899_dovecot&lt;br /&gt;
#################################&lt;br /&gt;
&lt;br /&gt;
dovecot:&lt;br /&gt;
  debug_print = &amp;quot;R: dovecot for $local_part@$domain&amp;quot;&lt;br /&gt;
  driver = accept&lt;br /&gt;
  domains = +local_domains&lt;br /&gt;
  transport = dovecot_virtual_delivery&lt;br /&gt;
  cannot_route_message = Unknown user&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Then create &amp;lt;code&amp;gt;/etc/exim4/conf.d/transport/99_dovecot_virtual_delivery&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
dovecot_virtual_delivery:&lt;br /&gt;
  driver = pipe&lt;br /&gt;
  command = /usr/lib/dovecot/dovecot-lda -d $local_part -a $original_local_part@$original_domain  -f $sender_address -e&lt;br /&gt;
  message_prefix =&lt;br /&gt;
  message_suffix =&lt;br /&gt;
  delivery_date_add&lt;br /&gt;
  envelope_to_add&lt;br /&gt;
  return_path_add&lt;br /&gt;
  log_output&lt;br /&gt;
  user = vmail&lt;br /&gt;
  temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
{{nftables/config|category = Exim|tcp_port_in = 25, 587|udp_port_in = |tcp_port_out =25 |udp_port_out = |user_out = }}&lt;br /&gt;
&lt;br /&gt;
=== DKIM ===&lt;br /&gt;
[[Exim/DKIM]]&lt;br /&gt;
&lt;br /&gt;
=== Paniclog ===&lt;br /&gt;
In case Exim encounter a grave problem (cannot start, lost email…) it will write a log to &amp;lt;code&amp;gt;/var/log/exim4/paniclog&amp;lt;/code&amp;gt;.  There is a cron job that monitor this file and will send you a daily mail if it is not empty.&lt;br /&gt;
&lt;br /&gt;
It is important to not miss these emails and act on them quickly. I use a [[Dovecot|Sieve]] script to mark them as important:&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
if header :matches &amp;quot;Subject&amp;quot; &amp;quot;exim paniclog on * has non-zero size&amp;quot; {&lt;br /&gt;
    addflag &amp;quot;\\Flagged&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Also note that this log file is never rotated. So you will get the same email over and over until you do it manually. It can be done with:&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo logrotate -f /etc/logrotate.d/exim4-paniclog&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To have this rotation done automatically (and thus receive the email only once), edit &amp;lt;code&amp;gt;/etc/default/exim4&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# Rotate /var/log/exim4/paniclog after email is sent to admin&lt;br /&gt;
E4BCD_WATCH_PANICLOG=&#039;once&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fail2Ban ==&lt;br /&gt;
The filter for Exim is already included in Debian, we just need to activate it. It will filter people trying to log on your server, trying to make it relay spam, and sending nonsense command.&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/exim.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[exim]&lt;br /&gt;
enabled  = true&lt;br /&gt;
port     = 25,587&lt;br /&gt;
logpath  = %(exim_main_log)s&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Email Server]]&lt;br /&gt;
[[Category:Fail2Ban]]&lt;br /&gt;
[[Category:Linux Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Spamassassin&amp;diff=675</id>
		<title>Spamassassin</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Spamassassin&amp;diff=675"/>
		<updated>2018-05-03T06:22:24Z</updated>

		<summary type="html">&lt;p&gt;Vincent: `pyzor discover` command was removed https://github.com/SpamExperts/pyzor/commit/50f2bf5aa47ed863de78c413ff7114f5e54f5a9b&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SpamAssassin is a spam detection software intended to be run on your mail server. It rank mail using several criteria criteria that can be put in the following families&lt;br /&gt;
* DNS Whitelist/Blacklist: does the server that sent you the email sent spam before?&lt;br /&gt;
* URI Blacklist: does the body of the message contain links to some bad sites?&lt;br /&gt;
* Distributed Spam Hashes: does someone reported the same message as spam already?&lt;br /&gt;
* Bayesian Filter: compare email to your past spam and ham&lt;br /&gt;
* SPF/DKIM: check is the &#039;&#039;from&#039;&#039; email address that you see is legitimate&lt;br /&gt;
* Static Rules: a lot of manually crafted rules by SpamAssassin contributors&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This article is part of the [[Emails/Complete|emails]] series. It is assumed that you already covered [[Dovecot]] and [[Exim]].&lt;br /&gt;
&lt;br /&gt;
Optional prerequisites:&lt;br /&gt;
* [[nftables]] is used as a firewall here. You can however replace it by any firewall you use.&lt;br /&gt;
* [[Munin]] allows you to monitor the spam/ham ratio of your installation.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install spamassassin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
After changing config in &amp;lt;code&amp;gt;/etc/spamassassin/&amp;lt;/code&amp;gt;, don&#039;t forget tell SpamAssassin to reload config&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo service spamassassin reload&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bayesian filter ===&lt;br /&gt;
&lt;br /&gt;
To reach a good efficiency, SpamAssassin Bayesian filter need to be trained with both spam and ham messages. You can use your actual mailbox for that but note the following points:&lt;br /&gt;
* Be sure that the folders you use for training contain only spam or ham. If a folder contain a mix of them, SpamAssassin will learn wrong info and produce bad quality results&lt;br /&gt;
* To be effective you need between 1000 and 5000 messages each of both spam and ham.&lt;br /&gt;
* You need to have more ham than spam to train. Otherwise, SpamAssassin might become biased toward spam.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo -u vmail sa-learn --spam --progress --dir /var/maildir/&amp;lt;username&amp;gt;/Maildir/.Spam/cur/&lt;br /&gt;
$ sudo -u vmail sa-learn --ham --progress --dir /var/maildir/&amp;lt;username&amp;gt;/Maildir/cur/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of the database, you can run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo -u vmail sa-learn --dump magic&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pyzor ===&lt;br /&gt;
&lt;br /&gt;
==== Install ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install pyzor &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Firewall ====&lt;br /&gt;
{{nftables/config|category=Pyzor (Spamassassin)|tcp_port_in=|udp_port_in=|tcp_port_out=24441|udp_port_out=24441|user_out=}}&lt;br /&gt;
&lt;br /&gt;
=== Razor ===&lt;br /&gt;
&lt;br /&gt;
==== Install ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install razor &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Firewall ====&lt;br /&gt;
{{nftables/config|category=Razor (Spamassassin)|tcp_port_in=|udp_port_in=|tcp_port_out=2703|udp_port_out=|user_out=}}&lt;br /&gt;
&lt;br /&gt;
==== Configure ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo -u vmail razor-admin -create&lt;br /&gt;
$ sudo -u vmail razor-admin -register&lt;br /&gt;
Register successful.  Identity stored in /var/maildir/.razor/identity-xo4OkrHieL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Report Headers ===&lt;br /&gt;
&lt;br /&gt;
SpamAssassin can had headers in the messages it scan. It will help you investigate things in case you get false-positive are false-negative.&lt;br /&gt;
&lt;br /&gt;
Add the following lines to &amp;lt;code&amp;gt;/etc/spamassassin/local.cf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
# The status header is used by other programs to read the spam status. Don&#039;t modify the part before tests=...&lt;br /&gt;
add_header all Status _YESNO_, hits=_HITS_ required=_REQD_ tests=_TESTSSCORES(,)_ autolearn=_AUTOLEARN_&lt;br /&gt;
add_header all Details version=_VERSION_ _REPORT_&lt;br /&gt;
add_header all Pyzor _PYZOR_&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure service ===&lt;br /&gt;
Edit file &amp;lt;code&amp;gt;/etc/default/spamassassin&amp;lt;/code&amp;gt; and change the following line&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
OPTIONS=&amp;quot;--create-prefs --max-children 5 -u vmail --listen /run/spamd.socket&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Create file &amp;lt;code&amp;gt;/etc/spamassassin/spamc.conf&amp;lt;/code&amp;gt; with the following content&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
--socket /run/spamd.socket&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;It&#039;s now time to enable the Spamassassin service&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl enable spamassassin.service&lt;br /&gt;
$ sudo systemctl start spamassassin.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cron ===&lt;br /&gt;
Spamassassin authors publish updated rules on a daily basis. To stay up-to-date, edit file &amp;lt;code&amp;gt;/etc/default/spamassassin&amp;lt;/code&amp;gt; and set option&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
CRON=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Integrate with exim ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install sa-exim&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configuration is stored in &amp;lt;code&amp;gt;/etc/exim4/sa-exim.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Edit the following setting&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
SAspamcUser: vmail&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By defauld &#039;&#039;sa-exim&#039;&#039; is disabled. Remove the following lines to enable it&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
#----------------------------------------------------------------------&lt;br /&gt;
# Remove or comment out the following line to enable sa-exim&lt;br /&gt;
SAEximRunCond: 0&lt;br /&gt;
#----------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Other parameter that I change&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
SApermreject: 10.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can now restart exim to take you settings into account&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl restart exim4.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Integrate with dovecot ==&lt;br /&gt;
&lt;br /&gt;
SpamAssassin is able to learn from it&#039;s mistakes. By using the plugin &#039;&#039;dovecot-antispam&#039;&#039;, we train SpamAssassin by just moving email in or out of the spam folder.&lt;br /&gt;
&lt;br /&gt;
First install it with this command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install dovecot-antispam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in file &amp;lt;code&amp;gt;/etc/dovecot/conf.d/20-imap.conf&amp;lt;/code&amp;gt;, modify the option &#039;&#039;mail_plugins&#039;&#039; and add &#039;&#039;antispam&#039;&#039; to the list&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
protocol imap {&lt;br /&gt;
  # Space separated list of plugins to load (default is global mail_plugins).&lt;br /&gt;
  mail_plugins = $mail_plugins antispam&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/dovecot/conf.d/90-antispam.conf&amp;lt;/code&amp;gt; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
plugin {&lt;br /&gt;
    ##################&lt;br /&gt;
    # GENERIC OPTIONS&lt;br /&gt;
&lt;br /&gt;
    # Debugging options&lt;br /&gt;
    # Uncomment to get the desired debugging behaviour.&lt;br /&gt;
    # Note that in some cases stderr debugging will not be as&lt;br /&gt;
    # verbose as syslog debugging due to internal limitations.&lt;br /&gt;
    #&lt;br /&gt;
    # antispam_debug_target = syslog&lt;br /&gt;
    # antispam_debug_target = stderr&lt;br /&gt;
    # antispam_verbose_debug = 1&lt;br /&gt;
&lt;br /&gt;
    antispam_backend = pipe&lt;br /&gt;
&lt;br /&gt;
    antispam_trash_pattern_ignorecase = trash;Deleted Items;Deleted Messages&lt;br /&gt;
    antispam_spam_pattern_ignorecase = Spam;Junk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ###########################&lt;br /&gt;
    # BACKEND SPECIFIC OPTIONS&lt;br /&gt;
    #&lt;br /&gt;
&lt;br /&gt;
    #=====================&lt;br /&gt;
    # pipe plugin&lt;br /&gt;
    #&lt;br /&gt;
&lt;br /&gt;
    # temporary directory&lt;br /&gt;
    antispam_pipe_tmpdir = /tmp&lt;br /&gt;
&lt;br /&gt;
    # spam/not-spam argument (default unset which will is not what you want)&lt;br /&gt;
    antispam_pipe_program_spam_arg = -r&lt;br /&gt;
    antispam_pipe_program_notspam_arg = -k&lt;br /&gt;
&lt;br /&gt;
    # binary to pipe mail to&lt;br /&gt;
    antispam_pipe_program = /usr/bin/spamassassin&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally, reload Dovecot&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl restart dovecot.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Integrate in Munin ==&lt;br /&gt;
There is a plugin in [[Munin]] to get statistics on the ham/spam values from Spamassassin. To activate it, run the following command&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/share/munin/plugins/spamstats /etc/munin/plugins/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Then create file &amp;lt;code&amp;gt;/etc/munin/plugin-conf.d/spamstats&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[spamstats]&lt;br /&gt;
group adm&lt;br /&gt;
env.logfile mail.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Finally, restart the Munin node&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl restart munin-node.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After 5 minutes, you should see your new graph in Munin.&lt;br /&gt;
[[Category:Email Server]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Munin]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=SSH&amp;diff=674</id>
		<title>SSH</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=SSH&amp;diff=674"/>
		<updated>2018-01-25T06:28:26Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Ed25519 keys always use the new private key format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Debian}}&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# apt install openssh-server&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
The settings of these section need to be writen in file &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Custom port ====&lt;br /&gt;
&lt;br /&gt;
SSH server are a common target for hackers. Changing the port away from the default will greatly reduce the noise in your logs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Port 2200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Authentication ====&lt;br /&gt;
&lt;br /&gt;
Let&#039;s limit the users that have access to the server using ssh.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
AllowUsers myusername&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
# Make sure you have setup authentication using keys before disabling passwords&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Crypo ====&lt;br /&gt;
&lt;br /&gt;
These settings are derived from [https://stribika.github.io/2015/01/04/secure-secure-shell.html secure secure shell].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr&lt;br /&gt;
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160&lt;br /&gt;
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sandbox ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
UsePrivilegeSeparation sandbox&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== KeepAlive ====&lt;br /&gt;
&lt;br /&gt;
To make sure connections do not freeze in case of inactivity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
ClientAliveInterval 60&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generate server keys ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# cd /etc/ssh&lt;br /&gt;
# rm ssh_host_*key*&lt;br /&gt;
# ssh-keygen -t ed25519 -f ssh_host_ed25519_key -N &amp;quot;&amp;quot;&lt;br /&gt;
# ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key -N &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modify file &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; and make sure that the only lines to contains &#039;&#039;HostKey&#039;&#039; are:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
HostKey /etc/ssh/ssh_host_ed25519_key&lt;br /&gt;
HostKey /etc/ssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Publish server keys ====&lt;br /&gt;
It is possible to publish the fingerprint of your ssh server keys in a DNS server. It allows to not have to blindly trust the key on first connection.&lt;br /&gt;
&lt;br /&gt;
To get the records to publish in your dns server, run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /etc/ssh&lt;br /&gt;
$ ssh-keygen -r $(hostname)&lt;br /&gt;
myserver.example.org IN SSHFP 1 1 1c47eee032179719595c8461adba051d4a00dc8f&lt;br /&gt;
myserver.example.org IN SSHFP 1 2 7371839b62ce52ede97a9598eea0f253e1d58f88f45a8a40e05c34a846dc2e81&lt;br /&gt;
myserver.example.org IN SSHFP 4 1 80aae333ad47851f788d3d9bddd87e489f8c18f8&lt;br /&gt;
myserver.example.org IN SSHFP 4 2 5d0511b19fcd0c2793eeda983f0a8ee70cc4868b98b6d2e67f3b97df8e480762&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once published, you can check you records with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ dig +short -t SSHFP myserver.example.org | sort&lt;br /&gt;
1 1 1C47EEE032179719595C8461ADBA051D4A00DC8F&lt;br /&gt;
1 2 7371839B62CE52EDE97A9598EEA0F253E1D58F88F45A8A40E05C34A8 46DC2E81&lt;br /&gt;
4 1 80AAE333AD47851F788D3D9BDDD87E489F8C18F8&lt;br /&gt;
4 2 5D0511B19FCD0C2793EEDA983F0A8EE70CC4868B98B6D2E67F3B97DF 8E480762&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can configure your client to [[#Verify published server key|use your published keys]].&lt;br /&gt;
&lt;br /&gt;
==== issue.net ====&lt;br /&gt;
One of the danger when doing remote administration is to mechanically log in to a machine, type a few command and realise after that you where on the wrong server. &lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t happen with physical computers as they look different on first sight (either the machine itself or the place it is). The solution, make your remote servers look different.&lt;br /&gt;
&lt;br /&gt;
This can be done by uncommenting this line in &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Banner /etc/issue.net&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then edit the file &amp;lt;code&amp;gt;/etc/issue.net&amp;lt;/code&amp;gt; and make it as distinctive as possible.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
   ************  **********   ***********   **********&lt;br /&gt;
   ************ ************  ************  ************&lt;br /&gt;
   ***          ***      ***  ***      ***  ***      ***&lt;br /&gt;
   ***          ***      ***  ***      ***  ***      ***&lt;br /&gt;
   *******      ***      ***  ************  ***      ***&lt;br /&gt;
   *******      ***      ***  ***********   ***      ***&lt;br /&gt;
   ***          ***      ***  ***   ***     ***      ***&lt;br /&gt;
   ***          ***      ***  ***    ***    ***      ***&lt;br /&gt;
   ***          ************  ***     ***   ************&lt;br /&gt;
   ***           **********   ***      ***  **********&lt;br /&gt;
&lt;br /&gt;
    ##########   ###      ###           ###  ###  ###########&lt;br /&gt;
   ############  ####     ###           ###  ###  ###########&lt;br /&gt;
   ###      ###  #####    ###           ###  ###  ###&lt;br /&gt;
   ###      ###  ######   ###           ###  ###  ###&lt;br /&gt;
   ############  ### ###  ###           ###  ###  #######&lt;br /&gt;
   ############  ###  ### ###           ###  ###  #######&lt;br /&gt;
   ###      ###  ###   ######           ###  ###  ###&lt;br /&gt;
   ###      ###  ###    #####  ###      ###  ###  ###&lt;br /&gt;
   ###      ###  ###     ####   ###    ###   ###  ###########&lt;br /&gt;
   ###      ###  ###      ###    ########    ###  ###########&lt;br /&gt;
&lt;br /&gt;
Note that they are 3 files quite similar for this&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/issue&amp;lt;/code&amp;gt;: Displayed before login prompt on the physical consoles of the machines&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/issue.net&amp;lt;/code&amp;gt;: Displayed before login prompt for remote login&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/motd&amp;lt;/code&amp;gt;: Displayed after login (local and remote)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/issue&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/motd&amp;lt;/code&amp;gt; don&#039;t need any setup before being used. Just modify the content and you are ok to go.&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
If you are using OpenSSH &amp;lt; 7.2 or are not using X11 forwarding, you can disable it with&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
X11Forwarding no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restart ===&lt;br /&gt;
Restarting the SSH server while connected through SSH is usually safe. However, you need to take some precautions to avoid being locked out of your server. Make sue you do that from a stable internet connection: in case your SSH server doesn&#039;t restart correctly, you don&#039;t want your active SSH connection to drop while you fix the issue.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# systemctl restart ssh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If you are connected through SSH, test that your server restarting correctly by opening a second connection&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ ssh -o &amp;quot;ControlMaster=yes&amp;quot; myserver.example.org&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The &amp;lt;code&amp;gt;-o &amp;quot;ControlMaster=yes&amp;quot;&amp;lt;/code&amp;gt; option prevents the SSH client from reusing your active connection in case you have multiplexing enabled.&lt;br /&gt;
&lt;br /&gt;
=== Fail2Ban ===&lt;br /&gt;
[[Fail2Ban]] configuration for SSH is active by default in Debian. However, if you changed the listening port of your server, you must reflect that in Fail2Ban. To do so, create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/sshd.conf&amp;lt;/code&amp;gt; with the following content&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[sshd]&lt;br /&gt;
enabled  = true&lt;br /&gt;
port     = 2200 ; &amp;lt;= Set the port here&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# apt install openssh-client&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
The settings of these section need to be written in file &amp;lt;code&amp;gt;/etc/ssh/ssh_config&amp;lt;/code&amp;gt;. Unless they contains a &amp;lt;code&amp;gt;Host&amp;lt;/code&amp;gt;, they must be set under the existing &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
==== Shortcuts ====&lt;br /&gt;
&lt;br /&gt;
When it comes to typing, my motto is &#039;&#039;less is more&#039;&#039;. The following setting allows you to type &amp;lt;code&amp;gt;ssh server1&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ssh server1.example.org&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host server1 server2&lt;br /&gt;
    CanonicalDomains example.org&lt;br /&gt;
    CanonicalizeFallbackLocal no&lt;br /&gt;
    CanonicalizeHostname yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Port ====&lt;br /&gt;
&lt;br /&gt;
If you changed the port of your servers, this settings allows you client to use the correct port automatically.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host *.example.org&lt;br /&gt;
    Port 2200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Crypo ====&lt;br /&gt;
&lt;br /&gt;
These settings are derived from [https://stribika.github.io/2015/01/04/secure-secure-shell.html secure secure shell].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr&lt;br /&gt;
    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160&lt;br /&gt;
    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256&lt;br /&gt;
    HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generate user keys ====&lt;br /&gt;
This needs to be run by all users. It is strongly recommended to set a password to your keys. A passwordless keyfile is as secure as a post-it on the wall with your password. If a script need unattended access to another machine, create dedicated accounts and key for that usage.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ ssh-keygen -t ed25519 -a 100&lt;br /&gt;
$ ssh-keygen -t rsa -b 4096 -o -a 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Verify published server key ====&lt;br /&gt;
Make sure your server has some [[#Publish server keys|published keys]].&lt;br /&gt;
&lt;br /&gt;
Edit file &amp;lt;code&amp;gt;/etc/ssh/ssh_config&amp;lt;/code&amp;gt; and add the line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
    VerifyHostKeyDNS yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ssh-agent ==&lt;br /&gt;
ssh-agent is a program that can keep your ssh keys in memory and avoid you to type your password several time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Anybody which can run command as your user or as root on your machine can reuse or eve steal your keys. Don&#039;t run ssh-agent on a machine unless you trust it 100%.&lt;br /&gt;
&lt;br /&gt;
=== Run the agent ===&lt;br /&gt;
By default Debian and Ubuntu start &amp;lt;code&amp;gt;ssh-agent&amp;lt;/code&amp;gt; when you log into a graphical session. However, the way it is done doesn&#039;t allow passing options to the agent. &lt;br /&gt;
&lt;br /&gt;
To disable the default &amp;lt;code&amp;gt;ssh-agent&amp;lt;/code&amp;gt; startup script, edit file &amp;lt;code&amp;gt;/etc/X11/Xsession.options&amp;lt;/code&amp;gt; and remove line &amp;lt;code&amp;gt;use-ssh-agent&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Add the following line to &amp;lt;code&amp;gt;~/.xsessionrc&amp;lt;/code&amp;gt; (create the file is it doesn&#039;t exist). This need to be done for each user that wants to run &amp;lt;code&amp;gt;ssh-agent&amp;lt;/code&amp;gt;.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
STARTUP=&amp;quot;/usr/bin/ssh-agent -t 3600 ${TMPDIR:+env TMPDIR=$TMPDIR} $STARTUP&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add keys to agent ===&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: You need OpenSSH version 7.2 or above for this to work.&lt;br /&gt;
&lt;br /&gt;
SSH client is able to add keys to ssh-agent automatically. To do this, edit file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    AddKeysToAgent yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Forward agent ===&lt;br /&gt;
If you want to be able to connect from machine A to machine B and then from machine B to machine C without typing password twice, you can use a feature called agent forwarding. With this feature machine B will be able to use the keys from the agent running on machine A.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; As for running the agent, you must only forward your agent to a machine that you trust 100%. Anybody with access to root or the account you use on machine B will be able to use your keys.&lt;br /&gt;
&lt;br /&gt;
To enable the feature, add this to &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host machineB.example.org machineD.example.org&lt;br /&gt;
    ForwardAgent yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference Documents ==&lt;br /&gt;
[https://wiki.mozilla.org/Security/Guidelines/OpenSSH Mozilla Guidelines]&lt;br /&gt;
&lt;br /&gt;
[https://stribika.github.io/2015/01/04/secure-secure-shell.html Secure Secure Shell][[Category:Linux Server]]&lt;br /&gt;
[[Category:Fail2Ban]]&lt;br /&gt;
[[Category:Debian Release]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=KeePass&amp;diff=673</id>
		<title>KeePass</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=KeePass&amp;diff=673"/>
		<updated>2017-12-29T22:52:06Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Use KeePassXC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Linux/Windows ===&lt;br /&gt;
Follow instruction from [https://keepassxc.org/download KeePassXC website].&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
Install [https://play.google.com/store/apps/details?id=keepass2android.keepass2android Keepass2Android].&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:Android]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=672</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=672"/>
		<updated>2017-12-03T13:19:44Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Fix table display&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
This allow to store reading status from your eReader to you Calibre library.&lt;br /&gt;
&lt;br /&gt;
First step is to create columns in you library to store the data.&lt;br /&gt;
* Go to Preferences → Add your own columns&lt;br /&gt;
* Add the following columns&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column header !! Lookup name !! Type !! Description&lt;br /&gt;
|- &lt;br /&gt;
|Complete || complete || Integers || Percent of the book that is read on device&lt;br /&gt;
|-&lt;br /&gt;
| Read || read || Date || Last date where the book was read on device&lt;br /&gt;
|}&lt;br /&gt;
* Validate &amp;amp; restart Calibre&lt;br /&gt;
Now you can configure KoboUtilities&lt;br /&gt;
* Click on KoboUtilities&lt;br /&gt;
* In the Profiles tab, set the &#039;&#039;Custom columns&#039;&#039; and &#039;&#039;Store on connect&#039;&#039; sections[[File:Calibre - Read columns.png|center|frameless|585x585px]]&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
The plugin can do backups of the database on your eReader. In case something goes wrong with your device, this might come handy.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=671</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=671"/>
		<updated>2017-12-03T13:06:11Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Configuration */ Add Count Pages plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre is an eBook management software. It allows you to copy you books from / to your eReader, edit metadata, search your library… &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. While Calibre will work with any eReader or even as a standalone, this page assume that you are using this one. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
I recommend creating a folder named &#039;&#039;calibre&#039;&#039; somewhere in your computer and inside this one create a folder named &#039;&#039;library&#039;&#039; and use this last one as library location. There are two reasons for this. First Calibre will use the name of the folder as the name of the library in the interface. Having your library called library make things easier. Secondlly, Calibre will complain if you add any file to it&#039;s library folder. The parent folder allows you to store additional files related to Calibre.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
This allow to store reading status from your eReader to you Calibre library.&lt;br /&gt;
&lt;br /&gt;
First step is to create columns in you library to store the data.&lt;br /&gt;
* Go to Preferences → Add your own columns&lt;br /&gt;
* Add the following columns {| class=&amp;quot;wikitable&amp;quot; !Column header !Lookup name !Type !Description |- |Complete |complete |Integers |Percent of the book that is read on device |- |Read |read |Date |Last date where the book was read on device |}&lt;br /&gt;
* Validate &amp;amp; restart Calibre&lt;br /&gt;
Now you can configure KoboUtilities&lt;br /&gt;
* Click on KoboUtilities&lt;br /&gt;
* In the Profiles tab, set the &#039;&#039;Custom columns&#039;&#039; and &#039;&#039;Store on connect&#039;&#039; sections[[File:Calibre - Read columns.png|center|frameless|585x585px]]&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
The plugin can do backups of the database on your eReader. In case something goes wrong with your device, this might come handy.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
&lt;br /&gt;
=== Show pages / words count ===&lt;br /&gt;
&lt;br /&gt;
==== Install plugin ====&lt;br /&gt;
Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, and install plugin &#039;&#039;Count Pages&#039;&#039;. When asked, you don&#039;t need to restart calibre.&lt;br /&gt;
&lt;br /&gt;
==== Add Column ====&lt;br /&gt;
Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Add your own columns&#039;&#039;, and click on &#039;&#039;Add custom column&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fill the info:&lt;br /&gt;
* Lookup name: words&lt;br /&gt;
* Column heading: Words&lt;br /&gt;
* Column type: Integer&lt;br /&gt;
* Description: Number of words in book&lt;br /&gt;
* Format for numbers: {0:n}&lt;br /&gt;
Click OK, repeat for page count and restart calibre.&lt;br /&gt;
&lt;br /&gt;
==== Configure plugin ====&lt;br /&gt;
You should now have a &#039;&#039;Count Pages&#039;&#039; icon in the main toolbar. Click on the down arrow next to it ans select &#039;&#039;Customize plug-in…&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;Statistics&#039;&#039; tab, select the columns that you just created. &lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;Other&#039;&#039; tab, untick &#039;&#039;Prompt to save counts&#039;&#039;. If you want to make sure that all your book pages are computed the same way, you can also untick everything in the &#039;&#039;Download options&#039;&#039; section.&lt;br /&gt;
&lt;br /&gt;
==== Count pages / words ====&lt;br /&gt;
Select the books for which you want to count pages and click the &#039;&#039;Count Pages&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Buy Books ==&lt;br /&gt;
Calibre allows you to search and buy books directly from the interface. This has a few advantages:&lt;br /&gt;
* Calibre will search several shops and compare prices&lt;br /&gt;
* Some shops are paying back a percentage from your purchase to Calibre developers. You can sponsor development  without paying more.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
Right click on &#039;&#039;Get books&#039;&#039; and go to &#039;&#039;Choose stores.&#039;&#039; In the list of stores unselect the ones the don&#039;t sell in ePub format (Amazon &amp;amp; Barnes and Noble). Also unselect the stores that are in languages that you don&#039;t speak (while they might have interesting books, you will need to go to their website to complete the purchase).&lt;br /&gt;
&lt;br /&gt;
=== Buy Books ===&lt;br /&gt;
* Click the &#039;&#039;Get books&#039;&#039; icon.&lt;br /&gt;
* Enter search criteria and click on &#039;&#039;Search&#039;&#039;&lt;br /&gt;
* Double click the book you want to buy&lt;br /&gt;
* Process to payment and download on the shop website&lt;br /&gt;
* If you downloaded a .acsm file see the section on DRM above&lt;br /&gt;
* Otherwise, in Calibre, click on &#039;&#039;Add Books&#039;&#039; select the file on your disk &lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Let%E2%80%99s_Encrypt/stats&amp;diff=670</id>
		<title>Let’s Encrypt/stats</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Let%E2%80%99s_Encrypt/stats&amp;diff=670"/>
		<updated>2017-11-30T07:54:43Z</updated>

		<summary type="html">&lt;p&gt;Vincent: update stats&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Official stats =&lt;br /&gt;
Let’s Encrypt provide some [https://letsencrypt.org/stats/ official statistics] on the number of certificate that they deliver.&lt;br /&gt;
&lt;br /&gt;
== Ranking ==&lt;br /&gt;
[https://censys.io Censys] allows to get some statistics on the usage of Let’s Encrypt among the [https://support.alexa.com/hc/en-us/articles/200449834-Does-Alexa-have-a-list-of-its-top-ranked-websites- top 1 million websites].&lt;br /&gt;
&lt;br /&gt;
Reports are build by querying the raw domain name. Some website are know to serve different certificates for the raw domain and the www prefix.&lt;br /&gt;
&lt;br /&gt;
=== HTTPS ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Date&lt;br /&gt;
!Number&lt;br /&gt;
!Percent&lt;br /&gt;
!Rank&lt;br /&gt;
!Total Number&lt;br /&gt;
|-&lt;br /&gt;
|26-03-2016&lt;br /&gt;
|7 590&lt;br /&gt;
|1.08%&lt;br /&gt;
|19*&lt;br /&gt;
|705 166&lt;br /&gt;
|-&lt;br /&gt;
|20-05-2016&lt;br /&gt;
|12 823&lt;br /&gt;
|1.5%&lt;br /&gt;
|11&lt;br /&gt;
|643 604&lt;br /&gt;
|-&lt;br /&gt;
|04-06-2016&lt;br /&gt;
|15 367&lt;br /&gt;
|2.3%&lt;br /&gt;
|10&lt;br /&gt;
|669 582&lt;br /&gt;
|-&lt;br /&gt;
|20-06-2016&lt;br /&gt;
|15 969&lt;br /&gt;
|2.41%&lt;br /&gt;
|9&lt;br /&gt;
|663 851&lt;br /&gt;
|-&lt;br /&gt;
|14-07-2016&lt;br /&gt;
|22 159&lt;br /&gt;
|3.85%&lt;br /&gt;
|6&lt;br /&gt;
|575 599&lt;br /&gt;
|-&lt;br /&gt;
|21-08-2016&lt;br /&gt;
|29 104&lt;br /&gt;
|4.64%&lt;br /&gt;
|5&lt;br /&gt;
|626 616&lt;br /&gt;
|-&lt;br /&gt;
|25-09-2016&lt;br /&gt;
|23 880&lt;br /&gt;
|4.43%&lt;br /&gt;
|5&lt;br /&gt;
|539 594&lt;br /&gt;
|-&lt;br /&gt;
|30-09-2016&lt;br /&gt;
|39 072&lt;br /&gt;
|5.80%&lt;br /&gt;
|5&lt;br /&gt;
|674 019&lt;br /&gt;
|-&lt;br /&gt;
|03-12-2016&lt;br /&gt;
|59 547&lt;br /&gt;
|8.01%&lt;br /&gt;
|3&lt;br /&gt;
|743 081&lt;br /&gt;
|-&lt;br /&gt;
|22-01-2017&lt;br /&gt;
|67 413&lt;br /&gt;
|9.70%&lt;br /&gt;
|3&lt;br /&gt;
|695 015&lt;br /&gt;
|-&lt;br /&gt;
|14-05-2017&lt;br /&gt;
|84 129&lt;br /&gt;
|13.87%&lt;br /&gt;
|2&lt;br /&gt;
|606 661&lt;br /&gt;
|-&lt;br /&gt;
|30-11-2017&lt;br /&gt;
|128 435&lt;br /&gt;
|19.14%&lt;br /&gt;
|2&lt;br /&gt;
|670 882&lt;br /&gt;
|}&lt;br /&gt;
https://censys.io/domain/report?q=*&amp;amp;field=443.https.tls.certificate.parsed.issuer.organization.raw&amp;amp;max_buckets=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;*&#039;&#039;&#039;: Old report based on intermediate certificate name. This affect rank as some authorities have multiple intermediates.&lt;br /&gt;
&lt;br /&gt;
=== SMTP ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Date&lt;br /&gt;
!Number&lt;br /&gt;
!Percent&lt;br /&gt;
!Rank&lt;br /&gt;
!Total Number&lt;br /&gt;
|-&lt;br /&gt;
|26-03-2016&lt;br /&gt;
|926&lt;br /&gt;
|0.15%&lt;br /&gt;
|50*&lt;br /&gt;
|623 943&lt;br /&gt;
|-&lt;br /&gt;
|20-05-2016&lt;br /&gt;
|1 367&lt;br /&gt;
|0.24%&lt;br /&gt;
|39&lt;br /&gt;
|581 296&lt;br /&gt;
|-&lt;br /&gt;
|04-06-2016&lt;br /&gt;
|1 662&lt;br /&gt;
|0.27%&lt;br /&gt;
|32&lt;br /&gt;
|612 866&lt;br /&gt;
|-&lt;br /&gt;
|20-06-2016&lt;br /&gt;
|1 716&lt;br /&gt;
|0.29%&lt;br /&gt;
|30&lt;br /&gt;
|599 019&lt;br /&gt;
|-&lt;br /&gt;
|14-07-2016&lt;br /&gt;
|2 787&lt;br /&gt;
|0.48%&lt;br /&gt;
|24&lt;br /&gt;
|579 564&lt;br /&gt;
|-&lt;br /&gt;
|21-08-2016&lt;br /&gt;
|2 767&lt;br /&gt;
|0.48%&lt;br /&gt;
|24&lt;br /&gt;
|566 076&lt;br /&gt;
|-&lt;br /&gt;
|25-09-2016&lt;br /&gt;
|1 798&lt;br /&gt;
|0.39%&lt;br /&gt;
|24&lt;br /&gt;
|465 238&lt;br /&gt;
|-&lt;br /&gt;
|30-09-2016&lt;br /&gt;
|5 092&lt;br /&gt;
|0.81%&lt;br /&gt;
|18&lt;br /&gt;
|630 310&lt;br /&gt;
|-&lt;br /&gt;
|03-12-2016&lt;br /&gt;
|8 417&lt;br /&gt;
|1.27%&lt;br /&gt;
|18&lt;br /&gt;
|663 072&lt;br /&gt;
|-&lt;br /&gt;
|22-01-2016&lt;br /&gt;
|10 200&lt;br /&gt;
|1.78%&lt;br /&gt;
|12&lt;br /&gt;
|574 194&lt;br /&gt;
|-&lt;br /&gt;
|14-05-2017&lt;br /&gt;
|11 187&lt;br /&gt;
|2.13%&lt;br /&gt;
|10&lt;br /&gt;
|524 491&lt;br /&gt;
|-&lt;br /&gt;
|30-11-2017&lt;br /&gt;
|15 059&lt;br /&gt;
|2.78%&lt;br /&gt;
|9&lt;br /&gt;
|540 797&lt;br /&gt;
|}&lt;br /&gt;
https://censys.io/domain/report?q=*&amp;amp;field=25.smtp.starttls.tls.certificate.parsed.issuer.organization.raw&amp;amp;max_buckets=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;*&#039;&#039;&#039;: Old report based on intermediate certificate name. This affect rank as some authorities have multiple intermediates.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Kernel_from_Jessie_Backports&amp;diff=669</id>
		<title>Kernel from Jessie Backports</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Kernel_from_Jessie_Backports&amp;diff=669"/>
		<updated>2017-11-12T21:40:46Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian Jessie offer the quite old kernel 3.16. Backports offer the newer 4.3.&lt;br /&gt;
&lt;br /&gt;
Among other, it contains important changes to Btrfs and nftables.&lt;br /&gt;
&lt;br /&gt;
To install it, simply run&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install linux-image-amd64/jessie-backports&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;and then reboot your server.&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Noindexed pages]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=nftables&amp;diff=668</id>
		<title>nftables</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=nftables&amp;diff=668"/>
		<updated>2017-11-12T21:39:21Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://netfilter.org/projects/nftables/ nftables] is the new firewall of the linux kernel. It has several advantages over the existing {ip, ip6, arp,eb}tables:&lt;br /&gt;
* Only one command&lt;br /&gt;
* Rules that target both IPV4 and IPV6&lt;br /&gt;
* More concise syntax&lt;br /&gt;
* [http://wiki.nftables.org/wiki-nftables/index.php/Main_differences_with_iptables See details on the official wiki]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install nftables&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You might also want to remove &amp;lt;code&amp;gt;iptables&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt purge iptables&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== Create main table ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/nftables/main_config.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
# DNS&lt;br /&gt;
add element  inet main  udp_port_out { 53 }&lt;br /&gt;
add element  inet main  tcp_port_out { 53 }&lt;br /&gt;
# Network Time Protocol&lt;br /&gt;
add element  inet main  udp_port_out { 123 }&lt;br /&gt;
# OpenPGP HTTP Keyserver&lt;br /&gt;
add element  inet main  tcp_port_out { 11371 }&lt;br /&gt;
# SSH&lt;br /&gt;
add element  inet main  tcp_port_in { 2200 }&lt;br /&gt;
add element  inet main  tcp_port_out { 2200 }&lt;br /&gt;
# Web&lt;br /&gt;
add element  inet main  tcp_port_out { 80, 443 }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Create file &amp;lt;code&amp;gt;/etc/nftables/main.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
add table inet main&lt;br /&gt;
&lt;br /&gt;
#Ports open for any IP address&lt;br /&gt;
add set  inet main  tcp_port_out { type inet_service; }&lt;br /&gt;
add set  inet main  tcp_port_in { type inet_service; }&lt;br /&gt;
add set  inet main  udp_port_out { type inet_service; }&lt;br /&gt;
add set  inet main  udp_port_in { type inet_service; }&lt;br /&gt;
add set  inet main  user_out { type uid; }&lt;br /&gt;
add set  inet main  user_in { type uid; }&lt;br /&gt;
&lt;br /&gt;
include &amp;quot;/etc/nftables/main_config.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Remove spam in logs. Get your top noise whith&lt;br /&gt;
# grep Drop_in /var/log/syslog|sed -r &#039;s/.*?PROTO=([A-Z]+).*?DPT=([0-9]+).*/\1 \2/&#039;|sort|uniq -c|sort -rn&lt;br /&gt;
add set  inet main  tcp_scan_ports { type inet_service; }&lt;br /&gt;
add set  inet main  udp_scan_ports { type inet_service; }&lt;br /&gt;
add element  inet main  tcp_scan_ports {&lt;br /&gt;
22, # SSH&lt;br /&gt;
23, # Telnet&lt;br /&gt;
1433, # MS SQL Login&lt;br /&gt;
8080, # HTTP Alternate&lt;br /&gt;
50661 # Apple Xsan&lt;br /&gt;
}&lt;br /&gt;
add element  inet main  udp_scan_ports {&lt;br /&gt;
53, # DNS&lt;br /&gt;
5060, # SIP&lt;br /&gt;
53413 # http://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
chain inet main input {&lt;br /&gt;
        type filter  hook input  priority 0;&lt;br /&gt;
&lt;br /&gt;
        # accept any localhost traffic&lt;br /&gt;
        iif lo  accept&lt;br /&gt;
&lt;br /&gt;
        # accept traffic originated from us&lt;br /&gt;
        ct state established,related  accept&lt;br /&gt;
        ct state invalid  log prefix &amp;quot;Invalid_in &amp;quot;  drop&lt;br /&gt;
&lt;br /&gt;
        # accept neighbour discovery otherwise IPv6 connectivity breaks.&lt;br /&gt;
        ip6 nexthdr icmpv6  icmpv6 type { nd-neighbor-solicit,  nd-router-advert, nd-neighbor-advert }  accept&lt;br /&gt;
&lt;br /&gt;
        # accept ping&lt;br /&gt;
        ip protocol icmp  icmp type { echo-request }  accept&lt;br /&gt;
&lt;br /&gt;
        tcp  dport @tcp_port_in  ct state new  accept&lt;br /&gt;
        udp  dport @udp_port_in  ct state new  accept&lt;br /&gt;
        meta skuid @user_in  ct state new  accept&lt;br /&gt;
&lt;br /&gt;
        tcp dport @tcp_scan_ports drop&lt;br /&gt;
        udp dport @udp_scan_ports drop&lt;br /&gt;
&lt;br /&gt;
        # count and drop any other traffic&lt;br /&gt;
        counter  log prefix &amp;quot;Drop_in &amp;quot;  drop&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
chain inet main output {&lt;br /&gt;
        type filter  hook output  priority 0;&lt;br /&gt;
&lt;br /&gt;
        # accept any localhost traffic&lt;br /&gt;
        oif lo  accept&lt;br /&gt;
&lt;br /&gt;
        ct state established,related  accept&lt;br /&gt;
        ct state invalid  log prefix &amp;quot;Invalid_out &amp;quot;  drop&lt;br /&gt;
&lt;br /&gt;
        # accept neighbour discovery otherwise IPv6 connectivity breaks.&lt;br /&gt;
        ip6 nexthdr icmpv6  icmpv6 type { nd-neighbor-solicit,  nd-router-advert, nd-neighbor-advert }  accept&lt;br /&gt;
&lt;br /&gt;
        # accept ping&lt;br /&gt;
        ip protocol icmp  icmp type { echo-request }  accept&lt;br /&gt;
&lt;br /&gt;
        tcp  dport @tcp_port_out  ct state new accept&lt;br /&gt;
        udp  dport @udp_port_out  ct state new accept&lt;br /&gt;
        meta skuid @user_out  ct state new  accept&lt;br /&gt;
&lt;br /&gt;
        counter  log prefix &amp;quot;Drop_out &amp;quot;  drop&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;{{Warning}}Double check the port for SSH before activating the script.&lt;br /&gt;
&lt;br /&gt;
=== Activation Scripts ===&lt;br /&gt;
&lt;br /&gt;
==== /etc/nftables.conf ====&lt;br /&gt;
Edit file &amp;lt;code&amp;gt;/etc/nftables.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
flush ruleset&lt;br /&gt;
&lt;br /&gt;
include &amp;quot;/etc/nftables/main.conf&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This file is executed when you start nftables. You can also manually execute it without issue.&lt;br /&gt;
&lt;br /&gt;
==== /etc/nftables/reload_main.conf ====&lt;br /&gt;
This script is used to reload only the main table without the others. The point is to integrate with tools like [[Fail2Ban]] which are inserting rules in the firewall. By reloading just the main table, you can activate your new rules without impacting Fail2Ban.&lt;br /&gt;
&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/nftables/reload_main.conf&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/sbin/nft -f&lt;br /&gt;
&lt;br /&gt;
delete table inet main&lt;br /&gt;
&lt;br /&gt;
include &amp;quot;/etc/nftables/main.conf&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;and make it executable&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo chmod +x /etc/nftables/reload_main.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test ==&lt;br /&gt;
Test your firewall with the following command&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo -- sh -c &#039;nft -f /etc/nftables.conf; sleep 30; nft flush ruleset&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;It will activate the firewall and reset it after 30 seconds. It allows you to not lock yourself out of your machine.&lt;br /&gt;
&lt;br /&gt;
== Enable ==&lt;br /&gt;
{{Warning}}It is recommended that you test your firewall before enabling it at boot time. An incorrectly configured firewall can lock you out of your machine.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo systemctl enable nftables&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:nftables]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Btrfs&amp;diff=667</id>
		<title>Btrfs</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Btrfs&amp;diff=667"/>
		<updated>2017-11-12T21:38:46Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Warning|msg = Btrfs is still a new filesystem. While many (including myself) find it stable enough for everyday use, don&#039;t use it for critical services and be prepared to use you backups.&amp;lt;br/&amp;gt;&lt;br /&gt;
See [https://btrfs.wiki.kernel.org/index.php/Status status page] on Btrfs wiki for up-to-date info.}}&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
To create and manipulate Btrfs volumes, you will need to install&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install btrfs-progs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create a filesystem ==&lt;br /&gt;
&lt;br /&gt;
=== mkfs ===&lt;br /&gt;
&lt;br /&gt;
==== Single Disk ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.btrfs /dev/sdb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Raid 1 ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.btrfs -mraid1 -draid1 /dev/sdb /dev/sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Raid 0 ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.btrfs -mraid1 -draid0 /dev/sdb /dev/sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mount ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mount /dev/sdb /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;When mounting raid disks, only one of the disks need to be specified in the command. Btrfs will find the other one automatically.&lt;br /&gt;
&lt;br /&gt;
== Subvolumes ==&lt;br /&gt;
To create a subvolume just use the command&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo btrfs subvolume create /&amp;lt;path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To create a snapshot use&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo btrfs subvolume snapshot /&amp;lt;source-path&amp;gt; /&amp;lt;destination-path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Debian Release]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Btrfs&amp;diff=666</id>
		<title>Btrfs</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Btrfs&amp;diff=666"/>
		<updated>2017-11-04T11:05:31Z</updated>

		<summary type="html">&lt;p&gt;Vincent: remove debian jessie&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Warning|msg = Btrfs is still a new filesystem. While many (including myself) find it stable enough for everyday use, don&#039;t use it for critical services and be prepared to use you backups.&amp;lt;br/&amp;gt;&lt;br /&gt;
See [https://btrfs.wiki.kernel.org/index.php/Status status page] on Btrfs wiki for up-to-date info.}}&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
To create and manipulate Btrfs volumes, you will need to install&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install btrfs-progs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create a filesystem ==&lt;br /&gt;
&lt;br /&gt;
=== Single Disk ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.btrfs /dev/sdb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Raid 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.btrfs -mraid1 -draid1 /dev/sdb /dev/sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Raid 0 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.btrfs -mraid1 -draid0 /dev/sdb /dev/sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Subvolumes ==&lt;br /&gt;
To create a subvolume just use the command&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo btrfs subvolume create /&amp;lt;path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To create a snapshot use&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo btrfs subvolume snapshot /&amp;lt;source-path&amp;gt; /&amp;lt;destination-path&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Debian Release]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Apt&amp;diff=665</id>
		<title>Apt</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Apt&amp;diff=665"/>
		<updated>2017-10-10T07:35:39Z</updated>

		<summary type="html">&lt;p&gt;Vincent: maintenance scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configure ==&lt;br /&gt;
&lt;br /&gt;
=== HTTPS ===&lt;br /&gt;
&lt;br /&gt;
By default, Apt is able to use http sources but not https ones. This might cause problem with some external repositories.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install apt-transport-https&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sources.list ===&lt;br /&gt;
Here is the &amp;lt;code&amp;gt;/etc/apt/sources.list&amp;lt;/code&amp;gt; for a Debian Jessie distribution. &lt;br /&gt;
&lt;br /&gt;
The file is referencing versions names instead of the &#039;&#039;stable&#039;&#039; and &#039;&#039;testing&#039;&#039; aliases. The reason is that we don&#039;t want a massive uncontrolled upgrade on the day of the release of the next stable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sources.list&amp;quot;&amp;gt;&lt;br /&gt;
# Standard Debian repository&lt;br /&gt;
deb https://deb.debian.org/debian stretch main contrib non-free&lt;br /&gt;
deb-src https://deb.debian.org/debian stretch main contrib non-free&lt;br /&gt;
&lt;br /&gt;
# Security updates&lt;br /&gt;
# No mirror is used here to avoid issues with propagation delay&lt;br /&gt;
deb https://security.debian.org/ stretch/updates main contrib non-free&lt;br /&gt;
deb-src https://security.debian.org/ stretch/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
# stable-updates repo&lt;br /&gt;
# Contain some package that are known to change frequently like antivirus or timezone data&lt;br /&gt;
deb https://deb.debian.org/debian stretch-updates main contrib non-free&lt;br /&gt;
deb-src https://deb.debian.org/debian stretch-updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
# Backport repo&lt;br /&gt;
# Contains packages from the next release that where modified to work on the current one&lt;br /&gt;
# Note that security is not assured by security team so updates might be slower than for other packages&lt;br /&gt;
deb https://deb.debian.org/debian stretch-backports main contrib non-free&lt;br /&gt;
deb-src https://deb.debian.org/debian stretch-backports main contrib non-free&lt;br /&gt;
&lt;br /&gt;
# Testing&lt;br /&gt;
# For package that are not backported but where you want the new version&lt;br /&gt;
# Be very careful when installing these as they might bring incompatibility with the rest of the system&lt;br /&gt;
# Security is the lowest of the sources here. No security team, and updates might get blocked waiting for other migrations&lt;br /&gt;
deb https://deb.debian.org/debian buster main contrib non-free&lt;br /&gt;
deb-src https://deb.debian.org/debian buster main contrib non-free&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== apt.conf ===&lt;br /&gt;
The file &amp;lt;code&amp;gt;/etc/apt/apt.conf&amp;lt;/code&amp;gt; stores settings of apt. You can create the file if it doesn&#039;t exist.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
# Select the default release. Check /etc/apt/preference for more flexibility&lt;br /&gt;
# Only needed when non-standard sources are present like backport or testing&lt;br /&gt;
APT::Default-Release &amp;quot;stretch&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# When adding new sources in sources.list, you can hit the APT cache limit&lt;br /&gt;
# This line increases its size&lt;br /&gt;
APT::Cache-Limit &amp;quot;100000000&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pinning ===&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Create file  &amp;lt;code&amp;gt;/etc/apt/preferences&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;
Explanation: This priority correspond to the default set by &amp;quot;APT::Default-Release&amp;quot;&lt;br /&gt;
Explanation: We make it explicit&lt;br /&gt;
Package: *&lt;br /&gt;
Pin: release o=Debian, n=stretch&lt;br /&gt;
Pin-Priority: 990&lt;br /&gt;
&lt;br /&gt;
Explanation: Assign the same priority than stable release so these are picked if they are newer&lt;br /&gt;
Package: *&lt;br /&gt;
Pin: release o=Debian, n=stretch-updates&lt;br /&gt;
Pin-Priority: 990&lt;br /&gt;
&lt;br /&gt;
Explanation: Lower than stable as we don&#039;t want them installed by default.&lt;br /&gt;
Explanation: Higher than testing, we prefer to install from backports than testing.&lt;br /&gt;
Package: *&lt;br /&gt;
Pin: release o=Debian Backports, n=stretch-backports&lt;br /&gt;
Pin-Priority: 900&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explanation: Lower than others&lt;br /&gt;
Explanation: Higher than 500 so it&#039;s still preferred over external sources&lt;br /&gt;
Package: *&lt;br /&gt;
Pin: release o=Debian, n=buster&lt;br /&gt;
Pin-Priority: 700&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Debugging ====&lt;br /&gt;
&lt;br /&gt;
By default, it might be hard to understand why a particular version of a package is chosen for updates. Thankfully, &amp;lt;code&amp;gt;apt-cache&amp;lt;/code&amp;gt; can help us with that.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ apt-cache policy | grep -Ev Translation-..$&lt;br /&gt;
Package files:&lt;br /&gt;
 100 /var/lib/dpkg/status&lt;br /&gt;
     release a=now&lt;br /&gt;
 700 http://httpredir.debian.org/debian/ stretch/non-free amd64 Packages&lt;br /&gt;
     release o=Debian,a=testing,n=stretch,l=Debian,c=non-free&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 700 http://httpredir.debian.org/debian/ stretch/contrib amd64 Packages&lt;br /&gt;
     release o=Debian,a=testing,n=stretch,l=Debian,c=contrib&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 700 http://httpredir.debian.org/debian/ stretch/main amd64 Packages&lt;br /&gt;
     release o=Debian,a=testing,n=stretch,l=Debian,c=main&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 900 http://httpredir.debian.org/debian/ jessie-backports/non-free amd64 Packages&lt;br /&gt;
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=non-free&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 900 http://httpredir.debian.org/debian/ jessie-backports/contrib amd64 Packages&lt;br /&gt;
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=contrib&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 900 http://httpredir.debian.org/debian/ jessie-backports/main amd64 Packages&lt;br /&gt;
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=main&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 990 http://httpredir.debian.org/debian/ jessie-updates/non-free amd64 Packages&lt;br /&gt;
     release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=non-free&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 990 http://httpredir.debian.org/debian/ jessie-updates/contrib amd64 Packages&lt;br /&gt;
     release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=contrib&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 990 http://httpredir.debian.org/debian/ jessie-updates/main amd64 Packages&lt;br /&gt;
     release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=main&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 990 http://security.debian.org/ jessie/updates/non-free amd64 Packages&lt;br /&gt;
     release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=non-free&lt;br /&gt;
     origin security.debian.org&lt;br /&gt;
 990 http://security.debian.org/ jessie/updates/contrib amd64 Packages&lt;br /&gt;
     release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=contrib&lt;br /&gt;
     origin security.debian.org&lt;br /&gt;
 990 http://security.debian.org/ jessie/updates/main amd64 Packages&lt;br /&gt;
     release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=main&lt;br /&gt;
     origin security.debian.org&lt;br /&gt;
 990 http://httpredir.debian.org/debian/ jessie/non-free amd64 Packages&lt;br /&gt;
     release v=8.3,o=Debian,a=stable,n=jessie,l=Debian,c=non-free&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 990 http://httpredir.debian.org/debian/ jessie/contrib amd64 Packages&lt;br /&gt;
     release v=8.3,o=Debian,a=stable,n=jessie,l=Debian,c=contrib&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
 990 http://httpredir.debian.org/debian/ jessie/main amd64 Packages&lt;br /&gt;
     release v=8.3,o=Debian,a=stable,n=jessie,l=Debian,c=main&lt;br /&gt;
     origin httpredir.debian.org&lt;br /&gt;
Pinned packages:&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ apt-cache policy linux-image-amd64&lt;br /&gt;
linux-image-amd64:&lt;br /&gt;
  Installed: 4.3+70~bpo8+1&lt;br /&gt;
  Candidate: 4.3+70~bpo8+1&lt;br /&gt;
  Version table:&lt;br /&gt;
     4.3+70 0&lt;br /&gt;
        700 http://httpredir.debian.org/debian/ stretch/main amd64 Packages&lt;br /&gt;
 *** 4.3+70~bpo8+1 0&lt;br /&gt;
        900 http://httpredir.debian.org/debian/ jessie-backports/main amd64 Packages&lt;br /&gt;
        100 /var/lib/dpkg/status&lt;br /&gt;
     3.16+63 0&lt;br /&gt;
        990 http://httpredir.debian.org/debian/ jessie/main amd64 Packages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== needrestart ===&lt;br /&gt;
After a successful upgrade, needrestart will check if any daemon need to be restarted. If so, it will show a dialog where you can choose which ones should be restarted automatically.&lt;br /&gt;
&lt;br /&gt;
It will also warn you in case the system need to be restarted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install needrestart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot-notifier ===&lt;br /&gt;
Sends you a daily email in case your server need to be restarted&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Your server needs be able to [[Emails|send Emails]] before you install this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install  reboot-notifier&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can configure the destination email address in &amp;lt;code&amp;gt;/etc/default/reboot-notifier&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== apt-listchanges ===&lt;br /&gt;
Parse changelogs when you upgrade a package and display it. It will also send a copy by email so you can have a look latter in case you missed something.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install apt-listchanges&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== apticron ===&lt;br /&gt;
Apticron will check for updates and send you emails with changelogs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Your server needs be able to [[Emails|send Emails]] before you install this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install apticron&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To configure apticron, edit &amp;lt;code&amp;gt;/etc/apticron/apticron.conf&amp;lt;/code&amp;gt; and changes the following settings&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
EMAIL=&amp;quot;youremail@example.org&amp;quot;&lt;br /&gt;
NOTIFY_HOLDS=&amp;quot;0&amp;quot;&lt;br /&gt;
NOTIFY_NEW=&amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== System Maintenance ==&lt;br /&gt;
&lt;br /&gt;
=== Manually installed packages ===&lt;br /&gt;
Both apt and aptitude can automatically remove packages that are not used any more. This allows to keep a clean system over time. However it requires the system to know which packages were automatically installed.&lt;br /&gt;
&lt;br /&gt;
To list packages that are marked as manually installed, you can use&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ apt-mark showmanual&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove useless configuration files ===&lt;br /&gt;
When deinstalling a package, configuration files are kept in case you need to reinstall it latter. Overtime, this can led to a lot of useless files in &amp;lt;code&amp;gt;/etc&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To list the removed packages that still have configuration files, you can use:&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ aptitude search ?config-files&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After inspection of the list, this command will remove them&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo aptitude purge ?config-files&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Linux Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=SSH&amp;diff=664</id>
		<title>SSH</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=SSH&amp;diff=664"/>
		<updated>2017-10-08T14:13:26Z</updated>

		<summary type="html">&lt;p&gt;Vincent: disable root login&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Debian}}&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# apt install openssh-server&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
The settings of these section need to be writen in file &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Custom port ====&lt;br /&gt;
&lt;br /&gt;
SSH server are a common target for hackers. Changing the port away from the default will greatly reduce the noise in your logs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Port 2200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Authentication ====&lt;br /&gt;
&lt;br /&gt;
Let&#039;s limit the users that have access to the server using ssh.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
AllowUsers myusername&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
# Make sure you have setup authentication using keys before disabling passwords&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Crypo ====&lt;br /&gt;
&lt;br /&gt;
These settings are derived from [https://stribika.github.io/2015/01/04/secure-secure-shell.html secure secure shell].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr&lt;br /&gt;
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160&lt;br /&gt;
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sandbox ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
UsePrivilegeSeparation sandbox&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== KeepAlive ====&lt;br /&gt;
&lt;br /&gt;
To make sure connections do not freeze in case of inactivity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
ClientAliveInterval 60&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generate server keys ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# cd /etc/ssh&lt;br /&gt;
# rm ssh_host_*key*&lt;br /&gt;
# ssh-keygen -t ed25519 -f ssh_host_ed25519_key -N &amp;quot;&amp;quot;&lt;br /&gt;
# ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key -N &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modify file &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; and make sure that the only lines to contains &#039;&#039;HostKey&#039;&#039; are:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
HostKey /etc/ssh/ssh_host_ed25519_key&lt;br /&gt;
HostKey /etc/ssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Publish server keys ====&lt;br /&gt;
It is possible to publish the fingerprint of your ssh server keys in a DNS server. It allows to not have to blindly trust the key on first connection.&lt;br /&gt;
&lt;br /&gt;
To get the records to publish in your dns server, run&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /etc/ssh&lt;br /&gt;
$ ssh-keygen -r $(hostname)&lt;br /&gt;
myserver.example.org IN SSHFP 1 1 1c47eee032179719595c8461adba051d4a00dc8f&lt;br /&gt;
myserver.example.org IN SSHFP 1 2 7371839b62ce52ede97a9598eea0f253e1d58f88f45a8a40e05c34a846dc2e81&lt;br /&gt;
myserver.example.org IN SSHFP 4 1 80aae333ad47851f788d3d9bddd87e489f8c18f8&lt;br /&gt;
myserver.example.org IN SSHFP 4 2 5d0511b19fcd0c2793eeda983f0a8ee70cc4868b98b6d2e67f3b97df8e480762&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once published, you can check you records with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ dig +short -t SSHFP myserver.example.org | sort&lt;br /&gt;
1 1 1C47EEE032179719595C8461ADBA051D4A00DC8F&lt;br /&gt;
1 2 7371839B62CE52EDE97A9598EEA0F253E1D58F88F45A8A40E05C34A8 46DC2E81&lt;br /&gt;
4 1 80AAE333AD47851F788D3D9BDDD87E489F8C18F8&lt;br /&gt;
4 2 5D0511B19FCD0C2793EEDA983F0A8EE70CC4868B98B6D2E67F3B97DF 8E480762&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can configure your client to [[#Verify published server key|use your published keys]].&lt;br /&gt;
&lt;br /&gt;
==== issue.net ====&lt;br /&gt;
One of the danger when doing remote administration is to mechanically log in to a machine, type a few command and realise after that you where on the wrong server. &lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t happen with physical computers as they look different on first sight (either the machine itself or the place it is). The solution, make your remote servers look different.&lt;br /&gt;
&lt;br /&gt;
This can be done by uncommenting this line in &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Banner /etc/issue.net&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then edit the file &amp;lt;code&amp;gt;/etc/issue.net&amp;lt;/code&amp;gt; and make it as distinctive as possible.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
   ************  **********   ***********   **********&lt;br /&gt;
   ************ ************  ************  ************&lt;br /&gt;
   ***          ***      ***  ***      ***  ***      ***&lt;br /&gt;
   ***          ***      ***  ***      ***  ***      ***&lt;br /&gt;
   *******      ***      ***  ************  ***      ***&lt;br /&gt;
   *******      ***      ***  ***********   ***      ***&lt;br /&gt;
   ***          ***      ***  ***   ***     ***      ***&lt;br /&gt;
   ***          ***      ***  ***    ***    ***      ***&lt;br /&gt;
   ***          ************  ***     ***   ************&lt;br /&gt;
   ***           **********   ***      ***  **********&lt;br /&gt;
&lt;br /&gt;
    ##########   ###      ###           ###  ###  ###########&lt;br /&gt;
   ############  ####     ###           ###  ###  ###########&lt;br /&gt;
   ###      ###  #####    ###           ###  ###  ###&lt;br /&gt;
   ###      ###  ######   ###           ###  ###  ###&lt;br /&gt;
   ############  ### ###  ###           ###  ###  #######&lt;br /&gt;
   ############  ###  ### ###           ###  ###  #######&lt;br /&gt;
   ###      ###  ###   ######           ###  ###  ###&lt;br /&gt;
   ###      ###  ###    #####  ###      ###  ###  ###&lt;br /&gt;
   ###      ###  ###     ####   ###    ###   ###  ###########&lt;br /&gt;
   ###      ###  ###      ###    ########    ###  ###########&lt;br /&gt;
&lt;br /&gt;
Note that they are 3 files quite similar for this&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/issue&amp;lt;/code&amp;gt;: Displayed before login prompt on the physical consoles of the machines&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/issue.net&amp;lt;/code&amp;gt;: Displayed before login prompt for remote login&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/motd&amp;lt;/code&amp;gt;: Displayed after login (local and remote)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/issue&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/motd&amp;lt;/code&amp;gt; don&#039;t need any setup before being used. Just modify the content and you are ok to go.&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
If you are using OpenSSH &amp;lt; 7.2 or are not using X11 forwarding, you can disable it with&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
X11Forwarding no&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restart ===&lt;br /&gt;
Restarting the SSH server while connected through SSH is usually safe. However, you need to take some precautions to avoid being locked out of your server. Make sue you do that from a stable internet connection: in case your SSH server doesn&#039;t restart correctly, you don&#039;t want your active SSH connection to drop while you fix the issue.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# systemctl restart ssh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If you are connected through SSH, test that your server restarting correctly by opening a second connection&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ ssh -o &amp;quot;ControlMaster=yes&amp;quot; myserver.example.org&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The &amp;lt;code&amp;gt;-o &amp;quot;ControlMaster=yes&amp;quot;&amp;lt;/code&amp;gt; option prevents the SSH client from reusing your active connection in case you have multiplexing enabled.&lt;br /&gt;
&lt;br /&gt;
=== Fail2Ban ===&lt;br /&gt;
[[Fail2Ban]] configuration for SSH is active by default in Debian. However, if you changed the listening port of your server, you must reflect that in Fail2Ban. To do so, create file &amp;lt;code&amp;gt;/etc/fail2ban/jail.d/sshd.conf&amp;lt;/code&amp;gt; with the following content&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[sshd]&lt;br /&gt;
enabled  = true&lt;br /&gt;
port     = 2200 ; &amp;lt;= Set the port here&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
# apt install openssh-client&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
The settings of these section need to be written in file &amp;lt;code&amp;gt;/etc/ssh/ssh_config&amp;lt;/code&amp;gt;. Unless they contains a &amp;lt;code&amp;gt;Host&amp;lt;/code&amp;gt;, they must be set under the existing &amp;lt;code&amp;gt;Host *&amp;lt;/code&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
==== Shortcuts ====&lt;br /&gt;
&lt;br /&gt;
When it comes to typing, my motto is &#039;&#039;less is more&#039;&#039;. The following setting allows you to type &amp;lt;code&amp;gt;ssh server1&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;ssh server1.example.org&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host server1 server2&lt;br /&gt;
    CanonicalDomains example.org&lt;br /&gt;
    CanonicalizeFallbackLocal no&lt;br /&gt;
    CanonicalizeHostname yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Port ====&lt;br /&gt;
&lt;br /&gt;
If you changed the port of your servers, this settings allows you client to use the correct port automatically.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host *.example.org&lt;br /&gt;
    Port 2200&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Crypo ====&lt;br /&gt;
&lt;br /&gt;
These settings are derived from [https://stribika.github.io/2015/01/04/secure-secure-shell.html secure secure shell].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr&lt;br /&gt;
    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160&lt;br /&gt;
    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256&lt;br /&gt;
    HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generate user keys ====&lt;br /&gt;
This needs to be run by all users. It is strongly recommended to set a password to your keys. A passwordless keyfile is as secure as a post-it on the wall with your password. If a script need unattended access to another machine, create dedicated accounts and key for that usage.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ ssh-keygen -t ed25519 -o -a 100&lt;br /&gt;
$ ssh-keygen -t rsa -b 4096 -o -a 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Verify published server key ====&lt;br /&gt;
Make sure your server has some [[#Publish server keys|published keys]].&lt;br /&gt;
&lt;br /&gt;
Edit file &amp;lt;code&amp;gt;/etc/ssh/ssh_config&amp;lt;/code&amp;gt; and add the line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
    VerifyHostKeyDNS yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ssh-agent ==&lt;br /&gt;
ssh-agent is a program that can keep your ssh keys in memory and avoid you to type your password several time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Anybody which can run command as your user or as root on your machine can reuse or eve steal your keys. Don&#039;t run ssh-agent on a machine unless you trust it 100%.&lt;br /&gt;
&lt;br /&gt;
=== Run the agent ===&lt;br /&gt;
By default Debian and Ubuntu start &amp;lt;code&amp;gt;ssh-agent&amp;lt;/code&amp;gt; when you log into a graphical session. However, the way it is done doesn&#039;t allow passing options to the agent. &lt;br /&gt;
&lt;br /&gt;
To disable the default &amp;lt;code&amp;gt;ssh-agent&amp;lt;/code&amp;gt; startup script, edit file &amp;lt;code&amp;gt;/etc/X11/Xsession.options&amp;lt;/code&amp;gt; and remove line &amp;lt;code&amp;gt;use-ssh-agent&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Add the following line to &amp;lt;code&amp;gt;~/.xsessionrc&amp;lt;/code&amp;gt; (create the file is it doesn&#039;t exist). This need to be done for each user that wants to run &amp;lt;code&amp;gt;ssh-agent&amp;lt;/code&amp;gt;.&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
STARTUP=&amp;quot;/usr/bin/ssh-agent -t 3600 ${TMPDIR:+env TMPDIR=$TMPDIR} $STARTUP&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add keys to agent ===&lt;br /&gt;
&#039;&#039;Note&#039;&#039;: You need OpenSSH version 7.2 or above for this to work.&lt;br /&gt;
&lt;br /&gt;
SSH client is able to add keys to ssh-agent automatically. To do this, edit file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; and add&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
    AddKeysToAgent yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Forward agent ===&lt;br /&gt;
If you want to be able to connect from machine A to machine B and then from machine B to machine C without typing password twice, you can use a feature called agent forwarding. With this feature machine B will be able to use the keys from the agent running on machine A.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; As for running the agent, you must only forward your agent to a machine that you trust 100%. Anybody with access to root or the account you use on machine B will be able to use your keys.&lt;br /&gt;
&lt;br /&gt;
To enable the feature, add this to &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
Host machineB.example.org machineD.example.org&lt;br /&gt;
    ForwardAgent yes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference Documents ==&lt;br /&gt;
[https://wiki.mozilla.org/Security/Guidelines/OpenSSH Mozilla Guidelines]&lt;br /&gt;
&lt;br /&gt;
[https://stribika.github.io/2015/01/04/secure-secure-shell.html Secure Secure Shell][[Category:Linux Server]]&lt;br /&gt;
[[Category:Fail2Ban]]&lt;br /&gt;
[[Category:Debian Release]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=PHP&amp;diff=663</id>
		<title>PHP</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=PHP&amp;diff=663"/>
		<updated>2017-10-05T20:07:02Z</updated>

		<summary type="html">&lt;p&gt;Vincent: fix colouring&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisite ==&lt;br /&gt;
&lt;br /&gt;
To use this guide, you will need [[Nginx]] installed and configured.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install php-cli php-fpm php-apcu&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
{{Warning|msg=Each version of php has different configuration files. You might need to adapt the 7.0 below to your actual php version. You will also need to redo this after php updates.}}&lt;br /&gt;
&lt;br /&gt;
=== Common configuration ===&lt;br /&gt;
&lt;br /&gt;
In Debian, the different flavor of PHP have their own configuration file. This allow fine grained configuration but makes it harder to have common behavior.&lt;br /&gt;
&lt;br /&gt;
Let’s create a common file read by all PHP interpreters.&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ echo -e &#039;; Commmon configuration for all PHP interpreters\n; priority=99\n&#039; | sudo tee /etc/php/7.0/mods-available/local-common.ini &amp;gt; /dev/null&lt;br /&gt;
$ sudo phpenmod -v 7.0 local-common&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Unless specified, all the settings bellow should go to &amp;lt;code&amp;gt;/etc/php/7.0/mods-available/local-common.ini&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP-FPM ===&lt;br /&gt;
&lt;br /&gt;
==== Integrate with Nginx ====&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/nginx/conf.d/php.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
upstream php {&lt;br /&gt;
    server unix:/run/php/php7.0-fpm.sock;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Processes ====&lt;br /&gt;
PHP-FPM create processes to handle incoming requests. If it runs out of  available processes, new requests will be put in queue and the users will experience delays. &lt;br /&gt;
&lt;br /&gt;
The number of processes to use will heavily depend on the traffic on your websites and on the available RAM/CPU on your server. To find optimal values check the log file &amp;lt;code&amp;gt;/var/log/php7.0-fpm.log&amp;lt;/code&amp;gt;. It will contains warnings when the number of processes need adjustment.&lt;br /&gt;
&lt;br /&gt;
The values to change are present in &amp;lt;code&amp;gt;/etc/php/7.0/fpm/pool.d/www.conf&amp;lt;/code&amp;gt;.  A good start point can be&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
pm = dynamic&lt;br /&gt;
pm.max_children = 30&lt;br /&gt;
pm.start_servers = 10&lt;br /&gt;
pm.min_spare_servers = 5&lt;br /&gt;
pm.max_spare_servers = 20&lt;br /&gt;
pm.max_requests = 500&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Security ===&lt;br /&gt;
&lt;br /&gt;
PHP is known to have a particularly poor track record in term of security. Although things are improving, it is recommended to harden you installation.&lt;br /&gt;
&lt;br /&gt;
==== Hide PHP ====&lt;br /&gt;
&lt;br /&gt;
It is generally a bad idea to give information on the technologies used by your system. This setting make sure that PHP is not exposed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
; Name of the sessionid cookie. Hide PHP and get a smaller cookie&lt;br /&gt;
session.name = sid&lt;br /&gt;
; Don&#039;t add script name in emails&lt;br /&gt;
mail.add_x_header = 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Session IDs ====&lt;br /&gt;
&lt;br /&gt;
By default PHP session IDs are not very random. Let&#039;s get some more entropy&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
; By default, PHP session IDs are not very random&lt;br /&gt;
; http://samy.pl/phpwn/ reduce session entropy down to 20 bits&lt;br /&gt;
; The settings bellow uses 256 bits of entropy from /dev/urandom&lt;br /&gt;
session.entropy_length = 32&lt;br /&gt;
; Default is md5&lt;br /&gt;
session.hash_function = sha256&lt;br /&gt;
; Not security related. Make the session ID cookie a bit shorter&lt;br /&gt;
session.hash_bits_per_character = 6&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prevent session fixation attacks&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
; Don&#039;t allow client to choose their session id&lt;br /&gt;
session.use_strict_mode = 1&lt;br /&gt;
; Hide session cookie from JavaScript&lt;br /&gt;
session.cookie_httponly = 1&lt;br /&gt;
; Make session cookie work only with HTTPS&lt;br /&gt;
; Warning: it might break you application if you don&#039;t use HTTPS&lt;br /&gt;
session.cookie_secure = 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Limit File Access ====&lt;br /&gt;
&lt;br /&gt;
By default, PHP allow scripts to read any file on the machine including sensible files like &amp;lt;code&amp;gt;/etc/passwd&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The setting bellow limit that. Of course when new sites are added, the list of folder need to be extended.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
; Column separated list of folder to allow inclusion from.&lt;br /&gt;
; Eg. &amp;quot;/usr/share/php/:/usr/share/phpmyadmin/&amp;quot;&lt;br /&gt;
open_basedir = &amp;quot;/usr/share/php/&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Linux Server]]&lt;br /&gt;
[[Category:Web Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Nextcloud&amp;diff=662</id>
		<title>Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Nextcloud&amp;diff=662"/>
		<updated>2017-10-04T07:37:51Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Update Nginx conf for Nextcloud 12&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prerequisite =&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[MariaDB]]&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
Download Nextcloud from https://nextcloud.com/install/#instructions-server and extract the archive in &amp;lt;code&amp;gt;/var/www/nextcloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Fix file permissions using&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo chown -r www-data: /var/www/nextcloud/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure PHP ===&lt;br /&gt;
{{PHP/open_basedir|folders=/var/www/nextcloud/:/dev/:/var/log/nextcloud/}}&lt;br /&gt;
&lt;br /&gt;
=== Configure Webserver ===&lt;br /&gt;
{{Nginx/New Site|domain=nextcloud.example.org|config=server {&lt;br /&gt;
    include snippets/listen-http.conf;&lt;br /&gt;
    server_name nextcloud.example.org;&lt;br /&gt;
&lt;br /&gt;
    access_log /var/log/nginx/nextcloud.example.org.access.log;&lt;br /&gt;
    error_log /var/log/nginx/nextcloud.example.org.error.log;&lt;br /&gt;
&lt;br /&gt;
    include snippets/https-permanent-redirect.conf;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
    include snippets/listen-https.conf;&lt;br /&gt;
    server_name nextcloud.example.org;&lt;br /&gt;
&lt;br /&gt;
    access_log /var/log/nginx/nextcloud.example.org.access.log;&lt;br /&gt;
    error_log /var/log/nginx/nextcloud.example.org.error.log;&lt;br /&gt;
&lt;br /&gt;
    include snippets/acme-challenge.conf;&lt;br /&gt;
    #include snippets/ssl.conf;&lt;br /&gt;
    #ssl_certificate      /etc/letsencrypt/live/nextcloud.example.org/fullchain.pem;&lt;br /&gt;
    #ssl_certificate_key  /etc/letsencrypt/live/nextcloud.example.org/privkey.pem;&lt;br /&gt;
    #include snippets/hsts.conf;&lt;br /&gt;
&lt;br /&gt;
    # Protect web interface during initial setup&lt;br /&gt;
    # The following two lines must be removed after initial configuration&lt;br /&gt;
    auth_basic            &amp;quot;You shall not pass!&amp;quot;;&lt;br /&gt;
    auth_basic_user_file  /etc/nginx/htpasswd/generic.htpasswd;&lt;br /&gt;
&lt;br /&gt;
    include snippets/security-headers.conf;&lt;br /&gt;
    # Using more_set_headers instead of add_header to be cascaded in sub location&lt;br /&gt;
    more_set_headers &amp;quot;X-Robots-Tag: none&amp;quot;;&lt;br /&gt;
    more_set_headers &amp;quot;X-Download-Options: noopen&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    # Path to the root of your installation&lt;br /&gt;
    root /var/www/nextcloud/;&lt;br /&gt;
    &lt;br /&gt;
    location = /.well-known/carddav {&lt;br /&gt;
        return 301 $scheme://$host/remote.php/dav;&lt;br /&gt;
    }&lt;br /&gt;
    location = /.well-known/caldav {&lt;br /&gt;
        return 301 $scheme://$host/remote.php/dav;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    client_max_body_size 10G; # set max upload size&lt;br /&gt;
    fastcgi_buffers 64 4K;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        rewrite ^ /index.php$uri;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location ~ ^/(?:build{{!}}tests{{!}}config{{!}}lib{{!}}3rdparty{{!}}templates{{!}}data)/ {&lt;br /&gt;
        deny all;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ ^/(?:\.{{!}}autotest{{!}}occ{{!}}issue{{!}}indie{{!}}db_{{!}}console) {&lt;br /&gt;
        deny all;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location ~ ^/(?:index{{!}}remote{{!}}public{{!}}cron{{!}}core/ajax/update{{!}}status{{!}}ocs/v[12]{{!}}updater/.+{{!}}ocs-provider/.+)\.php(?:${{!}}/) {&lt;br /&gt;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;&lt;br /&gt;
        include fastcgi_params;&lt;br /&gt;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
        fastcgi_param PATH_INFO $fastcgi_path_info;&lt;br /&gt;
        fastcgi_param HTTPS on;&lt;br /&gt;
        fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice&lt;br /&gt;
        fastcgi_param front_controller_active true;&lt;br /&gt;
        fastcgi_pass php;&lt;br /&gt;
        fastcgi_intercept_errors on;&lt;br /&gt;
        fastcgi_request_buffering off;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location ~ ^/(?:updater{{!}}ocs-provider)(?:${{!}}/) {&lt;br /&gt;
        try_files $uri/ =404;&lt;br /&gt;
        index index.php;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    # Adding the cache control header for js and css files&lt;br /&gt;
    # Make sure it is BELOW the PHP block&lt;br /&gt;
    location ~* \.(?:css{{!}}js{{!}}woff{{!}}svg{{!}}gif)$ {&lt;br /&gt;
        try_files $uri /index.php$uri$is_args$args;&lt;br /&gt;
        add_header Cache-Control &amp;quot;public, max-age=15778463&amp;quot;;&lt;br /&gt;
    }   &lt;br /&gt;
    &lt;br /&gt;
    location ~* \.(?:png{{!}}html{{!}}ttf{{!}}ico{{!}}jpg{{!}}jpeg)$ {&lt;br /&gt;
        try_files $uri /index.php$uri$is_args$args;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configure Nextcloud ===&lt;br /&gt;
//config.php&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo tee &amp;quot;/usr/local/bin/occ&amp;quot; &amp;gt; /dev/null &amp;lt;&amp;lt; EOF&lt;br /&gt;
&amp;gt; !/bin/sh&lt;br /&gt;
&amp;gt; sudo -u www-data /usr/bin/php /var/www/nextcloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
&amp;gt; EOF&lt;br /&gt;
$ sudo chmod +x /usr/local/bin/occ&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Logs ===&lt;br /&gt;
First you need to create a folder for the logs&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkdir /var/log/nextcloud&lt;br /&gt;
$ sudo chmod 750 /var/log/nextcloud&lt;br /&gt;
$ sudo chown www-data:adm /var/log/nextcloud&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Create file &amp;lt;code&amp;gt;/etc/logrotate.d/nextcloud&amp;lt;/code&amp;gt; with the following content&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
/var/log/nextcloud/nextcloud.log {&lt;br /&gt;
  rotate 6&lt;br /&gt;
  monthly&lt;br /&gt;
  compress&lt;br /&gt;
  delaycompress&lt;br /&gt;
  missingok&lt;br /&gt;
  notifempty&lt;br /&gt;
  create 640 www-data adm&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Finally activate the new log location. Edit &amp;lt;code&amp;gt;/var/www/nextcloud/config/config.php&amp;lt;/code&amp;gt; and  add/edit the &amp;lt;code&amp;gt;logfile&amp;lt;/code&amp;gt; line&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;logfile&#039; =&amp;gt; &#039;/var/log/nextcloud/nextcloud.log&#039;,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cron ===&lt;br /&gt;
Create file &amp;lt;code&amp;gt;/etc/cron.d/nextcloud&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
*/15 *   *   *   *   www-data /usr/bin/php -f /var/www/nextcloud/cron.php&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Now open Nextcloud in your browser and go to the admin section and activate cron&lt;br /&gt;
&lt;br /&gt;
[[File:owncloud cron.png|border|frameless|540x540px]]&lt;br /&gt;
&lt;br /&gt;
== Test ==&lt;br /&gt;
&lt;br /&gt;
=== Security ===&lt;br /&gt;
Nextcloud is providing a [https://scan.nextcloud.com/ security scanning service] for public instances.  Scan your instance to find configuration issues. &lt;br /&gt;
&lt;br /&gt;
[[Category:Debian Release]]&lt;br /&gt;
[[Category:Linux Server]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Browser_Extensions&amp;diff=661</id>
		<title>Browser Extensions</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Browser_Extensions&amp;diff=661"/>
		<updated>2017-09-29T07:09:53Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* KeePassHttp-Connector */ add chrome link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== KeePassHttp-Connector ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://addons.mozilla.org/en-US/firefox/addon/keepasshttp-connector/ Firefox] [https://chrome.google.com/webstore/detail/keepasshttp-connector/dafgdjggglmmknipkhngniifhplpcldb Chrome]&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
=== Cookie AutoDelete ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://github.com/Cookie-AutoDelete/Cookie-AutoDelete Cookie-AutoDelete]&lt;br /&gt;
&lt;br /&gt;
=== Decentraleyes ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://decentraleyes.org/ Decentraleyes]&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Everywhere ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://www.eff.org/https-everywhere HTTPS Everywhere]&lt;br /&gt;
&lt;br /&gt;
=== Privacy Badger ===&lt;br /&gt;
Links: [https://www.eff.org/privacybadger Privacy Badger]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Browser_Extensions&amp;diff=660</id>
		<title>Browser Extensions</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Browser_Extensions&amp;diff=660"/>
		<updated>2017-09-28T09:54:53Z</updated>

		<summary type="html">&lt;p&gt;Vincent: KeePassHttp-Connector&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== KeePassHttp-Connector ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://addons.mozilla.org/en-US/firefox/addon/keepasshttp-connector/ Firefox]&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&lt;br /&gt;
=== Cookie AutoDelete ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://github.com/Cookie-AutoDelete/Cookie-AutoDelete Cookie-AutoDelete]&lt;br /&gt;
&lt;br /&gt;
=== Decentraleyes ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://decentraleyes.org/ Decentraleyes]&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Everywhere ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://www.eff.org/https-everywhere HTTPS Everywhere]&lt;br /&gt;
&lt;br /&gt;
=== Privacy Badger ===&lt;br /&gt;
Links: [https://www.eff.org/privacybadger Privacy Badger]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Browser_Extensions&amp;diff=659</id>
		<title>Browser Extensions</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Browser_Extensions&amp;diff=659"/>
		<updated>2017-09-27T06:18:50Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Created page with &amp;quot;== Privacy ==  === Cookie AutoDelete === &amp;#039;&amp;#039;&amp;#039;Links:&amp;#039;&amp;#039;&amp;#039; [https://github.com/Cookie-AutoDelete/Cookie-AutoDelete Cookie-AutoDelete]  === Decentraleyes === &amp;#039;&amp;#039;&amp;#039;Links:&amp;#039;&amp;#039;&amp;#039; [https://d...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Privacy ==&lt;br /&gt;
&lt;br /&gt;
=== Cookie AutoDelete ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://github.com/Cookie-AutoDelete/Cookie-AutoDelete Cookie-AutoDelete]&lt;br /&gt;
&lt;br /&gt;
=== Decentraleyes ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://decentraleyes.org/ Decentraleyes]&lt;br /&gt;
&lt;br /&gt;
=== HTTPS Everywhere ===&lt;br /&gt;
&#039;&#039;&#039;Links:&#039;&#039;&#039; [https://www.eff.org/https-everywhere HTTPS Everywhere]&lt;br /&gt;
&lt;br /&gt;
=== Privacy Badger ===&lt;br /&gt;
Links: [https://www.eff.org/privacybadger Privacy Badger]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Firefox&amp;diff=658</id>
		<title>Firefox</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Firefox&amp;diff=658"/>
		<updated>2017-09-26T22:51:41Z</updated>

		<summary type="html">&lt;p&gt;Vincent: New settings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Privacy ==&lt;br /&gt;
&lt;br /&gt;
=== 3rd party cookies ===&lt;br /&gt;
Cookies are pieces of information that a website can store on your computer. There are two types of cookies:&lt;br /&gt;
* First party cookies: these are the cookies from the site you are visiting. They are used for example for the log-in functionality of most websites.&lt;br /&gt;
* Third party cookies: they are set by other website. For example, any time you visit a website with a like button from Facebook, Facebook will set a cookie on your computer. This allows them to follow them on most of the website you are going to. This is used by advertiser to know the websites you go to and show you the same advertising on all websites. In practice, very few websites use this for functionalities. It is quite safe to disable them.&lt;br /&gt;
Go to Preferences, and then, in the Privacy section, set Accept third-party-cookies to Never.&lt;br /&gt;
&lt;br /&gt;
[[File:Firefox History Settings.png|border]]&lt;br /&gt;
&lt;br /&gt;
=== WebRTC ===&lt;br /&gt;
[https://en.wikipedia.org/wiki/WebRTC WebRTC] is a protocol that allows peer to peer communication between browsers. This is for example for audio/video chat. To allow faster connections to computer within the same local network, this protocol allows the browser to share all your local IP addresses.&lt;br /&gt;
&lt;br /&gt;
This has two major problems:&lt;br /&gt;
* If a website contain malware, knowing your addresses is helping it to infect your network.&lt;br /&gt;
* This can be used to [https://en.wikipedia.org/wiki/Device_fingerprint fingerprint] your device and track you around the web.&lt;br /&gt;
To stop the leak, go to &amp;lt;code&amp;gt;about:config&amp;lt;/code&amp;gt; and change this setting&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
media.peerconnection.ice.no_host=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== About:config ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Setting&lt;br /&gt;
!Value&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|extensions.pocket.enabled&lt;br /&gt;
|false&lt;br /&gt;
|Disable the pocket integration&lt;br /&gt;
|-&lt;br /&gt;
|browser.tabs.closeWindowWithLastTab&lt;br /&gt;
|false&lt;br /&gt;
|Prevent Firefox from closing when you close last tab&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Android]]&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=657</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=657"/>
		<updated>2017-09-03T18:49:37Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre is an eBook management software. It allows you to copy you books from / to your eReader, edit metadata, search your library… &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. While Calibre will work with any eReader or even as a standalone, this page assume that you are using this one. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
I recommend creating a folder named &#039;&#039;calibre&#039;&#039; somewhere in your computer and inside this one create a folder named &#039;&#039;library&#039;&#039; and use this last one as library location. There are two reasons for this. First Calibre will use the name of the folder as the name of the library in the interface. Having your library called library make things easier. Secondlly, Calibre will complain if you add any file to it&#039;s library folder. The parent folder allows you to store additional files related to Calibre.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
This allow to store reading status from your eReader to you Calibre library.&lt;br /&gt;
&lt;br /&gt;
First step is to create columns in you library to store the data.&lt;br /&gt;
* Go to Preferences → Add your own columns&lt;br /&gt;
* Add the following columns {| class=&amp;quot;wikitable&amp;quot; !Column header !Lookup name !Type !Description |- |Complete |complete |Integers |Percent of the book that is read on device |- |Read |read |Date |Last date where the book was read on device |}&lt;br /&gt;
* Validate &amp;amp; restart Calibre&lt;br /&gt;
Now you can configure KoboUtilities&lt;br /&gt;
* Click on KoboUtilities&lt;br /&gt;
* In the Profiles tab, set the &#039;&#039;Custom columns&#039;&#039; and &#039;&#039;Store on connect&#039;&#039; sections[[File:Calibre - Read columns.png|center|frameless|585x585px]]&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
The plugin can do backups of the database on your eReader. In case something goes wrong with your device, this might come handy.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
&lt;br /&gt;
== Buy Books ==&lt;br /&gt;
Calibre allows you to search and buy books directly from the interface. This has a few advantages:&lt;br /&gt;
* Calibre will search several shops and compare prices&lt;br /&gt;
* Some shops are paying back a percentage from your purchase to Calibre developers. You can sponsor development  without paying more.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
Right click on &#039;&#039;Get books&#039;&#039; and go to &#039;&#039;Choose stores.&#039;&#039; In the list of stores unselect the ones the don&#039;t sell in ePub format (Amazon &amp;amp; Barnes and Noble). Also unselect the stores that are in languages that you don&#039;t speak (while they might have interesting books, you will need to go to their website to complete the purchase).&lt;br /&gt;
&lt;br /&gt;
=== Buy Books ===&lt;br /&gt;
* Click the &#039;&#039;Get books&#039;&#039; icon.&lt;br /&gt;
* Enter search criteria and click on &#039;&#039;Search&#039;&#039;&lt;br /&gt;
* Double click the book you want to buy&lt;br /&gt;
* Process to payment and download on the shop website&lt;br /&gt;
* If you downloaded a .acsm file see the section on DRM above&lt;br /&gt;
* Otherwise, in Calibre, click on &#039;&#039;Add Books&#039;&#039; select the file on your disk &lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=656</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=656"/>
		<updated>2017-09-02T16:35:26Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre is an eBook management software. It allows you to copy you books from / to your eReader, edit metadata, search your library… &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. While Calibre will work with any eReader or even as a standalone, this page assume that you are using one. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
This allow to store reading status from your eReader to you Calibre library.&lt;br /&gt;
&lt;br /&gt;
First step is to create columns in you library to store the data.&lt;br /&gt;
* Go to Preferences → Add your own columns&lt;br /&gt;
* Add the following columns {| class=&amp;quot;wikitable&amp;quot; !Column header !Lookup name !Type !Description |- |Complete |complete |Integers |Percent of the book that is read on device |- |Read |read |Date |Last date where the book was read on device |}&lt;br /&gt;
* Validate &amp;amp; restart Calibre&lt;br /&gt;
Now you can configure KoboUtilities&lt;br /&gt;
* Click on KoboUtilities&lt;br /&gt;
* In the Profiles tab, set the &#039;&#039;Custom columns&#039;&#039; and &#039;&#039;Store on connect&#039;&#039; sections[[File:Calibre - Read columns.png|center|frameless|585x585px]]&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
The plugin can do backups of the database on your eReader. In case something goes wrong with your device, this might come handy.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
&lt;br /&gt;
== Buy Books ==&lt;br /&gt;
Calibre allows you to search and buy books directly from the interface. This has a few advantages:&lt;br /&gt;
* Calibre will search several shops and compare prices&lt;br /&gt;
* Some shops are paying back a percentage from your purchase to Calibre developers. You can sponsor development  without paying more.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
Right click on &#039;&#039;Get books&#039;&#039; and go to &#039;&#039;Choose stores.&#039;&#039; In the list of stores unselect the ones the don&#039;t sell in ePub format (Amazon &amp;amp; Barnes and Noble). Also unselect the stores that are in languages that you don&#039;t speak (while they might have interesting books, you will need to go to their website to complete the purchase).&lt;br /&gt;
&lt;br /&gt;
=== Buy Books ===&lt;br /&gt;
* Click the &#039;&#039;Get books&#039;&#039; icon.&lt;br /&gt;
* Enter search criteria and click on &#039;&#039;Search&#039;&#039;&lt;br /&gt;
* Double click the book you want to buy&lt;br /&gt;
* Process to payment and download on the shop website&lt;br /&gt;
* If you downloaded a .acsm file see the section on DRM above&lt;br /&gt;
* Otherwise, in Calibre, click on &#039;&#039;Add Books&#039;&#039; select the file on your disk &lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=655</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=655"/>
		<updated>2017-09-02T16:20:29Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Buy books&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
This allow to store reading status from your eReader to you Calibre library.&lt;br /&gt;
&lt;br /&gt;
First step is to create columns in you library to store the data.&lt;br /&gt;
* Go to Preferences → Add your own columns&lt;br /&gt;
* Add the following columns {| class=&amp;quot;wikitable&amp;quot; !Column header !Lookup name !Type !Description |- |Complete |complete |Integers |Percent of the book that is read on device |- |Read |read |Date |Last date where the book was read on device |}&lt;br /&gt;
* Validate &amp;amp; restart Calibre&lt;br /&gt;
Now you can configure KoboUtilities&lt;br /&gt;
* Click on KoboUtilities&lt;br /&gt;
* In the Profiles tab, set the &#039;&#039;Custom columns&#039;&#039; and &#039;&#039;Store on connect&#039;&#039; sections[[File:Calibre - Read columns.png|center|frameless|585x585px]]&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
The plugin can do backups of the database on your eReader. In case something goes wrong with your device, this might come handy.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
&lt;br /&gt;
== Buy Books ==&lt;br /&gt;
Calibre allows you to search and buy books directly from the interface. This has a few advantages:&lt;br /&gt;
* Calibre will search several shops and compare prices&lt;br /&gt;
* Some shops are paying back a percentage from your purchase to Calibre developers. You can sponsor development  without paying more.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
Right click on &#039;&#039;Get books&#039;&#039; and go to &#039;&#039;Choose stores.&#039;&#039; In the list of stores unselect the ones the don&#039;t sell in ePub format (Amazon &amp;amp; Barnes and Noble). Also unselect the stores that are in languages that you don&#039;t speak (while they might have interesting books, you will need to go to their website to complete the purchase).&lt;br /&gt;
&lt;br /&gt;
=== Buy Books ===&lt;br /&gt;
* Click the &#039;&#039;Get books&#039;&#039; icon.&lt;br /&gt;
* Enter search criteria and click on &#039;&#039;Search&#039;&#039;&lt;br /&gt;
* Double click the book you want to buy&lt;br /&gt;
* Process to payment and download on the shop website&lt;br /&gt;
* If you downloaded a .acsm file see the section on DRM above&lt;br /&gt;
* Otherwise, in Calibre, click on &#039;&#039;Add Books&#039;&#039; select the file on your disk &lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=654</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=654"/>
		<updated>2017-09-02T15:20:39Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Read Percent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
This allow to store reading status from your eReader to you Calibre library.&lt;br /&gt;
&lt;br /&gt;
First step is to create columns in you library to store the data.&lt;br /&gt;
* Go to Preferences → Add your own columns&lt;br /&gt;
* Add the following columns {| class=&amp;quot;wikitable&amp;quot; !Column header !Lookup name !Type !Description |- |Complete |complete |Integers |Percent of the book that is read on device |- |Read |read |Date |Last date where the book was read on device |}&lt;br /&gt;
* Validate &amp;amp; restart Calibre&lt;br /&gt;
Now you can configure KoboUtilities&lt;br /&gt;
* Click on KoboUtilities&lt;br /&gt;
* In the Profiles tab, set the &#039;&#039;Custom columns&#039;&#039; and &#039;&#039;Store on connect&#039;&#039; sections[[File:Calibre - Read columns.png|center|frameless|585x585px]]&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
The plugin can do backups of the database on your eReader. In case something goes wrong with your device, this might come handy.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=File:Calibre_-_Read_columns.png&amp;diff=653</id>
		<title>File:Calibre - Read columns.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=File:Calibre_-_Read_columns.png&amp;diff=653"/>
		<updated>2017-09-02T15:18:09Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre - Read columns&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=652</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=652"/>
		<updated>2017-09-02T14:18:49Z</updated>

		<summary type="html">&lt;p&gt;Vincent: Add categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;br /&gt;
[[Category:Linux Desktop]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=651</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=651"/>
		<updated>2017-09-02T14:17:38Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Configuration */ KoboUtilities&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* Plug your Kobo eReader to your computer&lt;br /&gt;
* Click the &#039;&#039;KoboUtilities&#039;&#039; button&lt;br /&gt;
* Select the &#039;&#039;Devices&#039;&#039; tab&lt;br /&gt;
* Click the &#039;&#039;Add connected device&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
Click the &#039;&#039;KoboUtilities&#039;&#039; button, select the &#039;&#039;Devices&#039;&#039; tab and setup the backup section.&lt;br /&gt;
[[File:Calibre backup settings.png|center|frameless|589x589px]]&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=File:Calibre_backup_settings.png&amp;diff=650</id>
		<title>File:Calibre backup settings.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=File:Calibre_backup_settings.png&amp;diff=650"/>
		<updated>2017-09-02T14:15:16Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Calibre backup settings&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=649</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=649"/>
		<updated>2017-08-31T18:41:43Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Setup */ Change icon theme&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Icons ===&lt;br /&gt;
The default icon theme is not very consistent in terms of colour / style.&lt;br /&gt;
&lt;br /&gt;
To change it, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Look &amp;amp; feel&#039;&#039; → &#039;&#039;Change icon theme&#039;&#039;. I recommand the Monstre theme which is quite complete and look nice.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=648</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=648"/>
		<updated>2017-08-31T14:50:39Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the Touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
As its name says, this pugin provide various utilities to use with your Kobo eReader&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
&lt;br /&gt;
==== Read Percent ====&lt;br /&gt;
&lt;br /&gt;
==== Backups ====&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=647</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=647"/>
		<updated>2017-08-31T14:30:38Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader.  &lt;br /&gt;
&lt;br /&gt;
After installing it, it is recommended to disable the default in plug-in to avoid Calibre choosing the wrong plugin. Go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Device Interface plug-ins&#039;&#039; and disable &#039;&#039;KoboTouch&#039;&#039;. &lt;br /&gt;
[[File:KoboTouch Extended - plugin list.png|center|frameless|737x737px]]&lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; Run the following commands &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
Before opening a book in Adobe Digital Edition, you need to authorize it. &lt;br /&gt;
&lt;br /&gt;
To authorise the computer go to &#039;&#039;Library&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (1.7) or &#039;&#039;Help&#039;&#039; → &#039;&#039;Authorize Computer&#039;&#039; (2.0).&lt;br /&gt;
&lt;br /&gt;
Select Adobe ID as provider, and enter your adobe account info.&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
To make sure that the DRM where correctly removed, right-click on the book in Calibre and choose &#039;&#039;view&#039;&#039;. If the book displays, there is no more DRM.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=File:KoboTouch_Extended_-_plugin_list.png&amp;diff=646</id>
		<title>File:KoboTouch Extended - plugin list.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=File:KoboTouch_Extended_-_plugin_list.png&amp;diff=646"/>
		<updated>2017-08-31T14:27:15Z</updated>

		<summary type="html">&lt;p&gt;Vincent: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Disable other plugins when KoboTouch Extended is installed&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=645</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=645"/>
		<updated>2017-08-31T13:35:23Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* Install DeDRM Plugin */ Install DeDRM Plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader. &lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&#039;&#039;&#039;Linux Only:&#039;&#039;&#039; Check [https://raw.githubusercontent.com/apprenticeharper/DeDRM_tools/master/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt official instructions], section &#039;&#039;Linux Systems Only&#039;&#039;. You don&#039;t need to install &#039;&#039;Adobe Digital Editions&#039;&#039; since you just did it. You can also skip anything related to Kindle unless you want to buy books on Amazon.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All:&#039;&#039;&#039; Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=644</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=644"/>
		<updated>2017-08-31T13:26:14Z</updated>

		<summary type="html">&lt;p&gt;Vincent: /* eBooks From Other Book Stores */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader. &lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
&lt;br /&gt;
==== Block Analytics ====&lt;br /&gt;
The kobo eReaders are including an analytics feature. In particular, they collect the infos on all the books that you put on your reader — including the ones that you didn&#039;t purchase from them.&lt;br /&gt;
&lt;br /&gt;
This plugins allows to block analytics events&lt;br /&gt;
* Connect your eReader to your computer&lt;br /&gt;
* Click on the arrow near the KoboUtilities icon and select &#039;&#039;Database&#039;&#039; → &#039;&#039;Block Analytics Event&#039;&#039;&lt;br /&gt;
* In the window that opened, select &#039;&#039;Create or change trigger&#039;&#039; and click &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;br /&gt;
&lt;br /&gt;
==== Install Adobe Digital Edition ====&lt;br /&gt;
{{Warning|msg=}}You need to use version 1.7 or 2.0. https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-registered-adobe-digital-editions-30-or-later-with-an-adobe-id-before-downloading-but-my-epub-or-pdf-still-has-drm&lt;br /&gt;
&#039;&#039;&#039;Linux:&#039;&#039;&#039; &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo apt install wine32 winetricks&lt;br /&gt;
$ winetricks adobe_diged&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Download version 2.0 from http://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe&lt;br /&gt;
&lt;br /&gt;
==== Authorize Adobe Digital Edition ====&lt;br /&gt;
&lt;br /&gt;
==== Install DeDRM Plugin ====&lt;br /&gt;
&lt;br /&gt;
==== Import Books ====&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can test the procedure using [https://www.adobe.com/uk/solutions/ebook/digital-editions/sample-ebook-library.html sample files from Adobe]. Make sure you test files with acsm extension.&lt;br /&gt;
&lt;br /&gt;
When you buy an eBook protected by Adobe DRM, the file you download is not the eBook but a license file with the acsm extension.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to open this acsm file in &#039;&#039;Adobe Digital Edition&#039;&#039; to retrieve the actual eBook.&lt;br /&gt;
&lt;br /&gt;
To import the eBook in Calibre and remove the DRM, simply click the &#039;&#039;Add books&#039;&#039; buttons. The files are in a folder named  &#039;&#039;My Digital Editions&#039;&#039; in you &#039;&#039;Home&#039;&#039; or &#039;&#039;My Documents&#039;&#039; folder.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
	<entry>
		<id>https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=643</id>
		<title>Calibre</title>
		<link rel="alternate" type="text/html" href="https://wiki.meurisse.org/index.php?title=Calibre&amp;diff=643"/>
		<updated>2017-08-31T07:07:46Z</updated>

		<summary type="html">&lt;p&gt;Vincent: WIP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}} &lt;br /&gt;
&lt;br /&gt;
Calibre is an ebook management software. &lt;br /&gt;
&lt;br /&gt;
== Prerequisite ==&lt;br /&gt;
* A Window or Linux computer. MacOs should work as well but was not tested.&lt;br /&gt;
* A Kobo eReader. The instructions should work for any Kobo of the touch, Glo, Mini and Aura families.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
When the firmware of your Kobo is updated, you usually need an up-to-date Calibre to be able to synchronise your eBooks. For this reason, it is recommended to not install from your Linux distribution but directly from their website.&lt;br /&gt;
&lt;br /&gt;
To install, go to https://calibre-ebook.com/download and follow instructions.&lt;br /&gt;
&lt;br /&gt;
=== First-run ===&lt;br /&gt;
The first time you run calibre you will be asked a few question. The most important is the location of your library. Calibre will use this folder to store al the eBooks that you add to it.&lt;br /&gt;
&lt;br /&gt;
== Kobo Setup ==&lt;br /&gt;
Calibre will allow you to send ebooks to your Kobo without any configuration. However, the following plugins will enhance your experience.&lt;br /&gt;
&lt;br /&gt;
To install them, go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins&#039;&#039; → &#039;&#039;Get new plug-ins&#039;&#039;, select the plugin in the list and click &#039;&#039;Install&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Metadata Reader / KePub Metadata Writer ===&lt;br /&gt;
These two plugins don&#039;t provide any features. They are just used as dependency by &#039;&#039;KePub Output&#039;&#039; and &#039;&#039;KoboTouch Extended&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== KePub Output ===&lt;br /&gt;
Kobo readers are using [https://wiki.mobileread.com/wiki/Kepub Kepub] files. Those are similar to standard Epub files but support additional functionalities.&lt;br /&gt;
&lt;br /&gt;
This plugin allows conversion of ebooks to the kepub format.&lt;br /&gt;
&lt;br /&gt;
=== KoboTouch Extended ===&lt;br /&gt;
This plugin replace the kobo driver that comes with Calibre, it allows the conversion to Kepub format transparently when you synchronise with a Kobo eReader. &lt;br /&gt;
&lt;br /&gt;
=== Kobo Utilities ===&lt;br /&gt;
&lt;br /&gt;
== eBooks with DRM ==&lt;br /&gt;
When you buy an eBook from most major online book stores, they are likely to be protected by DRM. This has two major consequences. &lt;br /&gt;
* You won&#039;t be able to convert your eBooks to the Kepub format. This mean that advanced features not be available unless you buy your books on the Kobo store&lt;br /&gt;
* You might not be able to read the book on the device of your choice&lt;br /&gt;
* If the book store ever stop its operations, you might not be able to read your eBook at all&lt;br /&gt;
Fortunately it is possible to remove DRM from books allo.ing you to use the file that you legally purchased.&lt;br /&gt;
{{Warning|msg=Removing DRM from the eBooks you purchased is illegal in some countries. Check the law before doing it.  Do not share your eBooks illegally. Tagging technologies allow publishers to find the original purchaser of an eBook. You have been warned!}}&lt;br /&gt;
&lt;br /&gt;
=== eBooks from Kobo ===&lt;br /&gt;
&lt;br /&gt;
==== Install Plugin ====&lt;br /&gt;
Download the zip file from https://github.com/apprenticeharper/DeDRM_tools/tree/master/Obok_calibre_plugin.&lt;br /&gt;
&lt;br /&gt;
In Calibre go to &#039;&#039;Preferences&#039;&#039; → &#039;&#039;Plug-ins → Load plug-in from file&#039;&#039;, select the file that you just downloaded and validate.&lt;br /&gt;
&lt;br /&gt;
==== Use ====&lt;br /&gt;
Simply click the &#039;&#039;Obok DeDRM&#039;&#039; button. The plugin will import and strip DRM from files.&lt;br /&gt;
&lt;br /&gt;
Depending if your eReader is connected to your computer, the obok plugin will try to load book either from the eReader or the Kobo Desktop application.&lt;br /&gt;
&lt;br /&gt;
=== eBooks From Other Book Stores ===&lt;br /&gt;
You can buy eBook from any book store that sell them in ePub. When those books are protected with DRM, you will need to use Adobe Digital Edition to download them.&lt;br /&gt;
&lt;br /&gt;
==== Adobe ID ====&lt;br /&gt;
The first thing you need is an Adobe ID. If you don&#039;t have one, you can create one on https://accounts.adobe.com/.&lt;/div&gt;</summary>
		<author><name>Vincent</name></author>
	</entry>
</feed>