我已经在运行 Debian Jessie 的机器上设置了本地“热点”。
我按照一些说明操作,但这两个教程对我都不起作用。最后我发现我的interfaces
andhostapd.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