環境:ubuntu 10.04

作用:NAT AP +DHCP+WEP

interface=wlan0
driver=nl80211
ssid=stu
channel=8
hw_mode=g
ieee80211n=0
macaddr_acl=0
wep_key0=1234567890

 

Hostapd up
hostapd -dB hostapd1.conf
安裝dhcp
sudo apt-get install dhcp3-server
編輯 dhcp config
設定forward
啟動 dhcp
sudo /etc/init.d/dhcp3-server start
啟動 NAT 繞送
在 hostapd 的 conf 加入金鑰 就可以進行 wep 加密

以下放在/etc/rc.local

cd /etc/hostapd
hostapd -dB hostapd.conf
ifconfig eth0 210.240.69.184 netmask 255.255.255.128 up
ifconfig wlan0 192.168.2.1 netmask 255.255.255.0 up
echo "1" > /proc/sys/net/ipv4/ip_forward
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/etc/init.d/dhcp3-server restart

vim  /etc/dhcp3/dhcpd.conf

ddns-update-style interim;
ignore client-updates;
default-lease-time 604800;
max-lease-time 1209600;
subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option domain-name "chps.hlc.edu.tw";
option domain-name-servers 168.95.1.1;
range dynamic-bootp 192.168.2.100 192.168.2.200;
}

 

 

 

UBUNTU 11.04和10.04不一樣喔

 

要切記

arrow
arrow
    全站熱搜

    神眉老師 發表在 痞客邦 留言(0) 人氣()