freebox:index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
freebox:index [2016/05/06 08:59] – [PC2 (connecté au FP)] orel | freebox:index [2024/03/18 15:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Tunnel Wifi entre les Freebox | + | ====== Tunnel Wifi entre les Freebox Server et Player ====== |
Si, comme moi, vous disposez d'un Freebox Revolution (v6), vous pouvez connecter votre boîtier ADSL (Freebox Server ou FS) à votre boîtier HD (Freebox Player ou FP) de deux manières : soit avec les FreePlugs basée sur la technologie CPL (Courants Porteurs en Ligne), soit avec un cable Ethernet qui courent à travers le salon, le plus souvent quand les FreePlugs ne fonctionnent pas ou mal ! Nous nous proposons ici de proposer une alternative sans fil basé sur un tunnel wifi entre le FS et le FP ;-) | Si, comme moi, vous disposez d'un Freebox Revolution (v6), vous pouvez connecter votre boîtier ADSL (Freebox Server ou FS) à votre boîtier HD (Freebox Player ou FP) de deux manières : soit avec les FreePlugs basée sur la technologie CPL (Courants Porteurs en Ligne), soit avec un cable Ethernet qui courent à travers le salon, le plus souvent quand les FreePlugs ne fonctionnent pas ou mal ! Nous nous proposons ici de proposer une alternative sans fil basé sur un tunnel wifi entre le FS et le FP ;-) | ||
Line 12: | Line 12: | ||
* un bridge br0 entre eth0.100 et tap0.100 pour chaque PC. | * un bridge br0 entre eth0.100 et tap0.100 pour chaque PC. | ||
- | Le serveur DHCP du FS affecte des adresses IP dans le LAN (ether et wifi) en 192.168.0.0/ | + | La FS (en mode routeur) dispose d' |
+ | |||
+ | ==== Prérequis ==== | ||
+ | |||
+ | On installe quelques paquets Linux/ | ||
+ | |||
+ | sudo apt-get install openvpn openssl vlan bridge-utils | ||
+ | |||
+ | On génère une clef statique pour le tunnel VPN : | ||
+ | |||
+ | sudo openvpn --genkey --secret openvpn.key | ||
+ | |||
+ | Il faut également stopper le Network Manager : | ||
+ | |||
+ | sudo / | ||
+ | ... # Raspbian | ||
+ | |||
==== PC1 (connecté au FS) ===== | ==== PC1 (connecté au FS) ===== | ||
- | __Prérequis__ | + | En tant que root, il faut lancer le script //server// suivant |
- | < | + | <code - server.sh> |
- | modprobe 8021q | + | # reseau wifi ad-hoc |
ifconfig wlan0 down | ifconfig wlan0 down | ||
- | iwconfig wlan0 channel 1 essid pouet mode ad-hoc | + | iwconfig wlan0 essid pouet mode ad-hoc |
ifconfig wlan0 192.168.1.1/ | ifconfig wlan0 192.168.1.1/ | ||
- | openvpn | + | |
+ | # reseau local | ||
+ | ifconfig eth0 up | ||
+ | |||
+ | # tunnel VPN | ||
+ | openvpn server.conf & sleep 1 | ||
+ | |||
+ | # vlan 100 | ||
+ | modprobe 8021q | ||
vconfig add eth0 100 | vconfig add eth0 100 | ||
vconfig add tap0 100 | vconfig add tap0 100 | ||
+ | ifconfig eth0.100 up | ||
+ | ifconfig tap0.100 up | ||
+ | |||
+ | # bridge | ||
brctl addbr br0 | brctl addbr br0 | ||
brctl addif br0 tap0.100 | brctl addif br0 tap0.100 | ||
brctl addif br0 eth0.100 | brctl addif br0 eth0.100 | ||
- | ifconfig eth0.100 up | ||
- | ifconfig tap0.100 up | ||
ifconfig br0 up | ifconfig br0 up | ||
</ | </ | ||
- | <code - / | + | <code - server.conf> |
dev tap | dev tap | ||
ifconfig 10.8.0.1 255.255.255.0 | ifconfig 10.8.0.1 255.255.255.0 | ||
- | secret | + | secret openvpn.key |
</ | </ | ||
==== PC2 (connecté au FP) ===== | ==== PC2 (connecté au FP) ===== | ||
- | __Prérequis__ | + | En tant que root, il faut lancer le script //client// suivant |
- | < | + | <code - client.sh> |
- | modprobe 8021q | + | # reseau wifi ad-hoc |
- | iwconfig wlan0 channel 1 essid pouet mode ad-hoc | + | ifconfig wlan0 down |
+ | iwconfig wlan0 essid pouet mode ad-hoc | ||
ifconfig wlan0 192.168.1.2/ | ifconfig wlan0 192.168.1.2/ | ||
- | openvpn | + | |
+ | # reseau local | ||
+ | ifconfig eth0 up | ||
+ | |||
+ | # tunnel VPN | ||
+ | openvpn client.conf & sleep 1 | ||
+ | |||
+ | # vlan 100 | ||
+ | modprobe 8021q | ||
vconfig add eth0 100 | vconfig add eth0 100 | ||
vconfig add tap0 100 | vconfig add tap0 100 | ||
+ | ifconfig eth0.100 up | ||
+ | ifconfig tap0.100 up | ||
+ | |||
+ | # bridge | ||
brctl addbr br0 | brctl addbr br0 | ||
brctl addif br0 tap0.100 | brctl addif br0 tap0.100 | ||
brctl addif br0 eth0.100 | brctl addif br0 eth0.100 | ||
- | ifconfig eth0.100 up | ||
- | ifconfig tap0.100 up | ||
ifconfig br0 up | ifconfig br0 up | ||
</ | </ | ||
- | <code - / | + | <code - client.conf> |
remote 192.168.1.1 | remote 192.168.1.1 | ||
dev tap | dev tap | ||
ifconfig 10.8.0.2 255.255.255.0 | ifconfig 10.8.0.2 255.255.255.0 | ||
- | secret | + | secret openvpn.key |
</ | </ | ||
+ | |||
+ | ==== Remise à zéro ===== | ||
+ | |||
+ | <code - reset.sh> | ||
+ | rmmod 8021q | ||
+ | ifconfig eth0 down | ||
+ | ifconfig wlan0 down | ||
+ | ifconfig tap0 down | ||
+ | ifconfig br0 down | ||
+ | brctl delbr br0 | ||
+ | pkill -9 openvpn | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Conclusion ==== | ||
+ | |||
+ | Bon, ça marche ! Voici une archive avec les scripts et les configs {{: | ||
+ | Mais le débit a l'air juste suffisant pour regarder la TV avec un flux ADSL bas débit. On peut également remplacer la connexion wifi ad-hoc en utilisant simplement l' | ||
+ | |||
+ | Afin d' | ||
+ | |||
+ | Bench à faire... | ||
+ | |||
+ | |||
+ | |||
==== Un peu de documentation ==== | ==== Un peu de documentation ==== | ||
Line 72: | Line 135: | ||
* http:// | * http:// | ||
* https:// | * https:// | ||
+ | * http:// | ||
+ | * http:// |
freebox/index.1462525149.txt.gz · Last modified: 2024/03/18 15:05 (external edit)