This is a typical documentation post on how to set up a stack of open source tools to create a media center at home. That involves not just the frontend, that you can use on your TV or other devices, but also the tools needed for monitoring the release of certain movies and tv shows.
By the time you reach the end of the post and look at the code you will be wondering "is it worth the time?". I had the same reservations when I started looking to all these tools and it's definitely something to consider. But they do simplify a lot of the tasks that you probably do manually now. And in the end, you get an interface that has a similar user experience as many commercial streaming services do.
To minimize the effort of installing all this software and reducing future maintenance, you can use docker containers. The linuxserver.io project has done some amazing work on this area, providing pre-built container images. They definitely worth your support if you can afford donating.
Below I include a docker compose file that will make everything work together. Some prerequisites that you need to take care of:
docker
group.id
. Use the numeric values from uid
and guid
to replace the values for PUID
and PGID
respectively in the compose file below.volumes
configuration at the bottom of the file). Hardlinks are being used then to avoid duplicating files or doing unnecessary file transfers. For a more detailed explanation see Radarr's documentation./data
for configuration directories per app and /data/public
for the actual media.docker-compose.yml
.version: "3.7"
services:
transmission:
image: lscr.io/linuxserver/transmission:latest
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- UMASK=002
- USER= #optional
- PASS= #optional
volumes:
- /data/transmission:/config
- data:/data
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- UMASK=002
volumes:
- /data/sonarr:/config
- data:/data
ports:
- 8989:8989
restart: unless-stopped
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- UMASK=002
volumes:
- /data/radarr:/config
- data:/data
ports:
- 7878:7878
restart: unless-stopped
jackett:
image: lscr.io/linuxserver/jackett:latest
container_name: jackett
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- UMASK=022
dns:
- 88.198.92.222
volumes:
- /data/jackett:/config
- data:/data
ports:
- 9117:9117
restart: unless-stopped
bazarr:
image: lscr.io/linuxserver/bazarr:latest
container_name: bazarr
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- UMASK=022
volumes:
- /data/bazarr:/config
- data:/data
ports:
- 6767:6767
restart: unless-stopped
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- UMASK=022
- JELLYFIN_PublishedServerUrl= #optional
volumes:
- /data/jellyfin:/config
- data:/data
ports:
- 8096:8096
restart: unless-stopped
volumes:
data:
driver: local
driver_opts:
type: none
device: /data/public
o: bind
To make it easier accessing all those services Nginx can be used to map ports exposed by docker under the same domain. You can of course just use your server's IP address, but having a domain name can also make it easier for other people who are not as good as you in memorizing IP addresses (I know right?).
Although it may not considered a good practice to point an external domain to an internal IP, it be very convenient in this use case since it allows you to issue a valid and free SSL certificate using Let's Encrypt.
Below is a simple Nginx configuration that can work together with the docker compose setup described above.
upstream transmission {
server 127.0.0.1:9091;
keepalive 4;
}
upstream sonarr {
server 127.0.0.1:8989;
keepalive 4;
}
upstream radarr {
server 127.0.0.1:7878;
keepalive 4;
}
upstream jackett {
server 127.0.0.1:9117;
keepalive 4;
}
upstream bazarr {
server 127.0.0.1:6767;
keepalive 4;
}
upstream jellyfin {
server 127.0.0.1:8096;
keepalive 4;
}
server {
listen 80;
listen [::]:80;
server_name media.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name media.example.com;
ssl_certificate "/etc/certs/acme/fullchain.cer";
ssl_certificate_key "/etc/certs/acme/media.example.com.key";
location /radarr {
include /etc/nginx/snippets/proxy_pass.conf;
proxy_pass http://radarr;
}
location /sonarr {
include /etc/nginx/snippets/proxy_pass.conf;
proxy_pass http://sonarr;
}
location /jackett {
include /etc/nginx/snippets/proxy_pass.conf;
proxy_pass http://jackett;
}
location /bazarr {
include /etc/nginx/snippets/proxy_pass.conf;
proxy_pass http://bazarr;
}
location /transmission {
include /etc/nginx/snippets/proxy_pass.conf;
proxy_pass_header X-Transmission-Session-Id;
proxy_pass http://transmission;
}
location / {
include /etc/nginx/snippets/proxy_pass.conf;
proxy_pass http://jellyfin;
}
}
Some things to take care of:
media.example.com
server name with yours.<UrlBase>/radarr</UrlBase>
at its config.xml
.proxy_pass
options are the same for all services, there is an include directive pointing to the snippet below.proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
Since the subdomain will be pointing to an internal IP it can be difficult to use the http challenge to get a certificate. Instead, you can use acme.sh that supports many DNS providers and can automate the DNS challenge verification.
Here is an example command for issuing a certificate for the first time, using Cloudflare DNS:
acme.sh --debug --issue --dns dns_cf -d media.example.com --dnssleep 300
You will need to make that Nginx configuration points to the certificates created by acme.sh.
All you have to do is bring docker containers up. Switch to the user you created for that purpose and
go to the directory you saved docker-compose.yml
:
docker-compose up -d
As root you should also start Nginx:
systemctl enable --now nginx.service
And that's it!
Some post-installation configuration to make everything work together:
/sonarr
for Sonarr) in all the applications.Upgrading the whole stack is just two commands:
docker-compose pull
docker-compose restart
You can also make a systemd service to run the docker containers on boot.
It also helps if you want to check logs and you are familiar with journald
.
Here is a simple service file:
[Unit]
Description=Media Center
[Service]
RemainAfterExit=yes
User=username
Group=group
WorkingDirectory=/home/username/
ExecStart=docker-compose up -d
ExecReload=docker-compose restart
ExecStop=docker-compose stop
Restart=always
username
and group
with your settings./etc/systemd/system/
Reload systemd to view the new service file and run and activate the service:
systemctl daemon-reload
systemctl enable --now mediacenter.service
Enjoy!
]]>It’s been a few years since the last Chaos Computer Congress. Same as many other people I highly enjoyed being there. Meeting with people, participating in discussions and a bit of hacking. Most of the things taking place in a congress are quite difficult to describe them in writing and most of happening outside of the presentation rooms. But stil, I thought I should share at least some sessions I enjoyed.
💡 If you use Kodi, install the relevant add-on to watch these in comfort (or any other of the apps)
Predator Files: How European spyware threatens civil society around the world
A technical deep dive into Amnesty International investigation about the spyware alliance Intellexa, which is used by governments to infect the devices and infrastructure we all depend on.
Tech(no)fixes beware!
Spotting (digital) tech fictions as replacement for social and political change. As the climate catastrophe is imminent and global injustice is rising, a lot of new tech is supposed to help the transition to a sustainable society. Although some of them can actually help with parts of the transition, they are usually discussed not as tools to assist the broader societal change but as replacement for the broader societal change.
A Libyan Militia and the EU - A Love Story?
An open source investigation by Sea-Watch and other organizations, on how EU (either directly or through Frontex) is collaborating with Tariq Ben Zeyad Brigade (TBZ), a notorious East Libyan land-based militia. TBZ were deeply involved in the failed passage of the boat that sank near Pylos, in which up to 500 people drowned.
Tractors, Rockets and the Internet in Belarus
How belarusian authoritarian regime is using technologies to repress it's population. With dropping costs of surveillance smaller authoritarian regimes are gaining easier access to different "out of the box" security solutions used mainly to further oppress people.
Please Identify Yourself!
Focused mostly on EU's eIDAS and India's Aadhaar, and highlighting how Digital Identity Systems proliferate worldwide without any regard for their human rights impact or privacy concerns. Driven by governments and the crony capitalist solutionism peddled by the private sector, these identification systems are a frontal attack on anonymity in the online world and might lead to completely new forms of tracking and discrimination.
On Digitalisation, Sustainability & Climate Justice
A critical talk about sustainability, technology, society, growth and ways ahead. Which digital tools make sense, which do not and how can we achieve global social emancipation from self-destructive structures and towards ecological sustainability and a and a just world?
Energy Consumption of Datacenters
The increase of datacenter energy consumption has already been exponential for years. With the AI hype, this demand for energy, cooling and water has increased dramatically.
Software Licensing For A Circular Economy
How Open Source Software connects to sustainability, based on the KDE Eco initiative. Concrete examples on
Free & Open Source Software license can disrupt the produce-use-dispose linear model of hardware consumption and enable the shift to a reduce-reuse-recycle circular model.
Anyone who has paricipated in a Congress knows that there is a wide variety of workshops and self-organized sessions outside of the official curated talks. Most of them not recorded, but still I thought I should share some highlights and thoughts in case people want to dig a bit deeper into these topics.
Running a NGO on FreeSoftware
Fascillitated by FSFE to showcase what kind software is being used for day to day operations. Many other tech people from other NGOs participated in the discussion.
Greg Egan's „Orthogonal“: A universe without timelike dimensions
If you are into hard sci-fi, you may have read a Greg Egan book already. My personal favorite being Permutation City. This session was focusing on the physics behind the Orthogonal trilogy.
Can you imagine a world beyond capitalism? Exploring economic history with David Graeber's Debt
This was a nice session (and discussion) inspired by David Graeber's book: Debt, The First 5,000 Years.
Technologies for Disaster
A workshop for people in tech running OpSec trainings (eg. Cryptoparties) for non-tech people in danger.
A big portion of the discussion was around threat modeling.
Decolonize runet! Decolonize network measurements! A provocative take on the Russian sovereign internet project
Not very familiar with Runet before this talk, a russian "sovereign internet" project.
I pack my ICT-bag for Gaza and I take with me...
This was organized by Cadus, an emergency response organization. As they prepare on going to Gaza, the session was mostly about the challenges of preparing a humanitarian response to a conflict zone. But the discussion was also focused around the situation of communication networks in Gaza and how to workaround current limitations imposed by the Israel state.
Some quick links on projects captured in my notes based on discussions during the Congress.
Υπάρχει μια μεγάλη στρέβλωση στην ελληνική κοινωνία. Είναι αρκετά έντονη αυτήν την περίοδο, με την παρούσα κυβέρνηση, αλλά δεν είναι καινούρια. Παρακολουθώντας την κυρίαρχη αφήγηση, τον δημόσιο λόγο αρκετών πολιτικών και δημοσιογράφων, αλλά και τις αντιδράσεις ανθρώπων που ανήκουν με κάποιον τρόπο στον πολιτικό χώρο που ξεκινάει απ’ το κέντρο και πάει προς τα δεξιά, δεν μπορώ να μην παρατηρήσω τις αντιφάσεις απ’ τις οποίες διέπεται.
Υπάρχει ένα κομμάτι της ελληνικής κοινωνίας που έχει κρατήσει για τον εαυτό της συγκεκριμένες πολιτικές ταυτότητες, όπως φιλελεύθεροι, κοσμοπολίτες, δημοκράτες, παραγωγικοί, ευγενείς, κλπ. Έννοιες που στο δικό τους κόσμο (και πιθανόν και σε ένα πολύ μεγαλύτερο κομμάτι της κοινωνίας) έχουν θετικό πρόσημο. Στην πραγματικότητα όμως, τα λόγια και οι πράξεις τους μας δείχνουν κάτι διαφορετικό.
Θα μιλήσουν ως φιλο-ευρωπαϊστές, θα μιλήσουν με περηφάνια για το πτυχία που έχουν από ξένα πανεπιστήμια ή θα εκφράσουν τον θαυμασμό τους γι αυτούς που τα έχουν. Θα μας πουν πόσο κοσμοπολίτες είναι. Οι ίδιοι άνθρωποι θα μιλήσουν για εισβολείς μετανάστες, για την ανάγκη δημιουργίας ακόμα περισσότερων κέντρων συγκέντρωσης. Θα μιλήσουν για αλλοίωση του πολιτισμού μας ή για το «γεγονός» πως «δεν χωράμε». Θα δικαιολογήσουν τις επαναπροωθήσεις ή ακόμα χειρότερα το τρύπημα σε βάρκες μεταναστών. Αλλά ταυτόχρονα δεν έχουν κανένα πρόβλημα να δεχτούν επενδύσεις απ’ το εξωτερικό ή να ανοίξουν τα σύνορα εν καιρώ πανδημίας σε τουριστικούς μετανάστες. Ο κοσμοπολιτισμός τους, όπως και ο ρατσισμός τους, είναι ταξικός.
Θα μιλήσουν ως φιλελεύθεροι, αλλά η ελευθερία τους εξαντλείται στην ελευθερία κίνησης χρήματος και εμπορευμάτων. Θα υψώσουν τείχη στα σύνορα, για να σταματήσουν την ελεύθερη μετακίνηση των ανθρώπων. Θα σταθούν απέναντι στην προάσπιση και διεύρυνση ατομικών και κοινωνικών ελευθεριών, ειδικά όταν αυτές περιλαμβάνουν ανθρώπους άλλου φύλου, διαφορετικού σεξουαλικού προσανατολισμού ή ακόμα και διαφορετικών πολιτικών πεποιθήσεων. Θα μιλήσουν ως φυσικοί συνεχιστές της Γαλλικής Επανάστασης, λησμονώντας να μιλήσουν για ισότητα και αλληλεγγύη.
Θα μιλήσουν ως το παραγωγικό κομμάτι της κοινωνίας, όταν πολλοί εξ αυτών θαυμάζουν ανθρώπους που δεν έχουν πεινάσει ή δεν έχουν εργαστεί ποτέ στη ζωή τους. Πιθανόν να ανήκουν και οι ίδιοι σε αυτούς. Την ίδια στιγμή θα εγκαλέσουν ως υποκριτές όσους βρίσκονται πολιτικά απέναντι τους και έχουν το θράσος να μην ζουν στη φτώχεια και στη μιζέρια. Πιστεύουν ακράδαντα πως είναι οι μόνιμοι ιδιοκτήτες αυτής της χώρας.
Θα μιλήσουν ως ευγενείς και «καθαροί», ως άνθρωποι μιας ανώτερης τάξης. Οι ίδιοι που θα δικαιολογήσουν κάθε κήρυγμα μίσους που εκτοξεύεται από κάποιον άμβωνα.
Θα μιλήσουν ως δημοκράτες και άνθρωποι της νομιμότητας. Αλλά γι αυτούς η παραβατικότητα χρήζει μεγαλύτερης και αυστηρότερης πάταξης απ’ την εγκληματικότητα. Θα δικαιολογήσουν κάθε μορφή αστυνομικής βίας, όσο εξόφθαλμα καταχρηστική κι αν είναι, γνωρίζοντας εκ τους ασφαλούς πως ο αποδέκτης της δεν θα είναι ένας απ’ αυτούς. Αποδέχονται το μονοπώλιο της βίας, ενώ καταδικάζουν τη βία απ’ όπου κι αν προέρχεται. Θα κουνήσουν το δάχτυλο για την τήρηση της νομιμότητας, επειδή ταυτίζοντας τον εαυτό τους με τον νομοθέτη, εξαιρούνται απ’ αυτή.
Έχουν ταυτίσει τον εαυτό τους με την ηθική και την πρόοδο, όταν στην πραγματικότητα αντιπροσωπεύουν ό,τι πιο μισαλλόδοξο, πουριτανικό, ρατσιστικό και μικρόψυχο υπάρχει στην ελληνική κοινωνία. Ο διχασμός που βιώνουμε είναι πιο απλός απ’ όσο φανταζόμαστε. Είναι ένας διχασμός ανάμεσα σε ανθρώπους και τέρατα.
This is a brief travel diary post, for the recent trip to Japan (01-16.01.2020).
At the end of the post, there a slideshow of selected photos.
Flew to Tokyo
(through Moscow).
Arrived at Narita airport (NRT). Took the train to Kyoto
.
Kyoto: Walk to temples, shrines, Zen gardens.
Kyoto: Castle/Palace, Gold temple, Shin market
Kyoto > Osaka
. Namba station.
Osaka > Hiroshima
. Peace Memorial Museum. First tast of Okonomiyaki.
Osaka > Kobe
. Kobe > Himeji
. Visited Castle.
Osaka > Tokyo
. Shibuya, Harajuku, Shimo-Kitozawa.
Tokyo > Nikko
.
Ghibli Museum. Shibuya.
Tokyo > Hakone
. Tonzen Onsen. Nakano.
Itõ. Atami. Shinjuku.
Chiba
. Hitotsumatsu. Nakazato beach. Ichinomiya. Isumi. Ohara. Otaki. Kururi. Ueno.
Ueno Onshi Park. Himalayan Cedar Tree. Ginza. Akihabara. Tokyo Edo Museum.
Tokyo National Museum. Nezu. Odaiba. Unicorn Gundam Statue. Akihabara.
Flew back from Narita
airport.
For fun and security (and a bit of paranoia), I thought I should whitelist my trusted USB devices and block everything else.
We have a couple of tools that can help us with that. USBGuard is the one I found to be the most configurable and well documented.
NOTICE: All commands here require certain privileges. To make commands easier to read, I omitted adding
sudo
in the beginning. But you probably need to.
USBGuard should already be packaged for your favorite Linux distribution.
One important thing to consider though is that on Debian (and derivatives) installing a package that comes with a systemd service file ends up being started and enabled by default. That means that if your input devices are USB-connected, you will find yourself locked out of your system. This may include even devices that are not physically plugged in a USB port (eg. your laptop built-in keyboard).
The upstream developer actually has a relevant warning:
WARNING: before you start using usbguard be sure to configure it first unless you know exactly what you are doing (all USB devices will get blocked).
But that didn't stop the Debian developers, who maintain that package, to allow USBGuard daemon to start with zero configuration 🤷
You can find more detailed guides on how to prevent this "feature", but for the scope of this post here is what I did.
Systemd comes with a mask feature, that will prevent a certain service from being started. So for instance, if you try this:
sudo systemctl mask nginx.service
sudo systemctl start nginx.service
You'll get this error:
Failed to start nginx.service: Unit nginx.service is masked.
In our case, we can't use the mask command because USBGuard is not installed yet. But what mask actually does is just create a symlink. So all we have to do is create it manually:
sudo ln -s /dev/null /etc/systemd/system/usbguard.service
And now we can safely install USBGuard:
sudo apt install usbguard
First thing to do is create an initial policy that whitelists all of our usb devices. Now it's a good time to plug-in devices that you tend to use often and you already trust. You can of course whitelist devices at any point.
usbguard generate-policy
The above command will display the list of your currently plugged devices with an allow
keyword in the beginning. Let's save that to USBGuard's configuration file:
usbguard generate-policy > /etc/usbguard/rules.conf
Now it's safe to unmask, start and enable USBGuard daemon:
systemctl unmask usbguard.service
systemctl start usbguard.service
systemctl enable usbguard.service
To test this actually works try to plug a new device, not whitelisted yet. Let's a simple USB stick. Hopefully it will be blocked. To confirm that:
usbguard list-devices
This lists all your detected devices. The new device you just plugged-in should have a block
keyword in the beginning. For a more filtered output:
usbguard list-devices | grep block
You should see something like this:
13: block id 0xxx:0xxx serial <...>
Now let's say you actually want to unblock this device, because it came from a friend you trust. The command we run above also contained an ID number. The first thing on that line. We can use that and allow that device:
usbguard allow-device 13
Using allow-device
doesn't whitelist the device for ever. So let's say you bought a new external disk and you want to whitelist it. USBGuard has an append-rule
command. You just need to paste the whole device line starting with an allow
keyword.
Plug the device and see the USBGuard output:
usbguard list-devices | grep block
You should see something like this:
21: block id 0xxx:0xxx serial <...>
Copy the whole line starting from id
and then use it but prefix it with an allow
keyword (mind the single quotes used to wrap the entire rule):
usbguard append-rule 'allow id 0xxx:0xxx serial <...>'
At any point you can see the whitelisted devices:
usbguard list-rules
And you use the id number in the beginning of each line in order to interact with that specific rule. For example to remove a device:
usbguard remove-rule <id>
And remember, there is no such thing as absolute security. It all comes down to your Threat model.
Comments and reactions on Mastodon, Diaspora, Twitter and Lobsters.
]]>This is a brief travel diary post, for the recent road trip at Portugal and Spain (13-28.07.2019)
At the end of the post, there a slideshow of photos, just a glimpse from the various places, an aproximation of the drive route and a map with all the places mentioned here.
Flew from Athens to Porto.
Stayed at Porto
. Walked through the old town, took a boat taxi across the river, a cable car to the top of the bridge, crossed the bridge on foot.
Drove towards Valladolid
, crossed the borders through Miranda do Douro
.
Drove towards Basque Country. Went for swimming at Deba
and then Lekeitio
. Drove to Bilbao
for dinner, through Gernika
. Drove to Elgoibar
for the night.
Drove towards San Sebastian
, did a stop at Pamplona
and then ended up at Zaragoza
.
Drove towards Barcelona
, went to Sonar festival.
Went for swimming to Platja de Gava
. Back to Barcelona for the Sonar festival.
Went to Sonar festival and then drove towards Valencia
.
Stayed at Valencia. Saw many parts of the city. Went to the "City of Arts and Science" and visited the Oceanograffic.
Went for swimming at Villajoyosa
after a quick stops at Benidorm
. Stopped at Alicante
and then drove towards Cartagena
.
Went for swimming at Playa de Percheles
. Did a stop at Velez-Rubio
for lunch. Did a stop at Granada
visited Alhambra and parts of the town. Drove towards Malaga
for the night.
Did a quick pass through Torremolinos
and then drove towards Seville
.
Drove to Faro
, went for a boat trip to Ria Formosa
. Drove to Lagos
, and went for swimming at Praia Dona Ana
. Drove to Meia Praia
for swimming and stayed there for the night.
Drove to Odeceixe
, went for swimming at Praia de Odeceixe-Mar
and Seixe river
. Drove to Vila Nova de Milfontes
, after a quick stop at Praia das Furnas
, went for swimming at Praia da Franquia
and Mira river
. Drove towards Lisbon
through the Vasco da Gama bridge.
Stayed at Lisbon. In the afternoon drove towards Porto airport. Did a stop at Aveiro
and a boat trip to the canals. Reached airport at night and flew back to Athens.
]]>
Η κανονικότητα είναι μια στρέβλωση τόσο παλιά, τόσο εδραιωμένη, που θέλει αρκετό κόπο για να την πετάξεις από πάνω σου.
Αντικανονικότητα (ή έστω αντίδραση στην κανονικότητα) δεν σημαίνει απαραίτητα να πράττεις και να συμπεριφέρεσαι διαφορετικά από το αναμενόμενο. Σημαίνει να μην αποδέχεσαι τίποτα ως αναμενόμενο, ή μάλλον να αναμένεις τα πάντα. Να μην περιμένεις, να μην δικαιολογείς, να μην αδικείς.
Αν υπάρχει κανονικότητα, είναι αυτή η ισοπεδωτική δύναμη που επιβάλει την ομοιομορφία, που καταπιέζει τις αποκλίσεις, που δεν ανέχεται την διαφορετικότητα, και που τελικά ο μόνος τρόπος που μπορεί να επιβληθεί είναι βίαιος. Αλλά με μια υποχθόνια ορμή, που δεν αφήνει πάντα εμφανή τα σημάδια της στο σώμα, που δεν αφήνει τίποτα απρόσμενο στο πέρασμα της.
Στην ροή της ζωής όλα είναι απρόσμενα, πολύμορφα, πολύχρωμα, διαφορετικά. Όλα είναι κανονικά, γιατί τίποτα δεν είναι.
“Ο κόσμος που ποθούμε είναι πιο αληθινός από τον κόσμο που αποδεχόμαστε παθητικά.” ~ lost bodies
(όπως δημοσιεύτηκε στο 38ο τεύχος του fanzine chimeres)
]]>Το Ευρωπαικό Κοινοβούλιο ετοιμάζει να ψηφίσει το τελικό κείμενο για την οδηγία "Πνευματικής Ιδιοκτησίας". Μέσα σε αυτή την οδηγία υπάρχουν δύο άρθρα που αν εγκριθούν θα αλλάξουν δραματικά τον χαρακτήρα του Internet. Προς το χειρότερο. Θα αλλάξει όχι μόνο ο τρόπος με το οποίο οι άνθρωποι το χρησιμοποιούν ως πλατφόρμα έκφρασης λόγου, αλλά θα επηρεάσεις αρνητικά ακόμα και τους ίδιους τους δημιουργούς, που υποτίθεται προσπαθεί να προστατέψει.
Παρακάτω είναι μια συνοπτική περίληψη των καταστροφικών συνεπειών, που θα γίνουν πραγματικότητα αν το Ευρωπαικό Κοινοβούλιο υπερψηφίσει την οδηγία.
Ενημέρωσε τους ευρωβουλευτές. Πολλοί εξ αυτών θα υπερψηφίσουν είτε από άγνοια είτε από κακή πληροφόρηση. Επισκέψου το saveyourinternet, όπου υπάρχουν σχετικά στοιχεία επικοινωνίας. Με κόκκινο χρώμα είναι οι ευρωβουλευτές που έχουν ταχθεί υπέρ της οδηγίας στο παρελθόν.
Βοήθησε να ενημερωθούν καλύτερα για τους κινδύνους της οδηγίας. Αν σε βοηθάει στην επικοινωνία, μπορείς να χρησιμοποιήσεις όσα αποσπάσματα επιθυμείς απ' το παρόν κείμενο είτε ακόμα και ολόκληρο το κείμενο.
Το παρόν κείμενο είναι μια απόπειρα καταγραφής τεχνικών μεθόδων και εργαλείων παράκαμψης της λογοκρισίας που επιβάλλεται από διάφορες κρατικές επιτροπές και τις οποίες υποχρεώνονται να εφαρμόσουν οι ελληνικοί πάροχοι internet. Πριν από περίπου δύο χρόνια έγραψα ένα post για τον κίνδυνο να δημιουργηθεί μια επιτροπή λογοκρισίας στο όνομα της προάσπισης δικαιωμάτων πνευματική ιδιοκτησίας. Αυτό που τόνιζα τότε:
Αυτό που περιγράφει ο νόμος είναι τη σύσταση μια επιτροπής με την απόλυτη εξουσία και χωρίς να έχει προηγηθεί καμία δικαστική απόφαση να διατάσσει τους παρόχους να μπλοκάρουν ένα website από το ελληνικό internet.
Από τότε μέχρι σήμερα αυτό που μεσολάβησε είναι πως ο νόμος τελικά ψηφίστηκε με ελάχιστες τροποποιήσεις στα επίμαχα σημεία. Και οι όποιες τροποποιήσεις ήταν μάλλον προς το χειρότερο, καθώς η επιτροπή που συστάθηκε τελικώς έχει λιγότερα μέλη και μόνο με εκπροσώπους οργανισμών (ΟΠΙ, ΕΕΤΤ, ΑΠΔΠΧ), αντί για 5μελής και με συμμετοχή δικαστικών, όπως ήταν η αρχική πρόβλεψη. Η συγκεκριμένη επιτρόπή (ΕΔΠΠΙ), πρακτικά κινείται στα χνάρια της επιτροπής παιγνίων (ΕΕΠΠ), που λειτουργεί επίσης ως επιτροπή λογοκρισίας σε ένα διαφορετικό πεδίο.
Ένα ενδιαφέρον στοιχείο, που απ' όσο θυμάμαι, επίσης έλειπε απ' το υπό διαβούλευση νομοσχέδιο, είναι πως τα αιτήματα προς την επιτροπή κοστίζουν. Η ταρίφα είναι 372€ ανά domain. Αλλά όπως φαίνεται και στον παρακάτω τιμοκατάλογο, κάνουν καλύτερες τιμές αν το αίτημα περιλαμβάνει περισσότερα domains.
Μπορεί να μην συμφωνώ με τον τρόπο λειτουργίας και με την ουσία του τι κάνει αυτή η επιτροπή, αλλά έχει ενδιαφέρον πως προφανώς δεν απευθύνεται σε μεμονωμένους ανεξάρτητους καλλιτέχνες οι οποίοι πιθανόν να μην έχουν την πολυτέλεια να διαθέσουν τους σχετικούς πόρους. Τα ποσά αυτά είναι μάλλον ψίχουλα για οργανισμούς συλλογικής διαχείρισης, αλλά είναι ταυτόχρονα και απαγορευτικά για τους περισσότερους ανεξάρτητους καλλιτέχνες. Είναι αρκετά σαφές για ποιους, και από ποιους, σχεδιάστηκε να εξυπηρετήσει αυτό το νομοθέτημα.
Πριν από λίγες ημέρες η επιτροπή δημοσίευσε τις 3 πρώτες αποφάσεις της. Οι αποφάσεις ελήφθησαν κατόπιν αιτήματος της Εταιρίας Προστασίας Οπτικοακουστικών Έργων (Ε.Π.Ο.Ε.), που είναι οργανισμός συλλογικής προστασίας πνευματικών δικαιωμάτων, και περιλαμβάνει και μερικά γνωστά ονόματα απ' τον χώρο του κινηματογράφου (Odeon, Seven, Feelgood, Ελληνικό Κέντρο Κινηματογράφου). Η τρίτη κατά σειρά απόφαση, που συγκέντρωσε και τη μεγαλύτερη δημοσιότητα παραθέτει αρκετά domain names (38) και διατάσσει τους παρόχους internet να διακόψουν τη πρόσβαση σε αυτούς εντός 48 ωρών.
Η αφορμή γι αυτό το κείμενο ήταν να αναφέρω συνοπτικά κάποιες απλές τεχνικές λύσεις.
Έχω αναφέρει ξανά πως παρόλο που το ζήτημα είναι επί της ουσίας πολιτικό, αυτό δεν σημαίνει πως δεν θα αξιοποιήσουμε τα τεχνολογικά μέσα που έχουμε στη διάθεση μας παράλληλα με την όποια πολιτική δράση.
Ο πιο απλός τρόπος να παρακάμψουμε τους μηχανισμούς μπλοκαρίσματος websites χωρίς να κάνουμε πολλές ρυθμίσεις ή αλλαγές στον υπολογιστή μας είναι να χρησιμοποιήσουμε τον Tor Browser. Είναι ένας τροποποιημένος Firefox με τον οποίο μπορούμε να περιηγηθούμε κανονικά στο διαδίκτυο, αξιοποιώντας το δίκτυο Tor. Με αυτό τον τρόπο, παρόλο που προφανώς εξακολουθούμε να χρησιμοποιούμε τμήματα της υποδομής του παρόχου μας, παρακάμπτουμε κάποια (πχ. dns) που χρησιμοποιούνται για να μπλοκάρουν συγκεκριμένο traffic.
Ως bonus, κερδίζουμε και όλα τα οφέλη της ανώνυμης περιήγησης που προσφέρει το Tor δίκτυο. Αν θες να μάθεις περισσότερα γι αυτό, κι επειδή κυκλοφορεί αρκετή παραφιλολογία στα ελληνικά media περί dark web, δες την ομιλία του kargig.
Δεδομένου πως οι εντολές λογοκρισίας αφορούν συγκεκριμένα domains, ο τρόπος με τον οποίο μπλοκάρονται απ' τους παρόχους είναι μέσω DNS. Χωρίς να μπλέξουμε με πολλές τεχνικές λεπτομέρειες, το DNS είναι ο τρόπος με τον οποίο ο browser ή ο υπολογιστής μας λαμβάνουν την πληροφορία για το ποια IP διεύθυνση αντιστοιχεί σε ποιο domain, ώστε να μπορέσουμε να το επισκεφτούμε.
Το router του παρόχου που έχουμε στο σπίτι μας έχει προρυθμισμένους τους DNS servers του παρόχου, οπότε βασιζόμαστε σε αυτόν να μας δώσει αυτή την πληροφορία. Είναι συνεπώς πολύ απλό να μας δώσει μια λάθος πληροφορία ώστε να μας αποτρέψει να μπούμε σε ένα website.
Ο τεχνικός τρόπος παράκαμψης είναι πολύ απλά να αλλάξουμε τους DNS servers που χρησιμοποιούμε και να επιλέξουμε κάποιους που δεν λογοκρίνουν. Και υπάρχουν πολλοί τρόποι να το κάνουμε αυτό ανάλογα με το τι μας βολεύει περισσότερο.
Ο πιο απλός τρόπος είναι να το κάνουμε στον browser μας. Ο Firefox, απ' την τελευταία έκδοση (63) και μετά, μας δίνει τη δυνατότητα να χρησιμοποιήσουμε μια σχετικά καινούρια τεχνολογία (DNS over HTTPS), με την οποία κρυπτογραφείται το dns traffic. Επειδή είναι ακόμα υπό δοκιμή θα πρέπει να την ενεργοποιήσουμε χειροκίνητα με 4 απλά βήματα:
about:config
trr
.network.trr.mode
κάνουμε διπλό κλικ στην τιμή (που μάλλον είναι 0
) και την αλλάζουμε σε 2
.network.trr.uri
έχει το σχετικό url από Mozilla: https://mozilla.cloudflare-dns.com/dns-query
.Με αυτό τον τρόπο ο Firefox θα χρησιμοποιεί την αντίστοιχη υπηρεσία της Cloudflare, αλλά μπορείς να αλλάξεις το url για να χρησιμοποιήσεις όποιον άλλο πάροχο που εμπιστεύεσαι και ξέρεις πως υποστηρίζει τη συγκεκριμένη τεχνολογία. Περισσότερα τεχνικές λεπτομέρειες στο σχετικό blog post από Mozilla.
Μία ακόμα λύση είναι να αλλάξεις DNS servers κατευθείαν στο router σου. Τα περισσότερα καινούρια router υποστηρίζουν κάτι τέτοιο. Αυτό είναι βολικό στην περίπτωση που θέλουμε να χρησιμοποιήσουμε εναλλακτικούς DNS παρόχους σε πολλές συσκευές στο σπίτι μας.
Αν δεν έχεις μπει ποτέ στο διαχειριστικό περιβάλλον του router σου είναι μια καλή ευκαιρία να μάθεις πως να μπαίνεις και να αλλάξεις και τους default κωδικούς πρόσβασης. Για να μπεις πρέπει να γράψεις την IP διεύθυνση του router σου στον browser σου, που συνήθως είναι 192.168.1.1
ή 192.168.0.1
. Θα σου ζητήσει τα στοιχεία εισόδου. Αν δεν τα έχεις αλλάξει, θα αναγράφονται στο κάτω μέρος του router.
Αφού μπεις ψάξε για τη σχετική ρύθμιση. Συνήθως στις ρυθμίσεις LAN. Για παράδειγμα, η προκαθορισμένη επιλογή στο router μου είναι "ISP DNS" και βρίσκεται στο τμήμα "DHCP Server". Αν λοιπόν αλλάξουμε αυτή τη ρύθμιση μπορούμε να δώσουμε IP διευθύνσεις κάποιας τρίτης υπηρεσίας. Πχ. μπορούμε να χρησιμοποιήσουμε την Cloudflare (1.1.1.1
) ή OpenNIC. Προσωπικά θα απέφευγα να χρησιμοποιήσω παρόχους που γενικώς δεν σέβονται την ιδιωτικότητα των χρηστών τους σε υπηρεσίες και προϊόντα τους, αλλά δυστυχώς είναι οι συνήθεις προτάσεις σε διάφορα forums (Google, OpenDNS). Αλλά η επιλογή είναι προσωπική, καθώς ενέχει ένα επίπεδο εμπιστοσύνης.
Μπορείς να αλλάξεις DNS πάροχο και σε επίπεδο λειτουργικό σύστημα. Οι ρυθμίσεις ποικίλουν ανάλογα την έκδοση και το είδος του λειτουργικού συστήματος που χρησιμοποιείς, αλλά συνήθως ο άμεσος τρόπος είναι στις ρυθμίσεις της ασύρματης ή ενσύρματης σύνδεσης που χρησιμοποιούμε.
Η ελευθερία λόγου στο διαδίκτυο είναι το ίδιο σημαντική με την ελευθερία λόγου στην offline ζωή μας. Ο "ψηφιακός κόσμος" είναι εξίσου πραγματικός με τον φυσικό. Όταν ζεις σε μια χώρα που χρησιμοποιεί μηχανισμούς λογοκρισίας στο διαδίκτυο, τότε ζεις σε μια καταπιεστική κοινωνία. Δεν υπάρχει κάποιος διαχωρισμός ανάμεσα σε αυτά τα δύο.
Το διακύβευμα στη συγκεκριμένη περίπτωση είναι πολύ απλό. Ποιο δικαίωμα είναι πιο σημαντικό; Η ελευθερία λόγου ή το οικονομικό συμφέρον ενός καλλιτέχνη; Δεδομένου πως μιλάμε για επιτροπές οι οποίες αποφασίζουν χωρίς καμία δικαστική ή οποιαδήποτε άλλη λογοδοσία, μπορούμε να καταλάβουμε πως απαντάει σε αυτό το ερώτημα η πολιτική εξουσία.
Το θέμα των πνευματικών δικαιωμάτων και του βιοπορισμού των καλλιτεχνών είναι αρκετά σημαντικό, αλλά δεν πρόκειται να λυθεί με προχειρότητα και υιοθετώντας αυταρχικές μεθόδους με επιτροπές που λειτουργούν πέρα από οποιαδήποτε διαδικασία ερμηνείας και επιβολής του νόμου. Μέθοδοι, που όπως φαίνεται κι απ' τα παραπάνω, δεν έχουν καν την απαιτούμενη αποτελεσματικότητα.
Μάθε πως μπορείς να χρησιμοποιήσεις την τεχνολογία για να παρακάμψεις τη λογοκρισία ή/και να διατηρήσεις την ανωνυμία σου. Γίνονται συχνά συναντήσεις και workshops γύρω απ' αυτά τα θέματα. Αν συμμετέχεις σε κάποια κοινότητα ή οργανισμό θα χαρούμε να οργανώσουμε κι εκεί κάποιο workshop.
Το μπλοκάρισμα των sites που αναφέρονται στην απόφαση έχει ήδη ξεκινήσει. Άλλωστε είχαν μόνο 48 ώρες για να συμμορφωθούν οι πάροχοι.
Ως παράδειγμα ένας dns server της Cosmote:
dig +short @195.170.0.1 gamatotv.me
83.235.64.18
Αν αναρωτιέσαι τι είναι αυτή η IP που επιστρέφει:
dig +short -x 83.235.64.18
edppi.otenet.gr.
Οπότε η επιτροπή έχει και την τεχνική δυνατότητα αν το επιθυμεί να καταγράφει τις IP διευθύνσεις των χρηστών που προσπαθούν να μπουν στα συγκεκριμένα websites.
Ας δοκιμάσουμε να ρωτήσουμε την Cloudflare:
dig +short @1.1.1.1 gamatotv.me
104.27.172.177
104.27.173.177
You already do regular offline backups right? If not, pause reading. Go buy an external drive, encrypt it with LUKS and backup your files. Now, welcome back.
I wanted a way to backup my (important) files on the cloud someone else's computer. I have two main reasons for that. First of all, I want to have a backup outside the premises of my home. Sometimes accidents happen, or someone could just break in or raid my place and take my backups. Of course these are encrypted but I'd have lost access to my files. Another reason is that I want to be able to access my files from any device (not necessarily mine) and from anywhere in the world.
In this example I'm using Dropbox as an example of cloud storage. You can replace Dropbox with almost any commercial or not cloud storage service out there, your self-hosted VPS, etc. I chose Dropbox for this example for its simplicity and popularity, but also to emphasize one more aspect. If you trust encryption, which happens at your end, then you don't need to trust the storage provider. At least not in terms of security. You would still need to trust the reliability of whatever endpoint you choose. Dropbox in that scenario is as good as your self-hosted server.
The basic ingredients are Duplicity and GnuPG. I'll insert here the backup script and then I'll explain in detail how this works and what things you need to customize.
#!/usr/bin/env bash
set -e
# Dropbox configuration variables
DROPBOX_FOLDER="mybackup"
export DPBX_ACCESS_TOKEN=""
export PASSPHRASE=""
# Folders to backup
MY_PRECIOUS="/precious"
SECRET_DATA="/data/secret"
# Remove files older than 60 days from Dropbox
duplicity remove-older-than 60D --force dpbx://${DROPBOX_FOLDER}
# Sync everything to Dropbox
duplicity --include=${MY_PRECIOUS} --include=${SECRET_DATA} --exclude='**' / dpbx://${DROPBOX_FOLDER}
# Cleanup failures
duplicity cleanup --force dpbx://${DROPBOX_FOLDER}
unset DPBX_ACCESS_TOKEN
unset PASSPHRASE
Duplicity has a very simple interface that can be summarized with this line:
duplicity [source] [destination]
You can provide one source and one destination, but you can use the --include
and --exclude
options to customize things. One important thing to remember is that the more left is such an option the bigger precedence it has. Here is our main backup line:
duplicity --include=${MY_PRECIOUS} --include=${SECRET_DATA} --exclude='**' / dpbx://${DROPBOX_FOLDER}
So reading this line from right to left can help you better understand what it actually does. We instruct Duplicity that our destination is a Dropbox folder. We want to back everything (/
), but then we exclude everything ('**'
) and include only the two folders we want in this case. A simpler example would be to backup our home directory and exclude specific folders. That would look like this:
duplicity --exclude=${NOT_THIS_FOLDER} --exclude=${TMP_FOLDER} /home/myuser dpbx://${DROPBOX_FOLDER}
Anything that starts with a $
sign is a variable, so we set everything in the beginning of the script and unset the sensitive things at the end.
Duplicity has certain name conventions for things. So DPBX_ACCESS_TOKEN
is the Dropbox token (see below) and PASSPHRASE
is the encryption key. It will use GPG to do the encryption and since we provide a passphrase and not a key fingerprint it will use symmetric encryption. You can of course use your PGP key if you want, but as I already mentioned I want to be able to fetch and decrypt the backup from anywhere. That means that I may not have access to my PGP key.
The nice thing about this workflow is that you don't need to run any Dropbox related code to your machine. All you need is go to Dropbox developers portal and create a new app. Choose to create an "App folder" kind of app and pick a name, as shown in the screenshot below.
On the next screen all you need to do is generate an access token. It's the string you need to use on the DPBX_ACCESS_TOKEN
variable of your backup script. And that's it!
Duplicity does incremental backups, so you can just cron the script to run daily, weekly or whatever fits your needs. For instance you can do a symbolic link to your /etc/cron.daily
or if you prefer hipster modern tools you can use systemd timer.
Let it run a few times and then try to restore your files. Backups that don't restore properly are useless. You can selectively restore specific files, but I'll let that to you as homework. To restore everything:
#!/usr/bin/env bash
set -e
# Dropbox configuration variables
RESTORE_FOLDER="mybackup"
export DPBX_ACCESS_TOKEN=""
export PASSPHRASE=""
# Restore
duplicity dpbx://${DROPBOX_FOLDER} ${RESTORE_FOLDER}
unset DPBX_ACCESS_TOKEN
unset PASSPHRASE