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