Projet

Général

Profil

AtelierCanal2013 » Historique » Version 7

« Précédent - Version 7/37 (diff) - Suivant » - Version actuelle
Laurent GUERBY, 01/03/2014 20:27


AtelierCanal2013

Objectif

Wifi pour les peniches du parc du canal a Ramonville

Contact ok planet science pour test puis install
Contact TODO capitainerie via planet science

Routage

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.

Sur le routeur gw a Paris

qui a pour ip publique IP_ROUTEUR_PARIS

openvpn --mktun --dev-type tun --dev tunpsp
ip link set tunpsp up
openvpn --dev tunpsp --dev-type tun --cipher none --auth none --port PORT_NUMBER --verb 3 --proto tcp-server --daemon --log-append SOME_LOG
ip addr add 10.0.28.1/24 dev tunpsp
ip route add IP_PUBLIQUE/32 dev tunpsp

Sur le 740N a Planet science

- port WAN branché sur le reseau local de planet science (donc la box ADSL)
- port LAN vers l'antenne 5 GHz AP

network / interfaces
Wifi : disable
br-lan : IPv4 statique 192.168.1.1/24 + disable DHCP
wan : DHCP client

system / software
install packages : openvpn-devel-nossl ip

system / startup
openvpn disable
firewall disable

system / startup / local startup

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

openvpn --mktun --dev-type tun --dev tunpsp
ip li set tunpsp up
ip a a 10.0.28.2/24 dev tunpsp
openvpn --dev tunpsp --dev-type tun --lport 0 --remote IP_ROUTEUR_PARIS PORT_NUMBER --proto tcp-client --daemon --keepalive 10 30

ip route add 10.0.28.0/24 dev tunpsp table 25
ip route add default via 10.0.28.1 dev tunpsp table 25 
ip rule add from 10.0.28.2 table 25

ip route add IP_PUBLIQUE/32 dev br-lan
ip rule add from IP_PUBLIQUE table 25

exit 0

Antennes AP et STA

Les antennes 5 GHz sont en bridge avec des IP admin locales
192.168.1.21/24 AP planet science
192.168.1.22/24 STA adherent 1
...

Sur le 740N adherent

sur routeur client
- port WAN sur l'antenne STA 5 GHz client
- port LAN et wifi = br-lan = reseau local

system / software
important installer le paquet : ip

network / interfaces
wan static address IP_PUBLIQUE/32
use DNS IP_DNS

system / startup / local startup

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

ip route add 192.168.1.0/24 dev eth1
ip route add default via 192.168.1.1

exit 0

IPv6

TODO

Modele financier

  • 20 (740N sur box) + 60 (LocoM5 AP) = 80 euros de setup (+ cables)
  • 20 (740N LAN adherent) + 60 (LocoM5 STA) = 80 euros/adherent (+ cables)
  • participation eventuelle a la connection ADSL du local
  • total 160 euros + cables + participation

Pour 1 adherent 160 euros, 8 mois d'amortissement avec 20/mois
Pour 2 adherents 240 euros, 6 mois d'amortissement avec 20+20/mois