AtelierCanal2013 » Historique » Version 17
Laurent GUERBY, 11/06/2014 23:53
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 | 17 | Laurent GUERBY | Pour ipv6 : kmod-ipv6 ip6tables kmod-ip6tables radvd luci-app-radvd |
44 | 17 | Laurent GUERBY | adds implicitely: libip6tc libdaemon |
45 | 2 | Laurent GUERBY | |
46 | 2 | Laurent GUERBY | system / startup |
47 | 2 | Laurent GUERBY | openvpn disable |
48 | 2 | Laurent GUERBY | firewall disable |
49 | 2 | Laurent GUERBY | |
50 | 2 | Laurent GUERBY | system / startup / local startup |
51 | 2 | Laurent GUERBY | |
52 | 2 | Laurent GUERBY | <pre> |
53 | 2 | Laurent GUERBY | # Put your custom commands here that should be executed once |
54 | 2 | Laurent GUERBY | # the system init finished. By default this file does nothing. |
55 | 2 | Laurent GUERBY | |
56 | 2 | Laurent GUERBY | openvpn --mktun --dev-type tun --dev tunpsp |
57 | 1 | Laurent GUERBY | ip li set tunpsp up |
58 | 2 | Laurent GUERBY | ip a a 10.0.28.2/24 dev tunpsp |
59 | 8 | Laurent GUERBY | openvpn --dev tunpsp --dev-type tun --lport 0 --remote IP_ROUTEUR_PARIS PORT_NUMBER --proto tcp-client --daemon --keepalive 10 60 |
60 | 2 | Laurent GUERBY | |
61 | 2 | Laurent GUERBY | ip route add 10.0.28.0/24 dev tunpsp table 25 |
62 | 2 | Laurent GUERBY | ip route add default via 10.0.28.1 dev tunpsp table 25 |
63 | 1 | Laurent GUERBY | ip rule add from 10.0.28.2 table 25 |
64 | 2 | Laurent GUERBY | |
65 | 2 | Laurent GUERBY | ip route add IP_PUBLIQUE/32 dev br-lan |
66 | 8 | Laurent GUERBY | ip rule add from IP_PUBLIQUE/32 table 25 |
67 | 2 | Laurent GUERBY | |
68 | 2 | Laurent GUERBY | exit 0 |
69 | 2 | Laurent GUERBY | </pre> |
70 | 2 | Laurent GUERBY | |
71 | 2 | Laurent GUERBY | h3. Antennes AP et STA |
72 | 2 | Laurent GUERBY | |
73 | 2 | Laurent GUERBY | Les antennes 5 GHz sont en bridge avec des IP admin locales |
74 | 2 | Laurent GUERBY | 192.168.1.21/24 AP planet science |
75 | 2 | Laurent GUERBY | 192.168.1.22/24 STA adherent 1 |
76 | 2 | Laurent GUERBY | ... |
77 | 2 | Laurent GUERBY | |
78 | 2 | Laurent GUERBY | h3. Sur le 740N adherent |
79 | 2 | Laurent GUERBY | |
80 | 2 | Laurent GUERBY | sur routeur client |
81 | 1 | Laurent GUERBY | - port WAN sur l'antenne STA 5 GHz client |
82 | 1 | Laurent GUERBY | - port LAN et wifi = br-lan = reseau local |
83 | 7 | Laurent GUERBY | |
84 | 7 | Laurent GUERBY | system / software |
85 | 7 | Laurent GUERBY | *important* installer le paquet : ip |
86 | 2 | Laurent GUERBY | |
87 | 2 | Laurent GUERBY | network / interfaces |
88 | 2 | Laurent GUERBY | wan static address IP_PUBLIQUE/32 |
89 | 2 | Laurent GUERBY | use DNS IP_DNS |
90 | 2 | Laurent GUERBY | |
91 | 2 | Laurent GUERBY | system / startup / local startup |
92 | 2 | Laurent GUERBY | <pre> |
93 | 2 | Laurent GUERBY | # Put your custom commands here that should be executed once |
94 | 2 | Laurent GUERBY | # the system init finished. By default this file does nothing. |
95 | 2 | Laurent GUERBY | |
96 | 2 | Laurent GUERBY | ip route add 192.168.1.0/24 dev eth1 |
97 | 2 | Laurent GUERBY | ip route add default via 192.168.1.1 |
98 | 2 | Laurent GUERBY | |
99 | 2 | Laurent GUERBY | exit 0 |
100 | 1 | Laurent GUERBY | </pre> |
101 | 6 | Laurent GUERBY | |
102 | 6 | Laurent GUERBY | h2. IPv6 |
103 | 6 | Laurent GUERBY | |
104 | 6 | Laurent GUERBY | TODO |
105 | 5 | Laurent GUERBY | |
106 | 5 | Laurent GUERBY | h2. Modele financier |
107 | 5 | Laurent GUERBY | |
108 | 5 | Laurent GUERBY | * 20 (740N sur box) + 60 (LocoM5 AP) = 80 euros de setup (+ cables) |
109 | 5 | Laurent GUERBY | * 20 (740N LAN adherent) + 60 (LocoM5 STA) = 80 euros/adherent (+ cables) |
110 | 5 | Laurent GUERBY | * participation eventuelle a la connection ADSL du local |
111 | 5 | Laurent GUERBY | * total 160 euros + cables + participation |
112 | 5 | Laurent GUERBY | |
113 | 5 | Laurent GUERBY | Pour 1 adherent 160 euros, 8 mois d'amortissement avec 20/mois |
114 | 5 | Laurent GUERBY | Pour 2 adherents 240 euros, 6 mois d'amortissement avec 20+20/mois |
115 | 16 | Laurent GUERBY | |
116 | 16 | Laurent GUERBY | h2. Liens |
117 | 16 | Laurent GUERBY | |
118 | 16 | Laurent GUERBY | http://wiki.freifunk.net/images/7/73/Vortrag.pdf |
119 | 16 | Laurent GUERBY | <pre> |
120 | 16 | Laurent GUERBY | echo 50 XY »/etc/iproute2/rt tables |
121 | 16 | Laurent GUERBY | ip rule add from $HNA/$MSK prio 30002 table XY |
122 | 16 | Laurent GUERBY | ip rule add to $HNA/$MSK prio 30001 lookup main |
123 | 16 | Laurent GUERBY | ip route add default \ |
124 | 16 | Laurent GUERBY | via $TUNNEL NEIGH IP \ |
125 | 16 | Laurent GUERBY | dev $TUNNEL DEV \ |
126 | 16 | Laurent GUERBY | table XY |
127 | 16 | Laurent GUERBY | ip route flush cache |
128 | 16 | Laurent GUERBY | |
129 | 16 | Laurent GUERBY | |
130 | 16 | Laurent GUERBY | ip tunnel \ |
131 | 16 | Laurent GUERBY | add tunnel0 \ |
132 | 16 | Laurent GUERBY | mode ipip \ |
133 | 16 | Laurent GUERBY | remote 10.10.1.1 \ |
134 | 16 | Laurent GUERBY | local 10.10.99.1 \ |
135 | 16 | Laurent GUERBY | compress lzo |
136 | 16 | Laurent GUERBY | ip link set dev ipip0 up |
137 | 16 | Laurent GUERBY | ip address add 172.16.1.2/24 dev tunnel0 |
138 | 16 | Laurent GUERBY | </pre> |