Post

Yanspm Serveur Debian Stretch (VirtualBox "Debian9Yanspm")

Yanspm Serveur Debian Stretch (VirtualBox "Debian9Yanspm")

Yanspm Serveur Debian Stretch (VirtualBox "Debian9Yanspm")

TimeZone

Europe/Paris

1
dpkg-reconfigure tzdata

Locales

1
dpkg-reconfigure locales
1
2
3
Generating locales (this might take a while)...
  fr_FR.UTF-8... done
Generation complete.

Sudo

Installer sudo et modifier /etc/sudoers pour accès sans mot de passe à l’utilisateur stret

1
2
apt install sudo
echo "stret     ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

IPV6

Adresse inet6 locale “shuttle” : fe80:::::f22b/64 scope link
Depuis Freebox OS 2.0, la configuration IPv6 permet de configurer des “next hops” pour 8 prefixes /64 (Autrement dit, chaque abonné Freebox dispose d’un /61).
Modifier la configuration IPV6 de la freebox
Adresse IPV6 lien local : fe80:::::aa20 Délégation de prefixe
Attention si vous configurez un Next Hop pour le premier subnet, il ne sera plus annoncé par la Freebox sur votre réseau
Prefixe : 2a01:::b270::/64
Next hop : Prefixe : 2a01:::b271::/64
Next hop : fe80:::::f22b

Configurer le réseau IPV6 /etc/network/interfaces ,ajouter

1
2
3
4
5
6
7
# This is an autoconfigured IPv6 interface
#iface eth0 inet6 auto
#delegation  
iface eth0 inet6 static
  address 2a01:e34:ee6a:b273::1
  netmask 64
  post-up ip -6 route add default via fe80::224:d4ff:fea6:aa20 dev eth0

Nginx+Php7

Alternative A: Accès direct

DNS OVH xoyize.xyz

1
2
3
4
5
6
7
8
$TTL 3600
@	IN SOA dns106.ovh.net. tech.ovh.net. (2018032706 86400 3600 3600000 300)
         3600 IN NS     ns106.ovh.net.
         3600 IN NS     dns106.ovh.net.
         3600 IN MX 10  xoyize.xyz.
         3600 IN AAAA   2a01:e34:ee6a:b273::1
         3600 IN TXT    "v=spf1 include:xoyize.xyz ?all"
_dmarc   3600 IN TXT    "v=DMARC1; p=reject;"

Pour un accès direct , on ouvre un port 8080 dans le serveur yunohost yanspm

1
sudo yunohost firewall allow -6 TCP 8080

On modifie le port dans le fichier nginx **/etc/nginx/conf.d/default.conf **

1
2
3
4
server {
    listen 8080;
    listen [::]:8080;
...

Accès http://[2a01:e34:ee6a:b273::1]:8080 ou http://xoyize.xyz:8080

Alternative B: Accès via yanspm

DNS OVH xoyize.xyz

1
2
3
4
5
6
$TTL 3600
@	IN SOA dns106.ovh.net. tech.ovh.net. (2018032706 86400 3600 3600000 300)
        3600 IN NS     ns106.ovh.net.
        3600 IN NS     dns106.ovh.net.
	IN A      78.230.171.39
	IN AAAA   2a01:e34:ee6a:b271::1

Administration:

  • ajouter le domaine xoyize.xyz
  • certificats letsencrypt

Certificats SSL letsencrypt (acme)

SSL Letsencrypt

Installer acme

1
2
3
4
5
6
7
8
cd ~
sudo -s  # en mode super utilisateur
apt install netcat -y  # prérequis
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install # --nocron
cd ..
rm -rf acme.sh/

Ajouter les variables pour l’accès api OVH

1
2
export OVH_AK="Lj45UFRTDESDnnh5"
export OVH_AS="J582RTDESDnnh5rhDE89ZFSxng58aKL"

Génération des certificats

1
/root/.acme.sh/acme.sh --dns dns_ovh --issue --keylength 4096 -d xoyize.xyz -d webmail.xoyize.xyz -d nc.xoyize.xyz -d gitlab.xoyize.xyz

Il faut s’identifier chez OVH , un lien est fourni dans le résultat Please open this link to do authentication: https://eu.api.ovh.com/auth/?credentialToken=kdfyjvuioiogg265bhbgdfbghh
Sélectionner validity : unlimited et login , vous obtiendrez le message suivant OVH authentication Success ! .
Il faut relancer la commande et patienter quelques minutes…

1
/root/.acme.sh/acme.sh --dns dns_ovh --issue --keylength 4096 -d xoyize.xyz -d webmail.xoyize.xyz -d nc.xoyize.xyz -d gitlab.xoyize.xyz

Certificats

1
2
3
4
5
...
[dimanche 18 mars 2018, 20:34:53 (UTC+0100)] Your cert is in  /root/.acme.sh/xoyize.xyz/xoyize.xyz.cer 
[dimanche 18 mars 2018, 20:34:53 (UTC+0100)] Your cert key is in  /root/.acme.sh/xoyize.xyz/xoyize.xyz.key 
[dimanche 18 mars 2018, 20:34:53 (UTC+0100)] The intermediate CA cert is in  /root/.acme.sh/xoyize.xyz/ca.cer 
[dimanche 18 mars 2018, 20:34:53 (UTC+0100)] And the full chain certs is there:  /root/.acme.sh/xoyize.xyz/fullchain.cer 
Cet article est sous licence CC BY 4.0 par l'auteur.