Projet

Général

Profil

OperationMutualisationIpv4 » Historique » Version 9

Mehdi Abaakouk, 01/12/2013 22:50

1 1 Mehdi Abaakouk
h1. Projet de mutualisation ipv4 chez tetaneutral:
2 1 Mehdi Abaakouk
3 1 Mehdi Abaakouk
h2. chiliproject:
4 1 Mehdi Abaakouk
5 4 Mehdi Abaakouk
h3. config réseau:
6 4 Mehdi Abaakouk
7 1 Mehdi Abaakouk
dans /etc/network/interfaces, suppresion ipv4, changement ipv6 pour 2a01:6600:8081:ce02::1/64
8 1 Mehdi Abaakouk
9 4 Mehdi Abaakouk
h3. Reverse proxy http v4 vers le http de chiliproject en v6, sur www.tetaneutral.net
10 3 Mehdi Abaakouk
11 4 Mehdi Abaakouk
ajout de /etc/apache2/sites-available/chiliproject.tetaneutral.net:
12 3 Mehdi Abaakouk
13 1 Mehdi Abaakouk
<pre>
14 1 Mehdi Abaakouk
<VirtualHost *:80>
15 1 Mehdi Abaakouk
        ServerAdmin webmaster@localhost
16 1 Mehdi Abaakouk
        ServerName chiliproject.tetaneutral.net
17 1 Mehdi Abaakouk
        ProxyPreserveHost On
18 1 Mehdi Abaakouk
        ProxyRequests off
19 5 Mehdi Abaakouk
        ProxyPass / http://chiliproject6.tetaneutral.net/
20 5 Mehdi Abaakouk
        ProxyPassReverse / http://chiliproject6.tetaneutral.net/
21 1 Mehdi Abaakouk
        CustomLog /var/log/apache2/chiliproject.tetaneutral.net-access.log combined
