icecast ssl https cloudflare

Configurer Icecast avec un certificat SSL et Cloudflare

Voici comment configurer un serveur Icecast pour utiliser un certificat SSL pour proposer des flux radio servis en HTTPS, le tout derrière Cloudflare.

Depuis que Strict Transport Security (HSTS) a été activé par défaut pour tous les sites hébergés sur le serveur, la page de Thunderstruck Radio ne s’affiche plus correctement car le serveur Icecast est encore servi en simple HTTP, donc sans certificat SSL.

Nous allons donc changer tout cela et sécuriser Icecast avec le certificat SSL de notre domaine, de manière à ce que les flux radio ainsi que le flux JSON soient servis en HTTPS.

Étape 1 : créer un sous-domaine au niveau DNS

Il vaut mieux séparer la radio de votre site principal, c’est beaucoup plus simple à gérer et évite les épineux problèmes de configuration.

J’opte pour ajouter le sous-domaine thunderstruck.skyminds.net avec un enregistrement DNS de type A dans Cloudflare:

thunderstruck.skyminds.net.	1	IN	A	xxx.xxx.xxx.xxx

On garde le sous-domaine en DNS seulement, nul besoin d’activer le cache (puisque c’est un flux).

Étape 2 : ouvrir le port 8443 dans le pare-feu

J’utilise Cloudflare donc nous avons quelques ports HTTPS ouverts par défaut qui peuvent être utilisés sans blocages :

# Ports HTTPS ouverts par défaut chez Cloudflare, sans support cache :

    443
    2053
    2083
    2087
    2096
    8443

Nous utilisons ufw donc la commande est très simple pour ouvrir le port 8443 :

ufw allow 8443/tcp comment "Icecast SSL"

Le serveur accepte désormais les connexions sur le port 8443 pour Icecast.

Étape 3 : configurer le sous-domaine sous NginX

Nous allons maintenant configurer notre sous-domaine et éditer le bloc serveur de notre domaine sous NginX:

nano /etc/nginx/sites-available/skyminds.conf

Et nous y ajoutons ce bloc:

# Thunderstruck.skyminds.net
server {
    listen       8443 ssl http2;
    listen  [::]:8443 ssl http2;

    server_name thunderstruck.skyminds.net;

    # Let's Encrypt
    ssl_certificate         /etc/nginx/ssl/skyminds.net/fullchain.pem;
    ssl_certificate_key     /etc/nginx/ssl/skyminds.net/privkey.pem;

    location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;
        proxy_pass              http://127.0.0.1:8443;
        proxy_read_timeout      90;
        proxy_redirect          off;
        proxy_buffering         off;
        tcp_nodelay             on;

	    # CSP headers
	    add_header Content-Security-Policy "media-src 'self' https://thunderstruck.skyminds.net:8443";
    }
}

Testez la configuration et rechargez nginx :

nginx -t

service nginx reload

Étape 4 : unifier le certificat SSL et sa clé privée

Icecast peut fonctionner avec un certificat SSL à partir de la version 2.4.4. Commencez donc par vérifier que cette version est à minima installée sur le serveur:

icecast2 -v

Ensuite, Icecast nécessite un fichier de certificat unique, qui est en fait une compilation du certificat et de sa clé privée.

Nous créons donc un fichier shell qui va contenir notre commande:

nano /home/scripts/icecast-ssl.sh

et dans lequel nous ajoutons notre commande cat :

#!/bin/bash
cat /etc/nginx/ssl/skyminds.net/fullchain.pem /etc/nginx/ssl/skyminds.net/privkey.pem > /etc/icecast2/bundle.pem

Vous pouvez exécuter le fichier de manière à générer le fichier bundle.pem:

bash /home/scripts/icecast-ssl.sh

On assigne maintenant les bons droits pour que le certificat soit lisible par icecast2:

chown icecast2:icecast /etc/icecast2/bundle.pem

Étape 5 : automatiser le renouvellement du certificat Icecast

J’utilise acme.sh pour la génération et le renouvellement automatique de tous les certificats du serveur donc il est très utile d’éditer la configuration du certificat pour que le script de génération du certificat pour SSL ait lieu automatiquement, juste après le renouvellement du certificat de notre domaine.

On édite donc la configuration acme.sh du domaine:

nano /root/.acme.sh/skyminds.net_ecc/skyminds.net.conf

