AtelierTunnelDepartFibre » Historique » Version 2
Matthieu Herrb, 12/06/2017 16:02
infos
1 | 1 | Matthieu Herrb | h1. AtelierTunnelDepartFibre |
---|---|---|---|
2 | 1 | Matthieu Herrb | |
3 | 1 | Matthieu Herrb | 12/6/2017 |
4 | 1 | Matthieu Herrb | |
5 | 1 | Matthieu Herrb | pad: https://pad.tetaneutral.net/p/departFibre |
6 | 2 | Matthieu Herrb | |
7 | 2 | Matthieu Herrb | h2. Principe / archi |
8 | 2 | Matthieu Herrb | |
9 | 2 | Matthieu Herrb | * Figure archi |
10 | 2 | Matthieu Herrb | * Routage |
11 | 2 | Matthieu Herrb | |
12 | 2 | Matthieu Herrb | h2. Configuration |
13 | 2 | Matthieu Herrb | |
14 | 2 | Matthieu Herrb | h3. Allocations |
15 | 2 | Matthieu Herrb | |
16 | 2 | Matthieu Herrb | http://wiki.tetaneutral.net/index.php/Architecture#tunnel |
17 | 2 | Matthieu Herrb | |
18 | 2 | Matthieu Herrb | * nom tunnel (3 lettres) ttt |
19 | 2 | Matthieu Herrb | |
20 | 2 | Matthieu Herrb | * port pour openvpn <p> |
21 | 2 | Matthieu Herrb | |
22 | 2 | Matthieu Herrb | * adresses IP |
23 | 2 | Matthieu Herrb | |
24 | 2 | Matthieu Herrb | * 10.0.X.0/24 -> VPN |
25 | 2 | Matthieu Herrb | * 172.31.X.0/24 -> L2 antennes + routeur VPN |
26 | 2 | Matthieu Herrb | * 91.224.148.0/23, 89.234.156.0/23 -> IP publiques TTNN |
27 | 2 | Matthieu Herrb | * 91.224.148.0/32, 89.234.156.0/32 -> IP route par défaut TTNN |
28 | 2 | Matthieu Herrb | * a.b.c.d -> IP publique BOX |
29 | 2 | Matthieu Herrb | |
30 | 2 | Matthieu Herrb | <pre><p> tunttt atelier 10.0.X.1/24 172.31.X.0/24 20170612-</pre> |
31 | 2 | Matthieu Herrb | |
32 | 2 | Matthieu Herrb | h3. h7 |
33 | 2 | Matthieu Herrb | |
34 | 2 | Matthieu Herrb | <pre> |
35 | 2 | Matthieu Herrb | # tunmin tunnel mherrb 3 bd minimes |
36 | 2 | Matthieu Herrb | openvpn --mktun --dev-type tun --dev tunmin |
37 | 2 | Matthieu Herrb | ip link set tunmin up |
38 | 2 | Matthieu Herrb | openvpn --dev tunmin --dev-type tun --cipher none --persist-tun --auth none --port <p> --verb 3 --proto udp --local 91.224.148.1 --daemon --log-append /root/vpn/<p>.log --keepalive 10 60 --fragment 1400 --mssfix |
39 | 2 | Matthieu Herrb | ip addr add 10.0.3.1/24 dev tunmin |
40 | 2 | Matthieu Herrb | ip route add 172.31.3.0/24 dev tunmin |
41 | 2 | Matthieu Herrb | </pre> |
42 | 2 | Matthieu Herrb | |
43 | 2 | Matthieu Herrb | h3. sur le routeur |
44 | 2 | Matthieu Herrb | |
45 | 2 | Matthieu Herrb | * Version TP-Link: |
46 | 2 | Matthieu Herrb | https://chiliproject.tetaneutral.net/projects/tetaneutral/wiki/AtelierCanal2013 |
47 | 2 | Matthieu Herrb | |
48 | 2 | Matthieu Herrb | * Version shuttle: |
49 | 2 | Matthieu Herrb | @/etc/rc.local@ : |
50 | 2 | Matthieu Herrb | |
51 | 2 | Matthieu Herrb | <pre> |
52 | 2 | Matthieu Herrb | echo 1 > /proc/sys/net/ipv4/ip_forward |
53 | 2 | Matthieu Herrb | for i in /proc/sys/net/ipv6/conf/*; do for j in autoconf accept_ra; do echo 0 > $i/$j; done;done |
54 | 2 | Matthieu Herrb | echo 1 > /proc/sys/net/ipv6/conf/all/forwarding |
55 | 2 | Matthieu Herrb | |
56 | 2 | Matthieu Herrb | ip link set eth1 up |
57 | 2 | Matthieu Herrb | ip addr add 172.31.3.1/24 dev eth1 |
58 | 2 | Matthieu Herrb | ip route add 172.31.3.0/24 dev eth1 table 25 |
59 | 2 | Matthieu Herrb | |
60 | 2 | Matthieu Herrb | openvpn --mktun --dev-type tun --dev tunmin |
61 | 2 | Matthieu Herrb | ip link set tunmin up |
62 | 2 | Matthieu Herrb | nice -n -20 openvpn --dev tunmin --dev-type tun --cipher none --auth none --remote 91.224.148.1 65131 --verb 3 --proto udp --daemon --log-append /root/vpn-65131.log --keepalive 10 60 --fragment 1400 -mssfix |
63 | 2 | Matthieu Herrb | ip addr add 10.0.3.2/24 dev tunmin |
64 | 2 | Matthieu Herrb | |
65 | 2 | Matthieu Herrb | ip route add default dev tunmin table 25 |
66 | 2 | Matthieu Herrb | ip -6 route add default dev tunmin table 25 |
67 | 2 | Matthieu Herrb | |
68 | 2 | Matthieu Herrb | ip rule add from all iif tunmin table 25 |
69 | 2 | Matthieu Herrb | ip -6 rule add from all iif tunmin table 25 |
70 | 2 | Matthieu Herrb | |
71 | 2 | Matthieu Herrb | ip rule add from all iif eth1 table 25 |
72 | 2 | Matthieu Herrb | ip -6 rule add from all iif eth1 table 25 |
73 | 2 | Matthieu Herrb | |
74 | 2 | Matthieu Herrb | ip rule add from 10.0.3.2 table 25 |
75 | 2 | Matthieu Herrb | ip rule add from 172.31.3.1 table 25 |
76 | 2 | Matthieu Herrb | |
77 | 2 | Matthieu Herrb | ip -6 addr add fe80::31/64 dev eth1 |
78 | 2 | Matthieu Herrb | ip addr add 89.234.156.0/32 dev lo |
79 | 2 | Matthieu Herrb | ip addr add 91.224.148.0/32 dev lo |
80 | 2 | Matthieu Herrb | |
81 | 2 | Matthieu Herrb | # par adhérent |
82 | 2 | Matthieu Herrb | ip route add 91.224.149.97 dev eth1 table 25 |
83 | 2 | Matthieu Herrb | ip -6 route add 2a03:7220:8081:6100::/56 via fe80::81:61 dev eth1 table 25 |
84 | 2 | Matthieu Herrb | ... |
85 | 2 | Matthieu Herrb | </pre> |