代码: 全选
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 11 bytes 940 (940.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 11 bytes 940 (940.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
mon.wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
unspec 78-E4-00-A2-80-BA-9D-CD-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 468 bytes 81515 (79.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
p7p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 222.20.14.175 netmask 255.255.255.0 broadcast 222.20.14.255
inet6 2001:250:4000:81a8:226:2dff:fea5:eb44 prefixlen 64 scopeid 0x0<global>
inet6 fe80::226:2dff:fea5:eb44 prefixlen 64 scopeid 0x20<link>
ether 00:26:2d:a5:eb:44 txqueuelen 1000 (Ethernet)
RX packets 5861 bytes 1389219 (1.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 415 bytes 109938 (107.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.123.1 netmask 255.255.255.0 broadcast 192.168.123.255
inet6 fe80::7ae4:ff:fea2:80ba prefixlen 64 scopeid 0x20<link>
ether 78:e4:00:a2:80:ba txqueuelen 1000 (Ethernet)
RX packets 10 bytes 2187 (2.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 83 bytes 16196 (15.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
代码: 全选
hostapd /etc/hostapd/hostapd.conf
ifconfig wlan0 192.168.123.1 netmask 255.255.255.0 up
dhcpd -q -cf /etc/dhcp/dhcpd.conf wlan0
iptables -t nat -A POSTROUTING -o p7p1 -s 192.168.123.0/24 -j MASQUERADE
代码: 全选
#
# This will give you a minimal, insecure wireless network.
#
# DO NOT BE SATISFIED WITH THAT!!!
#
# A complete, well commented example configuration file is
# available here:
#
# /usr/share/doc/hostapd-0.7.3/hostapd.conf
#
# For more information, look here:
#
# http://wireless.kernel.org/en/users/Documentation/hostapd
#
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
# Some usable default settings...
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
# Uncomment these for base WPA & WPA2 support with a pre-shared key
wpa=3
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
# DO NOT FORGET TO SET A WPA PASSPHRASE!!
#wpa_passphrase=YourPassPhrase
wpa_passphrase=password
# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211
# Customize these for your local configuration...
interface=wlan0
hw_mode=g
channel=7
ssid=SphericalCow
不知道问题出在哪里?