Biarpun si jessie hari ini release, tapi harus pakai ini dulu.. karena si jessie masih ngebug di PC :D
Setting acces point wifi di debian wheezy menggunakan hostapd dan dnsmasq
Pertama install driver wifi
apt-get install firmaware-atheros
kedua install hostapd
sudo apt-get install hostapd
Ketiga CONFIGURING HOSTAPD
sudo leafpad /etc/hostapd/hostapd.conf
pastekan berikut ini
interface=wlan0Keempat install dnsmasq
driver=nl80211
ssid=namawifi
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=password8digit
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
sudo apt-get install dnsmasq
sudo leafpad /etc/dnsmasq.conf
paste ini
buat file di home# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers
no-resolv
# Interface to bind to
interface=wlan0
# Specify starting_range,end_range,lease_time
dhcp-range=10.0.0.3,10.0.0.20,12h
# dns addresses to send to the clients
server=8.8.8.8
server=8.8.4.4
leafpad initSoftAP
pastekan
#!/bin/bash
#Initial wifi interface configuration
ifconfig
$1 up 10.0.0.1 netmask 255.255.255.0
sleep
2
###########Start dnsmasq, modify if required##########
if
[ -z
"$(ps -e | grep dnsmasq)"
]
then
dnsmasq
fi
###########
#Enable NAT
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface $2 -j MASQUERADE
iptables --append FORWARD --
in
-interface $1 -j ACCEPT
#Thanks to lorenzo
#Uncomment the line below if facing problems while sharing PPPoE, see lorenzo's comment for more details
#iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
sysctl -w net.ipv4.ip_forward=1
#start hostapd
hostapd
/etc/hostapd/hostapd
.conf 1>
/dev/null
killall dnsmasq
chmod
+x initSoftAP
.
/initSoftAP
wlan0 ppp0
# And there you go