{"id":132,"date":"2012-08-23T23:52:06","date_gmt":"2012-08-23T22:52:06","guid":{"rendered":"http:\/\/snakenet.eu\/blog\/?p=132"},"modified":"2012-08-28T09:46:16","modified_gmt":"2012-08-28T08:46:16","slug":"internet-pourquoi-payer-si-vous-avez-des-voisins-et-un-raspberry","status":"publish","type":"post","link":"https:\/\/snakenet.eu\/blog\/internet-pourquoi-payer-si-vous-avez-des-voisins-et-un-raspberry\/132\/","title":{"rendered":"Internet &#8211; Pourquoi payer si vous avez des voisins et un Raspberry"},"content":{"rendered":"<p>Si vous venez d&rsquo;avoir de gros soucis de connection ADSL, vous appr?cierez cette petite astuce.<br \/>\nCe tutoriel fonctionne uniquement pour les reseaux WPA, pour du WEP ou OPEN, c&rsquo;est plus facile, donc, pas expliqu? \ud83d\ude42<\/p>\n<h1>pr?-requis:<\/h1>\n<ul>\n<li>Un Raspberry-Pi<\/li>\n<li>Une cl? USB compatible linux<\/li>\n<li>Avoir le package WPASUPPLICANT (apt-get install wpasupplicant)<\/li>\n<li>Avoir un Raspberry-Pi ? jour (voir annexe1)<\/li>\n<\/ul>\n<h1>Se connecter au WIFI du voisin<\/h1>\n<p>Configurer le WIFI :  \/etc\/wpa_supplicant.conf<\/p>\n<pre>network={\r\n ssid=\"bbox2-1234\"\r\n psk=\"CeciEstUneCleWPAMaisNeRevezPasElleExistePas\"\r\n }<\/pre>\n<p>Configurer les adresses IP + DHCP :: \/etc\/network\/interfaces<\/p>\n<pre> #loopback interface\r\n auto lo iface lo inet loopback\r\n\r\n #interface r?seau priv? (LAN) external network (internet), configured through dhcp\r\n auto eth0\r\n iface eth0 inet static\r\n address 192.168.10.1\r\n netmask 255.255.255.0\r\n network 192.168.10.0\r\n broadcast 192.168.10.255\r\n\r\n# interface WIFI (DHCP)\r\n iface wlan2 inet dhcp<\/pre>\n<p>Connectez vous:<\/p>\n<pre>\r\nifconfig wlan2 down\r\niwconfig wlan2 mode managed\r\nwpa_supplicant -B -iwlan2 -c\/etc\/wpa_supplicant.conf -Dwext\r\nifconfig wlan2 up\r\ndhclient wlan2<\/pre>\n<p><del>Activer le routage (2 fa?ons diff?rentes)<\/p>\n<pre>echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward<\/pre>\n<p>Ou<\/p>\n<pre>\/etc\/sysctl.conf --> net.ipv4.ip_forward=1 \r\nsysctl -p<\/pre>\n<p><\/del><\/p>\n<p>Configurer le natting<\/p>\n<pre>\r\n# delete old configuration, if any\r\n#Flush all the rules in filter and nat tables\r\niptables --flush\r\niptables --table nat --flush\r\n\r\n# delete all chains that are not in default filter and nat table, if any\r\niptables --delete-chain\r\niptables --table nat --delete-chain\r\n\r\n# Set up IP FORWARDing and Masquerading (NAT)\r\niptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE\r\niptables --append FORWARD --in-interface eth1 -j ACCEPT\r\n<\/pre>\n<p>Testez si vous avez un acc?s internet, et comment vous l&rsquo;avez:<\/p>\n<pre>\r\nping www.google.com\r\ntraceroute www.google.be\r\nroute -n<\/pre>\n<h1>Annexe 1 : Avoir un Raspberry-Pi ? jour<\/h1>\n<pre>apt-get install ca-certificates\r\nwget <a href=\"http:\/\/goo.gl\/1BOfJ\">http:\/\/goo.gl\/1BOfJ<\/a> -O \/usr\/bin\/rpi-update &amp;&amp; chmod +x \/usr\/bin\/rpi-update rpi-update\r\napt-get install git-core\r\nrpi-update\r\nldconfig\r\nrpi-update<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Si vous venez d&rsquo;avoir de gros soucis de connection ADSL, vous appr?cierez cette petite astuce. Ce tutoriel fonctionne uniquement pour les reseaux WPA, pour du WEP ou OPEN, c&rsquo;est plus facile, donc, pas expliqu? \ud83d\ude42 pr?-requis: Un Raspberry-Pi Une cl? USB compatible linux Avoir le package WPASUPPLICANT (apt-get install wpasupplicant) Avoir un Raspberry-Pi ? jour [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,4],"tags":[31,32,33,30],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","category-wifi","tag-adsl","tag-ethernet","tag-internet-sharing","tag-wifi-to-lan"],"_links":{"self":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/comments?post=132"}],"version-history":[{"count":28,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":167,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/132\/revisions\/167"}],"wp:attachment":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/media?parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/categories?post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/tags?post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}