AtelierCanal2013 » Historique » Version 4
Laurent GUERBY, 24/11/2013 08:49
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 | 2 | Laurent GUERBY | L'idée est d'utiliser la connection internet (ici ADSL) d'un local pour en faire un depart reseau 5 GHz avec si possible un routage en IP publique. 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 | 2 | 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 |
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 | 2 | Laurent GUERBY | |
29 | 2 | Laurent GUERBY | h3. Sur le 740N a Planet science |
30 | 2 | Laurent GUERBY | |
31 | 2 | Laurent GUERBY | - port WAN branché sur le reseau local de planet science (donc la box ADSL) |
32 | 2 | Laurent GUERBY | - port LAN vers l'antenne 5 GHz AP |
33 | 2 | Laurent GUERBY | |
34 | 2 | Laurent GUERBY | network / interfaces |
35 | 2 | Laurent GUERBY | Wifi : disable |
36 | 2 | Laurent GUERBY | br-lan : IPv4 statique 192.168.1.1/24 + disable DHCP |
37 | 2 | Laurent GUERBY | wan : DHCP client |
38 | 2 | Laurent GUERBY | |
39 | 2 | Laurent GUERBY | system / software |
40 | 2 | Laurent GUERBY | install packages : openvpn-devel-nossl ip |
41 | 2 | Laurent GUERBY | |
42 | 2 | Laurent GUERBY | system / startup |
43 | 2 | Laurent GUERBY | openvpn disable |
44 | 2 | Laurent GUERBY | firewall disable |
45 | 2 | Laurent GUERBY | |
46 | 2 | Laurent GUERBY | system / startup / local startup |
47 | 2 | Laurent GUERBY | |
48 | 2 | Laurent GUERBY | <pre> |
49 | 2 | Laurent GUERBY | # Put your custom commands here that should be executed once |
50 | 2 | Laurent GUERBY | # the system init finished. By default this file does nothing. |
51 | 2 | Laurent GUERBY | |
52 | 2 | Laurent GUERBY | openvpn --mktun --dev-type tun --dev tunpsp |
53 | 2 | Laurent GUERBY | ip li set tunpsp up |
54 | 2 | Laurent GUERBY | ip a a 10.0.28.2/24 dev tunpsp |
55 | 2 | Laurent GUERBY | openvpn --dev tunpsp --dev-type tun --lport 0 --remote IP_ROUTEUR_PARIS PORT_NUMBER --proto tcp-client --daemon --keepalive 10 30 |
56 | 2 | Laurent GUERBY | |
57 | 2 | Laurent GUERBY | ip route add 10.0.28.0/24 dev tunpsp table 25 |
58 | 2 | Laurent GUERBY | ip route add default via 10.0.28.1 dev tunpsp table 25 |
59 | 2 | Laurent GUERBY | ip rule add from 10.0.28.2 table 25 |
60 | 2 | Laurent GUERBY | |
61 | 2 | Laurent GUERBY | ip route add IP_PUBLIQUE/32 dev br-lan |
62 | 2 | Laurent GUERBY | ip rule add from IP_PUBLIQUE table 25 |
63 | 2 | Laurent GUERBY | |
64 | 2 | Laurent GUERBY | exit 0 |
65 | 2 | Laurent GUERBY | </pre> |
66 | 2 | Laurent GUERBY | |
67 | 2 | Laurent GUERBY | h3. Antennes AP et STA |
68 | 2 | Laurent GUERBY | |
69 | 2 | Laurent GUERBY | Les antennes 5 GHz sont en bridge avec des IP admin locales |
70 | 2 | Laurent GUERBY | 192.168.1.21/24 AP planet science |
71 | 2 | Laurent GUERBY | 192.168.1.22/24 STA adherent 1 |
72 | 2 | Laurent GUERBY | ... |
73 | 2 | Laurent GUERBY | |
74 | 2 | Laurent GUERBY | h3. Sur le 740N adherent |
75 | 2 | Laurent GUERBY | |
76 | 2 | Laurent GUERBY | sur routeur client |
77 | 2 | Laurent GUERBY | - port WAN sur l'antenne STA 5 GHz client |
78 | 2 | Laurent GUERBY | - port LAN et wifi = br-lan = reseau local |
79 | 2 | Laurent GUERBY | |
80 | 2 | Laurent GUERBY | network / interfaces |
81 | 2 | Laurent GUERBY | wan static address IP_PUBLIQUE/32 |
82 | 2 | Laurent GUERBY | use DNS IP_DNS |
83 | 2 | Laurent GUERBY | |
84 | 2 | Laurent GUERBY | system / startup / local startup |
85 | 2 | Laurent GUERBY | <pre> |
86 | 2 | Laurent GUERBY | # Put your custom commands here that should be executed once |
87 | 2 | Laurent GUERBY | # the system init finished. By default this file does nothing. |
88 | 2 | Laurent GUERBY | |
89 | 2 | Laurent GUERBY | ip route add 192.168.1.0/24 dev eth1 |
90 | 2 | Laurent GUERBY | ip route add default via 192.168.1.1 |
91 | 2 | Laurent GUERBY | |
92 | 2 | Laurent GUERBY | exit 0 |
93 | 2 | Laurent GUERBY | </pre> |