AtelierCanal2013 » Historique » Version 16
Laurent GUERBY, 14/05/2014 14:04
1 | 1 | Laurent GUERBY | {{>toc}} |
---|---|---|---|
2 | 1 | Laurent GUERBY | |
3 | 1 | Laurent GUERBY | h1. AtelierCanal2013 |
4 | 1 | Laurent GUERBY | |
5 | 2 | Laurent GUERBY | h2. Objectif |
6 | 2 | Laurent GUERBY | |
7 | 1 | Laurent GUERBY | Wifi pour les peniches du parc du canal a Ramonville |
8 | 1 | Laurent GUERBY | |
9 | 2 | Laurent GUERBY | Contact ok planet science pour test puis install |
10 | 1 | Laurent GUERBY | Contact TODO capitainerie via planet science |
11 | 2 | Laurent GUERBY | |
12 | 2 | Laurent GUERBY | h2. Routage |
13 | 2 | Laurent GUERBY | |
14 | 7 | Laurent GUERBY | L'idée est d'utiliser la connection internet d'un sympathisant (ici ADSL chez Planet Science) pour en faire un depart reseau 5 GHz avec un routage en IPv4 publique vers l'adherent sans en utiliser sur les intermediaires. Cela peut se faire facilement avec tunnel openwrt sur un PC Linux mais en pratique on peut aussi le faire avec un simple TP-Link 740N sous Openwrt qui a l'avantage d'un faible prix (16 euros) et faible encombrement/consomation, parfaitement silencieux. |
15 | 2 | Laurent GUERBY | |
16 | 3 | Laurent GUERBY | |
17 | 2 | Laurent GUERBY | h3. Sur le routeur gw a Paris |
18 | 2 | Laurent GUERBY | |
19 | 2 | Laurent GUERBY | qui a pour ip publique IP_ROUTEUR_PARIS |
20 | 2 | Laurent GUERBY | |
21 | 4 | Laurent GUERBY | <pre> |
22 | 2 | Laurent GUERBY | openvpn --mktun --dev-type tun --dev tunpsp |
23 | 2 | Laurent GUERBY | ip link set tunpsp up |
24 | 8 | Laurent GUERBY | openvpn --dev tunpsp --dev-type tun --cipher none --auth none --port PORT_NUMBER --verb 3 --proto tcp-server --daemon --log-append SOME_LOG --keepalive 10 60 |
25 | 2 | Laurent GUERBY | ip addr add 10.0.28.1/24 dev tunpsp |
26 | 2 | Laurent GUERBY | ip route add IP_PUBLIQUE/32 dev tunpsp |
27 | 4 | Laurent GUERBY | </pre> |
28 | 1 | Laurent GUERBY | |
29 | 8 | Laurent GUERBY | Ne pas oublier de mettre la route sur h3 (les dev tun ne se propagent pas par bird 1.2.x visiblement). |
30 | 8 | Laurent GUERBY | |
31 | 2 | Laurent GUERBY | h3. Sur le 740N a Planet science |
32 | 2 | Laurent GUERBY | |
33 | 7 | Laurent GUERBY | - port WAN branché sur le reseau local de planet science (donc la box ADSL) |
34 | 2 | Laurent GUERBY | - port LAN vers l'antenne 5 GHz AP |
35 | 2 | Laurent GUERBY | |
36 | 2 | Laurent GUERBY | network / interfaces |
37 | 2 | Laurent GUERBY | Wifi : disable |
38 | 2 | Laurent GUERBY | br-lan : IPv4 statique 192.168.1.1/24 + disable DHCP |
39 | 2 | Laurent GUERBY | wan : DHCP client |
40 | 2 | Laurent GUERBY | |
41 | 2 | Laurent GUERBY | system / software |
42 | 2 | Laurent GUERBY | install packages : openvpn-devel-nossl ip |
43 | 2 | Laurent GUERBY | |
44 | 2 | Laurent GUERBY | system / startup |
45 | 2 | Laurent GUERBY | openvpn disable |
46 | 2 | Laurent GUERBY | firewall disable |
47 | 2 | Laurent GUERBY | |
48 | 2 | Laurent GUERBY | system / startup / local startup |
49 | 2 | Laurent GUERBY | |
50 | 2 | Laurent GUERBY | <pre> |
51 | 2 | Laurent GUERBY | # Put your custom commands here that should be executed once |
52 | 2 | Laurent GUERBY | # the system init finished. By default this file does nothing. |
53 | 2 | Laurent GUERBY | |
54 | 2 | Laurent GUERBY | openvpn --mktun --dev-type tun --dev tunpsp |
55 | 1 | Laurent GUERBY | ip li set tunpsp up |
56 | 2 | Laurent GUERBY | ip a a 10.0.28.2/24 dev tunpsp |
57 | 8 | Laurent GUERBY | openvpn --dev tunpsp --dev-type tun --lport 0 --remote IP_ROUTEUR_PARIS PORT_NUMBER --proto tcp-client --daemon --keepalive 10 60 |
58 | 2 | Laurent GUERBY | |
59 | 2 | Laurent GUERBY | ip route add 10.0.28.0/24 dev tunpsp table 25 |
60 | 2 | Laurent GUERBY | ip route add default via 10.0.28.1 dev tunpsp table 25 |
61 | 1 | Laurent GUERBY | ip rule add from 10.0.28.2 table 25 |
62 | 2 | Laurent GUERBY | |
63 | 2 | Laurent GUERBY | ip route add IP_PUBLIQUE/32 dev br-lan |
64 | 8 | Laurent GUERBY | ip rule add from IP_PUBLIQUE/32 table 25 |
65 | 2 | Laurent GUERBY | |
66 | 2 | Laurent GUERBY | exit 0 |
67 | 2 | Laurent GUERBY | </pre> |
68 | 2 | Laurent GUERBY | |
69 | 2 | Laurent GUERBY | h3. Antennes AP et STA |
70 | 2 | Laurent GUERBY | |
71 | 2 | Laurent GUERBY | Les antennes 5 GHz sont en bridge avec des IP admin locales |
72 | 2 | Laurent GUERBY | 192.168.1.21/24 AP planet science |
73 | 2 | Laurent GUERBY | 192.168.1.22/24 STA adherent 1 |
74 | 2 | Laurent GUERBY | ... |
75 | 2 | Laurent GUERBY | |
76 | 2 | Laurent GUERBY | h3. Sur le 740N adherent |
77 | 2 | Laurent GUERBY | |
78 | 2 | Laurent GUERBY | sur routeur client |
79 | 1 | Laurent GUERBY | - port WAN sur l'antenne STA 5 GHz client |
80 | 1 | Laurent GUERBY | - port LAN et wifi = br-lan = reseau local |
81 | 7 | Laurent GUERBY | |
82 | 7 | Laurent GUERBY | system / software |
83 | 7 | Laurent GUERBY | *important* installer le paquet : ip |
84 | 2 | Laurent GUERBY | |
85 | 2 | Laurent GUERBY | network / interfaces |
86 | 2 | Laurent GUERBY | wan static address IP_PUBLIQUE/32 |
87 | 2 | Laurent GUERBY | use DNS IP_DNS |
88 | 2 | Laurent GUERBY | |
89 | 2 | Laurent GUERBY | system / startup / local startup |
90 | 2 | Laurent GUERBY | <pre> |
91 | 2 | Laurent GUERBY | # Put your custom commands here that should be executed once |
92 | 2 | Laurent GUERBY | # the system init finished. By default this file does nothing. |
93 | 2 | Laurent GUERBY | |
94 | 2 | Laurent GUERBY | ip route add 192.168.1.0/24 dev eth1 |
95 | 2 | Laurent GUERBY | ip route add default via 192.168.1.1 |
96 | 2 | Laurent GUERBY | |
97 | 2 | Laurent GUERBY | exit 0 |
98 | 1 | Laurent GUERBY | </pre> |
99 | 6 | Laurent GUERBY | |
100 | 6 | Laurent GUERBY | h2. IPv6 |
101 | 6 | Laurent GUERBY | |
102 | 6 | Laurent GUERBY | TODO |
103 | 5 | Laurent GUERBY | |
104 | 5 | Laurent GUERBY | h2. Modele financier |
105 | 5 | Laurent GUERBY | |
106 | 5 | Laurent GUERBY | * 20 (740N sur box) + 60 (LocoM5 AP) = 80 euros de setup (+ cables) |
107 | 5 | Laurent GUERBY | * 20 (740N LAN adherent) + 60 (LocoM5 STA) = 80 euros/adherent (+ cables) |
108 | 5 | Laurent GUERBY | * participation eventuelle a la connection ADSL du local |
109 | 5 | Laurent GUERBY | * total 160 euros + cables + participation |
110 | 5 | Laurent GUERBY | |
111 | 5 | Laurent GUERBY | Pour 1 adherent 160 euros, 8 mois d'amortissement avec 20/mois |
112 | 5 | Laurent GUERBY | Pour 2 adherents 240 euros, 6 mois d'amortissement avec 20+20/mois |
113 | 16 | Laurent GUERBY | |
114 | 16 | Laurent GUERBY | h2. Liens |
115 | 16 | Laurent GUERBY | |
116 | 16 | Laurent GUERBY | http://wiki.freifunk.net/images/7/73/Vortrag.pdf |
117 | 16 | Laurent GUERBY | <pre> |
118 | 16 | Laurent GUERBY | echo 50 XY »/etc/iproute2/rt tables |
119 | 16 | Laurent GUERBY | ip rule add from $HNA/$MSK prio 30002 table XY |
120 | 16 | Laurent GUERBY | ip rule add to $HNA/$MSK prio 30001 lookup main |
121 | 16 | Laurent GUERBY | ip route add default \ |
122 | 16 | Laurent GUERBY | via $TUNNEL NEIGH IP \ |
123 | 16 | Laurent GUERBY | dev $TUNNEL DEV \ |
124 | 16 | Laurent GUERBY | table XY |
125 | 16 | Laurent GUERBY | ip route flush cache |
126 | 16 | Laurent GUERBY | |
127 | 16 | Laurent GUERBY | |
128 | 16 | Laurent GUERBY | ip tunnel \ |
129 | 16 | Laurent GUERBY | add tunnel0 \ |
130 | 16 | Laurent GUERBY | mode ipip \ |
131 | 16 | Laurent GUERBY | remote 10.10.1.1 \ |
132 | 16 | Laurent GUERBY | local 10.10.99.1 \ |
133 | 16 | Laurent GUERBY | compress lzo |
134 | 16 | Laurent GUERBY | ip link set dev ipip0 up |
135 | 16 | Laurent GUERBY | ip address add 172.16.1.2/24 dev tunnel0 |
136 | 16 | Laurent GUERBY | </pre> |