Et nous éditons la directive Le_RenewHook avec le chemin de notre nouveau script shell :

Le_RenewHook='bash /home/scripts/icecast-ssl.sh && service icecast2 restart'

Sauvegardez les changements.

Lire la suite

linux ubuntu server unattended upgrade

Ubuntu : activer les mises à jour automatiques avec unattended-upgrade

La mise à niveau de votre serveur Ubuntu est une étape importante pour garantir que votre système est toujours à jour et sécurisé. Avec le paquet unattended-upgrade, vous pouvez facilement activer les mises à niveau sans avoir à vous soucier du redémarrage manuel ou des temps d’arrêt.

Comme son nom l’indique, le paquet unattended-upgrade permet de lancer les mises à jour automatiquement à intervalles réguliers, sans action de la part de l’administrateur. Vous pouvez donc planifier les mises à jour lorsque le trafic est faible, et l’outil est même capable de redémarrer le serveur si besoin.

Dans ce tutoriel, nous allons vous montrer comment installer et utiliser unattended-upgrade sous Ubuntu Server 22.04. Nous aborderons également les avantages de l’utilisation de cet outil et la manière dont il peut contribuer à garantir que votre système est toujours à jour.

Cela peut être également un très bon complément si vous avez déjà installé Ubuntu Pro avec le support étendu des mises à jour.

Installer unattended-upgrade

Pour commencer, vous devez d’abord installer unattended-upgrade sur votre serveur Ubuntu – ouvrez une fenêtre de terminal et entrez la commande suivante :

apt install unattended-upgrade

Une fois que unattended-upgrade est installé, on le paramètre:

dpkg-reconfigure -plow unattended-upgrades

Répondez “Yes” pour installer les mises à jour stable automatiquement.

Activez ensuite l’outil:

unattended-upgrade enable

Paramètrage d’unattended-upgrade

Le paquet est bien plus puissant qu’il n’y paraît. Personnellement, j’aime bien être informé des mises à jour et des changements sur le serveur, activons donc les notifications.

On édite notre fichier de configuration local (à créer si besoin). C’est le fichier qui ne sera pas écrasé si le paquet est mis à jour:

nano /etc/apt/apt.conf.d/52unattended-upgrades-local

Et en suivant la documentation, on demande la notification récapitulative des mises à jour, le redémarrage automatique si besoin, vers deux heures du matin pour ne pas gêner nos visiteurs:

// email to send notifications
Unattended-Upgrade::Mail "skyminds@example.com";
// automatic reboot at 2:00 AM
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "02:00";	

Lire la suite

climate change cli fi movies list

Cli-Fi movies: the ultimate list

Climate fiction, also known as cli-fi, is a genre of literature that explores the social, political, and environmental consequences of climate change and global warming. This relatively new genre has gained popularity in recent years as the urgency of the climate crisis has become increasingly apparent, and as people have become more concerned about the future of the planet. Cli-fi often imagines future worlds where the Earth has been affected by significant environmental changes, and how human societies might adapt to these changes.

One of the defining characteristics of cli-fi is its focus on environmental themes. This genre often explores the impacts of environmental degradation, species extinction, and resource scarcity on people and the world, as well as the interconnectedness of social, economic, and political systems with the natural world. Cli-fi can encompass a range of sub-genres, including science fiction, dystopian fiction, and post-apocalyptic fiction, and it can be set in a variety of settings, from cities to rural areas, from the poles to the tropics, and from the past to the future.

One of the main reasons why cli-fi has become such an important genre is that it serves as a cautionary tale, warning readers about the dangers of neglecting the environment and the need for immediate action to address these challenges. Many cli-fi works are dystopian in nature, imagining a future world where the effects of climate change have spiraled out of control, leading to environmental collapse and social upheaval. These works often highlight the urgent need for action, and serve as a powerful reminder of the consequences of inaction.

However, not all cli-fi is dystopian. There are also works of cli-fi that imagine more optimistic futures, in which people have taken bold action to mitigate the impacts of climate change and transition to a more sustainable way of life. These works are often less bleak than their dystopian counterparts, and provide a more hopeful vision of the future. By exploring alternative futures, they offer readers a chance to imagine a better world and to consider different paths forward.

Cli-fi is also an important genre because it provides a platform for exploring complex and interconnected environmental and social issues. By imagining the consequences of current actions and decisions, cli-fi helps to raise awareness about the challenges of climate change, and it provides a way for people to think about the future and their place in it. This genre is especially important for younger generations, who will be most affected by the impacts of climate change, as it provides them with a way to imagine their future, and to think about the world they want to create.

