- http://elinux.org/RPi_USB_Wi-Fi_Adapters
- http://hackingadventures42.blogspot.com/2015/02/raspberry-pi-as-wifi-mitm-accesspoint.html
- http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/
- https://bogeskov.dk/UsbAccessPoint.html
lsusb - list usb device
iwlist - list wifi
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install -y cmake git-core zsh tmux vim-nox bridge-utils hostapd dnsmasq nginx iw slstrip
# Install oh-my-zsh
$ sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Change current shell to zsh
$ sudo chsh -s $(which zsh)
# Download `doubleend.zsh-theme` theme
# After download, update .vimrc
$ sudo curl -o ~/.oh-my-zsh/themes/doubleend.zsh-theme https://gist.githubusercontent.com/ralphcrisostomo/4a884751c9d9e98fab12/raw/839f35012db28e36d45b0d15d5b5066dc64e4cf1/doubleend.zsh-theme
# Update .zshrc theme
ZSH_THEME="doubleend"
# Restart
$ sudo shutdown -r now
curl -O http://fichiers.touslesdrivers.com/39144/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
sudo mv RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip /tmp
cd /tmp
sudo unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
sudo rm RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
sudo tar -xvf RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz
sudo rm -rf RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911
cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812
cd hostapd
sudo make
sudo cp /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo cp -p hostapd /usr/sbin/hostapd
sudo chown root.root /usr/sbin/hostapd
sudo chmod 755 /usr/sbin/hostapd
sudo cp /usr/sbin/hostapd_cli /usr/sbin/hostapd_cli.bak
sudo cp -p hostapd_cli /usr/sbin/hostapd_cli
sudo chown root.root /usr/sbin/hostapd_cli
sudo chmod 755 /usr/sbin/hostapd_cli
Create hostapd.conf /etc/hostapd/hostapd.conf
interface=wlan0
driver=rtl871xdrv
ssid=NotFreeWifi
channel=1
hw_mode=g
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
We also need to tell hostapd where to find this config file /etc/init.d/hostapd
DAEMON_CONF=/etc/hostapd/hostapd.conf
Update dnsmasq.conf /etc/dnsmasq.conf
log-facility=/var/log/dnsmasq.log
address=/#/10.0.0.1
interface=wlan0
dhcp-range=10.0.0.10,10.0.0.250,12h
no-resolv
log-queries
Update network interface /etc/network/interfaces
~
~
1,1 All
#
# LOOPBACK
#
auto lo
iface lo inet loopback
#
# ETH0
#
auto eth0
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
#
# WIFI
#
wireless-power on
#
# WLAN0
#
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 10.0.0.1
netmask 255.255.255.0
#
# WIFI1
#
auto wlan1
allow-hotplug wlan1
iface wlan1 inet static
address 192.168.1.21
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Edit /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="PLDTMyDSL"
psk="********"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}