22 1 Mehdi Abaakouk
</VirtualHost>
23 1 Mehdi Abaakouk
</pre>
24 3 Mehdi Abaakouk
25 4 Mehdi Abaakouk
taper
26 3 Mehdi Abaakouk
27 2 Mehdi Abaakouk
<pre>
28 1 Mehdi Abaakouk
a2enmod proxy_html proxy
29 1 Mehdi Abaakouk
a2ensite chiliproject.tetaneutral.net
30 1 Mehdi Abaakouk
/etc/init.d/apache2 reload
31 1 Mehdi Abaakouk
</pre>
32 1 Mehdi Abaakouk
33 4 Mehdi Abaakouk
h3. Configuration du relay  sur lists
34 1 Mehdi Abaakouk
35 5 Mehdi Abaakouk
Ajout d'un relay smtp ipv4 vers ipv6 (relay_domain), dans /etc/postfix/main.cf
36 3 Mehdi Abaakouk
37 1 Mehdi Abaakouk
<pre>
38 1 Mehdi Abaakouk
relay_domains = lists.tetaneutral.net, chiliproject.tetaneutral.net
39 1 Mehdi Abaakouk
</pre>
40 1 Mehdi Abaakouk
41 5 Mehdi Abaakouk
Ajout d'un transport pour ce domain /etc/postfix/transport
42 5 Mehdi Abaakouk
43 1 Mehdi Abaakouk
<pre>
44 5 Mehdi Abaakouk
chiliproject.tetaneutral.net smtp:[chiliproject6.tetaneutral.net]:25
45 1 Mehdi Abaakouk
</pre>
46 1 Mehdi Abaakouk
47 5 Mehdi Abaakouk
Reload de postfix
48 1 Mehdi Abaakouk
49 1 Mehdi Abaakouk
<pre>
50 1 Mehdi Abaakouk
postmap /etc/postfix/transport ; /etc/init.d/postfix reload
51 1 Mehdi Abaakouk
</pre>
52 5 Mehdi Abaakouk
53 6 Mehdi Abaakouk
54 6 Mehdi Abaakouk
h3. utiliser lists comme relay smtp pour chiliproject:
55 6 Mehdi Abaakouk
56 6 Mehdi Abaakouk
sur chiliproject, dans /etc/postfix/main.cf
57 6 Mehdi Abaakouk
58 6 Mehdi Abaakouk
<pre>
59 6 Mehdi Abaakouk
relayhost = smtp.tetaneutral.net
60 6 Mehdi Abaakouk
</pre>
61 6 Mehdi Abaakouk
62 5 Mehdi Abaakouk
h3. relay git(ssh)
63 5 Mehdi Abaakouk
64 5 Mehdi Abaakouk
sur www, ajouter dans le /etc/rc.local
65 5 Mehdi Abaakouk
66 7 Mehdi Abaakouk
<pre>
67 1 Mehdi Abaakouk
nohup socat TCP4-LISTEN:22,fork,su=nobody TCP6:[chiliproject6.tetaneutral.net]:22 &
68 7 Mehdi Abaakouk
</pre>
69 6 Mehdi Abaakouk
70 8 Mehdi Abaakouk
h3. mettre l'ipv4 du client de www dans les logs apache de chiliproject
71 8 Mehdi Abaakouk
72 8 Mehdi Abaakouk
sur chiliproject dans /etc/apache2/conf.d/forwarder
73 8 Mehdi Abaakouk
74 8 Mehdi Abaakouk
<pre>
75 8 Mehdi Abaakouk
LogFormat "%v:%p %h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
76 8 Mehdi Abaakouk
LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
77 8 Mehdi Abaakouk
LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %O" common
78 8 Mehdi Abaakouk
</pre>
79 8 Mehdi Abaakouk
80 8 Mehdi Abaakouk
c'est le format de log apache par défault avec le header X-Forwarded-For entre parenthese
81 8 Mehdi Abaakouk
82 8 Mehdi Abaakouk
le header X-Forwarded-For est un header ajouter par www en mode reverse proxy pour informer le server web suivant de la vrai ip du client
83 8 Mehdi Abaakouk
84 8 Mehdi Abaakouk
85 6 Mehdi Abaakouk
h3. mise à jour du DNS:
86 6 Mehdi Abaakouk
87 6 Mehdi Abaakouk
L'enregistrement A pointe vers la machine qui sert de relay (www, lists)
88 6 Mehdi Abaakouk
et l'enregistrement AAAA pointe vers la machine chiliproject
89 6 Mehdi Abaakouk
90 6 Mehdi Abaakouk
<pre>
91 6 Mehdi Abaakouk
chiliproject                IN  A      91.224.149.206 ; www
92 6 Mehdi Abaakouk
chiliproject                IN  AAAA   2a01:6600:8081:ce02::1
93 6 Mehdi Abaakouk
chiliproject4               IN  A      91.224.149.206 ; www
94 6 Mehdi Abaakouk
chiliproject6               IN  AAAA   2a01:6600:8081:ce02::1
95 6 Mehdi Abaakouk
96 6 Mehdi Abaakouk
chiliproject-mx             IN  A      91.224.149.207 ; lists
97 6 Mehdi Abaakouk
chiliproject-mx             IN  AAAA   2a01:6600:8081:ce02::1 ; lists                                                                                                                           
98 6 Mehdi Abaakouk
99 6 Mehdi Abaakouk
chiliproject                IN  MX 1   chiliproject-mx.tetaneutral.net.
100 6 Mehdi Abaakouk
</pre>
101 9 Mehdi Abaakouk
102 9 Mehdi Abaakouk
h2. Quelques notes additionnels
103 9 Mehdi Abaakouk
104 9 Mehdi Abaakouk
Ajout de "flags ipv6" pour /etc/xinetd.d/check_mk dans puppet pour avoir checkmk qui marche en ipv6 only
105 9 Mehdi Abaakouk
Mettre le tag 'ipv6_only' si besoin dans /etc/checkmk/main.mk pour les hosts qui n'ont plus de ipv4