ok, here we go,let's connect to the neighbours... root@OpenWrt:~# iwconfig this is showing you the actual state of your wifi connection. you will see something similar to the following: lo no wireless extensions. eth0 no wireless extensions. eth1 IEEE 802.11-DSF ESSID:"Linksys" Mode:Managed Channel:11 Access Point: 00:A0:C5:95:H4:19 Bit Rate:5.5Mb/s Tx-Power=15 dBm Retry limit:0 RTS thr:off Fragment thr:off Encryption key:off Link Quality:1/5 Signal level:-86 dBm Noise level:-256 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 vlan0 no wireless extensions. vlan1 no wireless extensions. ok, we are working on eth1 (your wifi device) look that the mode is Managed. if the mode is Master, than change it to Managed: do the following root@OpenWrt:~# iwconfig eth1 mode managed now that you are in mode managed on eth1 you can scan your neighborhood for wifi connections: root@OpenWrt:~# wl scan ; sleep 2 ; wl scanresults if you see nothing, than move to another window or to the roof (the roof is always the best... if the scan has been succesfull you will see something like this (to move to to the upper results, move pressing the MAIUSC key and PAGE UP): SSID: "linksys" Mode: Managed RSSI: -95 dBm noise: -88 dBm Channel: 11 BSSID: 00:0F:66:D9:D6:1F Capability: ESS ShortSlot Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) 18 24 36 54 6 9 12 48 ] SSID: "fdiaz-1" Mode: Managed RSSI: -98 dBm noise: -88 dBm Channel: 1 BSSID: 00:0F:21:6F:19:1A Capability: ESS WEP Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) 18 24 36 54 6 9 12 48 ] SSID: "default" Mode: Managed RSSI: -94 dBm noise: -88 dBm Channel: 1 BSSID: 00:01:36:0A:B2:1D Capability: ESS ShortPre ShortSlot Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) 6 9 12 18 24 36 48 54 ] SSID: "Wireless" Mode: Managed RSSI: -83 dBm noise: -88 dBm Channel: 1 BSSID: 00:A0:C5:83:C7:3E Capability: ESS Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) ] SSID: "WLAN" Mode: Managed RSSI: -92 dBm noise: -89 dBm Channel: 6 BSSID: 00:C0:49:E0:68:7A Capability: ESS ShortPre PBCC ShortSlot Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) 22 6 9 12 18 24 36 48 54 ] so, here we have a lot of informations we need: - SSID is the name of the connection - channel is the channel on which the connections is broadcasting - BSSID is the MAC adress of your neighbour's router - RSSI is the quality of the signal you receive from the router - Capability tells you if a network is open (ESS, ESS Short...) or crypted (ESS WEP) first, look at the capability: if it says WEP or WPA or some oscure settings, than we will not be able to connect (wait for the next workshop on "cracking WEP keys"). than, look at the RSSI: to be able to connect it MUST BE LOWER THAN 90! (89 is also good!) if the Capability is ESS, than let's try to connect: (just type: wl join, and the SSID of where you whant to connect) root@OpenWrt:~# wl join Wireless if it was succesfull, than your iwconfig has changed. if it was not succesful, than your iwconfig has not chamged. tell him: wl join ???, again, or tell him: wl scan ; wl join ??? let's have a look at the new iwconfig: root@OpenWrt:~# iwconfig lo no wireless extensions. eth0 no wireless extensions. eth1 IEEE 802.11-DSF ESSID:"Wireless" Mode:Managed Channel:10 Access Point: 00:A0:C5:98:F2:95 Bit Rate:5.5Mb/s Tx-Power=15 dBm Retry limit:0 RTS thr:off Fragment thr:off Encryption key:off Link Quality:1/5 Signal level:-89 dBm Noise level:-256 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 vlan0 no wireless extensions. vlan1 no wireless extensions ok, as you can see, we succesfully connected: the ESSID has changed to the one we wanted to join, and we do have a link quality (from 0/5 to 5/5). now that we reack the network, we have to join in. this is done with IP numbers, which are the adresses of the computers. Usually the numberof your neighbour's router is a standard one: 192.168.1.1, but it could be different: 192.168.0.1, 192.168.2.1, 10.0.0.1 so, it means different network numbers: if your neighbour's router is 192.168.1.1 than we must be 192.168.1.something to reach it, as an example 192.168.1.77. similar, if it is 192.168.2.1 than we mus be 192.168.2.something. let's try: give your computer an ip number for the wifi interface (a number between 51 and 99 or betwen 151 and 199 is the best) root@OpenWrt:~# ifconfig eth1 192.168.1.77 up now let's try to contact your neighbour's router: root@OpenWrt:~# ping 192.168.1.1 (stop the ping with control-C) if the answer was "network not reacheable", than change, with ifconfig your ip number to 192.168.0.77 or to 192.168.2.77, or to 10.0.0.77 or to 10.0.1.77 and ping the number 1 of the same network: 192.168.0.1, 192.168.2.1, 10.0.0.1, 10.0.1.1). If nothing is working, than change your wifi connection... if the ping succeded, than the result will be something like this: PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=0 ttl=254 time=3.2 ms 64 bytes from 192.168.1.1: icmp_seq=1 ttl=254 time=2.9 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=254 time=2.8 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=254 time=2.9 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=254 time=7.4 ms (stop it with control-C) ok, we are succesfully exchanging informations with our neighbour's router. now wi will have to tell our router to use our neighbour's router as a gateway to the internet: root@OpenWrt:~# route add default gw 192.168.1.1 eth1 let's control it: root@OpenWrt:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.99.0 * 255.255.255.0 U 0 0 0 vlan0 default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 this means: vlan0 is the ethernet interface of the wrt, to communicate with your computer both your computer and the wrt are in the 192.168.99.something network, your computer will also use the wrt as a gateway... eth1 is the wifi interface of the wrt, it is useing a network number 192.168.1.something to communicate with your'neigbourgh's router AND it is using your neighbour's router (192.168.1.1) as a gateway. now let's try to ping to the internet: root@OpenWrt:~# ping 141.20.1.3 if you don't get any response, than something is wrong or your neighbours are not connected to the internet, try with another wifi connection. if you had a response, than let's go to the last step: see if the domain names (www.google.com, www.squat.net, ...) are successfully translated in IP numbers: root@OpenWrt:~# ping heise.de if you get a response, you're in, welcome to the internet-connection-squatter-community... if you don't get any response, then you need to cahnge the /etc/resolv.conf file. this tells your machine which machine is doing the domain name resolution (DNS) for you. in the resolv.conf file there should be the IP number of your neighbour's router. just put it in. You can write typing the INSERT, to exit and save press ESC, than : and than x root@OpenWrt:~# vi /etc/resolv.conf if you cannot save the file, than it's because it's not a real file, but just a link: remove it like this: root@OpenWrt:~# rm /etc/resolv.conf ant then write a new one with: root@OpenWrt:~# vi /etc/resolv.conf here I write an example of a good resolv.conf file for barcelona: nameserver 192.168.1.1 nameserver 192.168.2.1 nameserver 80.58.32.97 nameserver 194.224.52.37 nameserver 62.81.16.197 ok, now you're in, remember that your WRT's IP number should be the GATEWAY AND DNS for your computer, so in linux you will have to cahnge the route of your computer adding the WRT IP number as gatevay, and you should change the /etc/resolv.conf putting your WRT IP number as a nameserver (you can just add it), in windows, in the properties of the connections, there is TCP/IP, open it, put the WRT IP number as gateway and also as DNS (the submask should be 255.255.255.0) REMEMBER: - you are using you neighbour's connection: it is not illegal but also not legal - you have a weak anonimity: everything you do on the internet will result in comeing from your neighbour's connection. please remember that you always leave a trace of what you do, when and who you are, everywhere you go on the internet. everybody will be able to read waht you write (if you don't encrypt it), and which pages you are visiting. - if you abuse of your neighbour's connection, they will notice it and protect against you... so if you are downloading 24 hours a day, you will soon be thrown out... the best solution is to have more connections for different uses: one jest for downloading and another one for normal use... - if you abuse of your neighbour's connection, soon you will have to pay for the internet... - you are on the internet, so people can enter in your computer: set up a decent firewall or test yours to see the open ports you leave to the interner (with linux, nmap is a good tool)