1 |
I have sucessfully build a ipv4 access point , |
2 |
1)edit /etc/dnsmasq.conf and add |
3 |
interface=wlan0 |
4 |
except-interface=lo |
5 |
dhcp-range=10.0.0.2,10.0.0.9,12h |
6 |
2)create a file name hostapd.conf: |
7 |
interface=wlan0 |
8 |
driver=nl80211 |
9 |
ssid=pqy |
10 |
hw_mode=g |
11 |
channel=8 |
12 |
wpa=3 |
13 |
wpa_passphrase=pqy55555 |
14 |
3)create a file name ap.sh: |
15 |
#!/bin/bash |
16 |
pkill hostapd |
17 |
pkill dnsmasq |
18 |
sleep 1 |
19 |
ifconfig wlan0 10.0.0.1 netmask 255.255.255.240 |
20 |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
21 |
echo "1" > /proc/sys/net/ipv4/ip_forward |
22 |
hostapd -B hostapd.conf |
23 |
/etc/init.d/dnsmasq restart |
24 |
|
25 |
then sudo sh ap.sh |
26 |
I can connect to this ipv4 network.But I have no idea how to deal with ipv6. |
27 |
Is it possible to create ipv6 local network? |