shark007 Posted December 6, 2011 Report Posted December 6, 2011 Salutare, as avea si eu o mica problema, deci... am primit ca si tema sa fac un acces point cu ajutorul unui adaptor wireless, in linux, utilizand doar comenzile "ifconfig", "iwconfig" si "route". Deci:1. Am un PC care are conexiunea la internet prin interfata ethernet. (eth0)2. Am un adaptor wireless. (wlan0)3. Acum vreau sa transform acel PC conectat la internet, intr-un acces point, pentru a ma conecta la internet cu telefonul sau cu laptopul prin wireless. Ce ziceti, ma puteti ajuta si pe mine pas cu pas? Quote
qbert Posted December 6, 2011 Report Posted December 6, 2011 Nu stiu cum se face in linux,dar incearca sa faci un adhoc. Quote
Fitty Posted December 6, 2011 Report Posted December 6, 2011 Turn your Linux computer into a wireless access point using hostapd Quote
Pugna Posted December 6, 2011 Report Posted December 6, 2011 Turn your Linux computer into a wireless access point using hostapdAre voie doar prin cele trei comenzi. Trebuie sa seteze un gateway intre eth0 si wlan0 cu route, dar nu sunt destul de documentat sa ofer solutii. Quote
co4ie Posted December 6, 2011 Report Posted December 6, 2011 (edited) sa setezi wlan0 ca AP:iwconfig wlan0 mode Master -->> SAU "Master"iwconfig wlan0 channel 6iwconfig wlan0 essid Retea -->> SAU "Retea"iwconfig wlan0 key 11111111 (64 bit encryption) -->> SAU iwconfig wlan0 key open (fara pass)echo 1 > /proc/sys/net/ipv4/ip_forward (Din cate stiu eu) Normal linux iti routeaza direct intre echipamentele de retea... deci de route ai nevoie doar ca sa iti arate ca routeaza ...route -FCifconfig nu inteleg la ce ai putea sa il folosesti... decat sa iti listeze echipamentele de retea si sa le dai up/down...sa nu zica ca nu le folosesti !!ifconfig wlan0 downifconfig wlan0 upifconfig eth0 downifconfig eth0 upLE: sau mai poti face un bridge asa:brctl addbr br0ifconfig wlan0 0.0.0.0brctl addif br0 wlan0ifconfig br0 192.168.1.115 netmask 255.255.255.0 uproute add -net 192.168.1.0 netmask 255.255.255.0 br0route add default gw 192.168.1.1 br0Sau sa setezi dnsmask ca DHCP pe LAN-ul nou : WAN=eth0LAN=wlan0LANIP="192.168.133.1"DHCPRANGE="192.168.133.2,192.168.133.253"# setup forwarding and the dnsmasq servicefwd() { iptables -A FORWARD -i $LAN -j ACCEPT iptables -A FORWARD -o $LAN -j ACCEPT iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward ifconfig $LAN $LANIP/24 up /usr/sbin/dnsmasq -C /dev/null >/dev/null 2>&1 \ --bind-interfaces \ --listen-address=$LANIP \ --dhcp-range=$DHCPRANGE,12h \ echo "to disable: $0 -d WAN=$WAN LAN=$LAN"}# remove forwarding and the dnsmasq serviceunfwd() { pkill -9 dnsmasq ifconfig $LAN down echo 0 > /proc/sys/net/ipv4/ip_forward iptables -D FORWARD -i $LAN -j ACCEPT iptables -D FORWARD -o $LAN -j ACCEPT iptables -t nat -D POSTROUTING -o $WAN -j MASQUERADE}Off:@Pugna ... Termina cu posturile aiurea... ai 95 de posturi deja (din care nici unul nu e cu si/sau despre ceva interesant) si abia te-ai inregistrat luna asta ... WTF?? Lasa post hunting-ul ca nu se accepta !!Si btw ... niciodata nu o sa fii destul de documentat daca esti Troll !! Edited December 9, 2011 by co4ie Quote
rimagheo Posted December 9, 2011 Report Posted December 9, 2011 Stiu ca solutia ceruta este pt linux, dar am sa indic ceva similar pt Windows - se numeste Daihinia™ | when neighbors matterDar nu merge cu orice placa/adaptor de retea. Avantajul - nu mai nevoie si de a doua placa/adaptor de retea.Softul este facut de un roman din Republica Moldova (unul Vrabie nu stiu cum). Ar fi recomandat daca ati mai gasi versiunea cu "donatie", pt care nu platiti nimic (-normal). Quote
shark007 Posted December 12, 2011 Author Report Posted December 12, 2011 cd4ie, am incercat sa pun pe mode Master, dar imi iau urmatoarea eroare: "Error for wireless request "Set Mode" (8B06) : SET failed on device wlan0 ; Invalid argument.". Quote
co4ie Posted December 12, 2011 Report Posted December 12, 2011 ok... da comanda uname -a si scrie aici ce iti da ... poti incerca sa faci update la tot apt-get dist-upgrade si sa mai incerci o data ! daca nici asta nu merge lspci | grep Wireless si paste aici poate gasim un driver care sa functioneze si in master mode... Quote
shark007 Posted December 13, 2011 Author Report Posted December 13, 2011 Deci, am dat comanda "uname -a" si mi-au aparut urmatoarele: root@shadow-ubuntu:~# uname -aLinux shadow-ubuntu 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:34:47 UTC 2011 i686 i686 i386 GNU/LinuxAm incercat si cu "apt-get dist-upgrade", dar am deja toate updaturile.Am dat comanda "lspci | grep Wireless" si mi-au aparut urmatoarele: root@shadow-ubuntu:~# lspci | grep Wireless08:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02) Quote
co4ie Posted December 13, 2011 Report Posted December 13, 2011 (edited) ok... acum poti incerca asta:apt-get install build-essentialapt-get install libssl-devsi dupa ifconfig wlan0 downwget http://dl.aircrack-ng.org/drivers/ipwraw-ng-2.3.4-04022008.tar.bz2tar -xjf ipwraw-ng*cd ipwraw-ngmakemake installmake install_ucodeecho "blacklist ipwraw" | sudo tee /etc/modprobe.d/ipwrawDriver-ul asta suporta monitor mode si injectie dar nu stiu exact daca suporta si Master ...mai incerci o data sa pui in Master mode ... in speranta ca o sa mearga (desi cam peste tot pe unde am citit nu suporta master mode...) :ifconfig wlan0 upiwconfig wlan0 mode Master -->> SAU "Master"iwconfig wlan0 channel 6iwconfig wlan0 essid Retea -->> SAU "Retea"iwconfig wlan0 key 11111111 (64 bit encryption) -->> SAU iwconfig wlan0 key open (fara pass)Daca merge Master Mode faci un bridge intre eth0 si wlan0brctl addbr br0ifconfig wlan0 0.0.0.0brctl addif br0 wlan0ifconfig br0 192.168.1.115 netmask 255.255.255.0 uproute add -net 192.168.1.0 netmask 255.255.255.0 br0route add default gw 192.168.1.1 br0 Edited December 13, 2011 by co4ie Quote