One of the key strengths of cli-fi is its ability to reach a broad audience. Cli-fi is a work of fiction, which makes it accessible to a wide range of readers, including those who might not be interested in more technical or scientific treatments of environmental issues. This genre also attracts the attention of activists and educators, who see it as a powerful tool for raising awareness and inspiring change. Cli-fi provides a way to bring environmental issues to life, and to make them real and relevant to people’s lives, and this makes it an important tool for engaging people in the climate crisis and inspiring them to take action.

Another important aspect of cli-fi is that it is rooted in scientific fact and reflects the latest understandings of the environmental and social impacts of climate change. This makes it a valuable tool for informing the public, and for inspiring people to think about the future in a new and more informed way.

Technologies such as climate engineering or climate adaptation practices often feature prominently in works exploring their impacts on society.

Climate fiction is distinct from petrofiction which deals directly with the petroleum culture and economy.

Although the term “climate fiction” only became used in the 2010s, climate change has been a topic of fiction since the 20th century, pioneered by authors such as J. G. Ballard and Octavia E. Butler. Prominent climate fiction authors include Margaret Atwood, Kim Stanley Robinson and Richard Powers.

1970s

Our Man Flint (1966)
No Blade of Grass (1970),
Soylent Green (1973)
Day of the Animals (1977)

1990s

FernGully (1992)
Split Second (1992)
The Fire Next Time (1993)

The American President (1995),
Waterworld (1995)
The Arrival (1996)
Twister (1996)

2000s – sorted by movie genre

Disaster Movies

Tornados

Twister (1996)
Storm Cell (2008)
NYC Tornado Terror (2008)
F4 Vortex (2010)
Christmas Twister (2012)
Seattle Superstorm (2012)
Into the Storm (2014)

Hurricanes – Torrential Rains

Split Second (1992)
The Fire Next Time (1993)
Category 6 (2004)
Category 7 (2005)
Flood (2007)
Beasts of Southern Wild (2012)
Hurricane Heist (2018)

Tech Failures – Hacks

The Storm (2009)
Category 8 (2013)
500 MPH Storm (2013)
Geostorm (2017)

Apocalypses

Flooded

Noah (2014)

Frozen

The Day After Tomorrow (2004)
Absolute Zero (2006)
Arctic Blast (2010)
Ice Age 2012 (2011)
Ice 2020 (2011)
100̊ Below Zero (2013)

Desiccated

Interstellar (2014)

Melting Tundra

Last Winter (2006)
The Thaw (2009)

Dystopias

Flooded Worlds

Waterworld (1995)
AI (2001)
Lost City Raiders (2008)

Frozen Worlds

Road (2009)
Colony (2013)
Snowpiercer (2014)

Desert Worlds

Rover (2014)
Young Ones (2014)
The Last Survivors (2014)
Mad Max: Fury Road (2015)

Psychological Dramas

Half-Life (2008)
Take Shelter (2011)
Future Weather (2012)
Beasts of Southern Wild (2012)
Night Moves (2013)
The East (2013)
Chloe & Theo (2015)
First Reformed (2017)
Mother (2017)
Parasite (2019)

Comedies

Sit/Rom Comedy

American President (1995)
A Glaring Emission (2011)
Long Shot (2019)
Satire Sharknado 2 (2014)
Downsizing (2017)

Animated Children’s Movies

FernGully (1992)
Ice Age: Meltdown (2006)
The Simpsons Movie (2007)
Cloudy with a Chance of Meatballs (2009)
Happy Feet 2 (2011)
Frozen II (2019)
Arctic Dogs (2019)

Aliens & Superheroes

Aliens discover a warming planet

Split Second (1992)
The Predator (2018)

Aliens promote a warning to create a hospitable planet

The Arrival (1996)
MFKZ (2018)

Aliens and/or Supervillains attack humans to stop global warming

The Day Earth Stood Still (2008)
Tomorrowland (2015)
Kingsman (2015)
Venom (2018)
Avengers: Infinity War (2018)
Avengers: Endgame (2019)
Godzilla: King of Monsters (2019)
Spiderman: Far from Home (2019)
Hobbs & Shaw (2019)

Are there any omissions? Feel free to recommend or add title suggestions in the comment section below!