Mittwoch, 18. März 2015

WOW-TO convert a RaspberryPi 2 B into a standalone AP with REALTEK [EDIMAX] CHIP

WOW-TO convert a RaspberryPi 2 B into a standalone AP with REALTEK [EDIMAX] CHIP

Here is a short summary of all the commands (cooking-book like) without any of the comments above. So if you succeeded once, don’t care about comments, just do the essential work now:

sudo bash
sudo apt-get update && sudo apt-get upgrade -f && sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get install git
sudo wget -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
sudo reboot
sudo apt-get install isc-dhcp-server
sudo apt-get autoremove hostapd
tar -zxvf v2.0.tar.gz
cd RTL8188-hostapd-2.0/hostapd
sudo make
sudo make install
sudo service hostapd restart
sudo nano /etc/dhcp/dhcpd.conf
#option domain-name "";
#option domain-name-servers,;
subnet netmask
option broadcast-address;
option routers;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local-network";
option domain-name-servers,;

sudo nano /etc/default/isc-dhcp-server
sudo nano /etc/network/interfaces
iface wlan0 inet static
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
sudo nano /etc/sysctl.conf
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo ifup wlan0
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
sudo service isc-dhcp-server start
sudo service hostapd start
sudo update-rc.d hostapd enable
sudo update-rc.d isc-dhcp-server enable
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
sudo nano /etc/network/interfaces
up iptables-restore < /etc/iptables.ipv4.nat
sudo nano /etc/rc.local
sleep 10 && service hostapd restart
sudo reboot

Keine Kommentare:

Kommentar veröffentlichen

comments are moderated, to prevent spam and trolls: