我在运行 Debian Jessie 的机器上设置了本地“热点”。
我遵循了一些说明,之后这两个教程都不适合我。最后我发现我的文件中有一个空格(我认为),interfaces
这hostapd.conf
导致它无法加载。所以最后我设法让它发挥作用。但由于我使用了不同的教程,我不确定我安装的某些软件是否会导致它。
我现在的问题是,当我启动计算机时,我可以连接 Android 并访问互联网,但我的计算机本身无法访问它。只有当我修改interfaces
并注释掉所有桥接信息时它才起作用(但是正如你可以猜到的那样,我的android已经关闭了)
所以这是我的一些配置:
/etc/网络/接口
auto lo br0
iface lo inet loopback
# wireless wlan0
allow-hotplug wlan0
iface wlan0 inet manual
# eth0 connected to the ISP router
allow-hotplug eth0
#iface eth0 inet manual
iface eth0 inet dhcp
# Setup bridge
iface br0 inet static
bridge_ports wlan0 eth0
address 192.168.1.11
netmask 255.255.255.0
network 192.168.1.0
## isp router ip, 192.168.1.2 also runs DHCPD ##
gateway 192.168.1.2
dns-nameservers 192.168.1.2
/etc/hostapd/hostapd.conf
### Wireless network name ###
interface=wlan0
### Set your bridge name ###
bridge=br0
driver=nl80211
### (IN == INDIA, UK == United Kingdom, US == United Stats and so on ) ###
#country_code=IN
ssid=PrettyFlyWiFy
hw_mode=g
channel=6
wpa=2
wpa_passphrase=mysuperstrenthypasswordgoesherebutaintgonnawrite it here
## Key management algorithms ##
wpa_key_mgmt=WPA-PSK
## Set cipher suites (encryption algorithms) ##
## TKIP = Temporal Key Integrity Protocol
## CCMP = AES in Counter mode with CBC-MAC
wpa_pairwise=TKIP
rsn_pairwise=CCMP
## Shared Key Authentication ##
auth_algs=1
## Accept all MAC address ###
macaddr_acl=0
这是我的ifconfig eth0当服务器本身有互联网时
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.9.146 netmask 255.255.255.0 broadcast 172.16.9.255
inet6 fe80::beae:c5ff:feb7:90e0 prefixlen 64 scopeid 0x20<link>
ether bc:ae:c5:b7:90:e0 txqueuelen 1000 (Ethernet)
RX packets 1315564 bytes 1425606866 (1.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 682171 bytes 66122362 (63.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
和我的/etc/resolv.conf在同样的场景下
domain ciu.edu.tr
search ciu.edu.tr
nameserver 10.0.0.46
nameserver 10.0.0.9