====== Εγκατάσταση - Ρύθμιση ασύρματης κάρτας δικτύου ====== ===== Περιγραφή δικτύου ===== Θέλουμε να ρυθμίσουμε το παρακάτω δίκτυο - Έναν ενσύρματο router (AdslRouter) με ip π.χ. 10.64.53.1 που είναι πύλη για το internet - Έναν ασύρματο router (WRouter) με ip π.χ. 192.168.2.1 που είναι και αυτός πύλη για το internet - Έναν server υπολογιστή με ip 10.64.53.200 στην ενσύρματη θύρα και 192.168.2.200 στην ασύρματη - Client υπολογιστές που να μπορούν να δρομολογούνται προς το internet μέσω του server υπολογιστή. Ο server θα έχει ρυθμίσεις που θα μπορούν να εναλλαχθούν ώστε να δρομολογήσει είτε μέσω του AdslRouter είτε μέσω του WRouter ===== Εγκατάσταση ασύρματης κάρτας ===== Αρχικά θα εγκαταστήσουμε το απαραίτητο λογισμικό (βλ. [[el:linux:debian:desktop:hardware:wireless#gss_lgs_g_s]] ) For wpa see instructions below and man wpa_supplicant to select driver, generally wext will be the correct Check connectivity with ping 192.168.2.1 #Wrouter ping 192.168.1.254 # Adsl Router nslookup www.google.com # dns check ping www.google.com To finish up (if not already done so) set the EthRouter as a Router /etc/init.d.myrouter start Now set the eth0 interface of the EthRouter to address 10.64.53.200 with ifconfig eth0 10.64.53.200 You could use a dhcp server on EthRouter and assign an address to the client pc through dhcp but another 2 dhcp servers exist and routers can route to them and things may get mixed up. Ofcourse if this client pc is running linux adjusting the /etc/dhclient.conf to reject offers from 192.168.1.254 (AdslRouter) and 192.168.2.1 (Wrouter) will do reject 192.168.1.254; reject 192.168.2.1; So for simplicity we will set a static ip like 10.64.53.201 to the client pc . ifconfig eth0 10.64.53.201 route add default gw 10.64.53.200 # EthRouter Change also manually the /etc/resolv.conf to set the dns servers nameserver 192.168.2.1 #Wrouter nameserver 192.168.1.254 #AdslRouter Now test connectivity in the client pc with ping 10.64.53.201 # EthRouter ping 192.168.2.1 # Wrouter ping 192.168.1.254 # AdslRouter nslookup www.google.com # dns resolution ping www.google.com # internet connectivity We did it! Ofcourse we need to change /etc/network/interfaces files to use this configuration automatically on reboot. In the EthRouter add this to /etc/network/interfaces allow-hotpug wlan0 eth0 # to regain connection if WRouter is restarted iface eth0 inet static address 10.64.53.200 netmask 255.255.255.0 # iface wlan0 inet dhcp wireless_essid wrouter #your WRouter ssid # (optional) uncomment line below to ensure ndiswrapper is loaded #pre-up grep -q ndiswrapper /proc/modules || modprobe ndiswrapper /etc/init.d/networking restart /etc/init.d/myrouter start Now redo the connectivity checks from the client pc. Finally shutdown EthRouter, reboot and check again from the client pc. If all ok you are done! You would like to secure your wirelless network, and therefore enable wpa encyption disabling ssid broadcast. FOR WPA checkout http://www.vollink.com/gary/deb_wifi.html See also latest changes for smoother integration in debian Etch 4.0 http://wiki.debian.org/WPA http://svn.debian.org/wsvn/pkg-wpa/trunk/wpasupplicant/debian/README.modes?op=file&rev=0&sc=0 wpasupplicant package is depreciated now and simpler intergation to /etc/network/interfaces can be used. Before we use it update to the latest netbase package apt-get install netbase And ofcourse install the wpasupplicant package apt-get install wpasupplicant For our example if we have wpa tkip/psk configured with ssid mywrouter and key mywrouter_key (13 chars needed for wpa) we can use the following configuration. iface wlan0 inet dhcp wpa-driver wext wpa-ssid mywrouter wpa-psk mywrouter_key Be sure to disable reading from everyone to your /etc/network/interfaces. A better approach would be to store it here encrypted chmod 600 /etc/network/interfaces To monitor use knemo and kwifimanager ===== Πηγές ===== * https://ostechnix.com/connect-and-disconnect-wifi-from-commandline-in-linux/ *