我正在尝试按照教程进行操作如何创建 Evil Twin 接入点 (使用 WPA/WPA2 捕获)一切正常,除了我在 20:51 处卡住了以下命令:
dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhpcd.pid at0
一切配置都与 YouTube 视频中完全相同。文件/etc/dhcpd.conf
看起来与视频中完全相同 - **第 7:16 分钟(我不知道是否应该如此)。
视频中没有显示所以我根本没有修改/etc/default/isc-dhcp-server
。我有INTERFACES=""
。我不知道我应该在这里放什么界面来配合教程。
另外我没有修改它,/etc/network/interfaces
因为视频中没有显示。此文件仅包含:
auto lo
iface lo inet loopback
我不知道该添加什么。我将在终端中输入的内容与日志一起复制:
root@kali:~# ifconfig at0 192.168.1.129 netmask 255.255.255.128
root@kali:~# route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.129
root@kali:~# echo 1 > /proc/sys/net/ipv4/ip_forward
root@kali:~# iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
root@kali:~# iptables --append FORWARD --in-interface at0 -j ACCEPT
root@kali:~# iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.0.13:80
root@kali:~# iptables -t nat -A POSTROUTING -j MASQUERADE
root@kali:~# dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhpcd.pid at0
Internet Systems Consortium DHCP Server 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhpcd.pid
Wrote 0 leases to leases file.
Listening on LPF/at0/44:6d:57:fa:4a:df/192.168.1.128/25
Sending on LPF/at0/44:6d:57:fa:4a:df/192.168.1.128/25
Sending on Socket/fallback/fallback-net
root@kali:~# /etc/init.d/isc-dhcp-server start
[....] Starting isc-dhcp-server (via systemctl): isc-dhcp-server.serviceJob for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details.
failed!
root@kali:~# ip route
default via 192.168.0.1 dev eth0 proto static metric 1024
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.13
192.168.1.128/25 via 192.168.1.129 dev at0 scope link
192.168.1.128/25 dev at0 proto kernel scope link src 192.168.1.129
root@kali:~# tail -n 30 /var/log/syslog
Sep 12 14:06:36 localhost dhcpd: you want, please write a subnet declaration
Sep 12 14:06:36 localhost dhcpd: in your dhcpd.conf file for the network segment
Sep 12 14:06:36 localhost dhcpd: to which interface at0 is attached. **
Sep 12 14:06:36 localhost dhcpd:
Sep 12 14:06:36 localhost dhcpd:
Sep 12 14:06:36 localhost dhcpd: No subnet declaration for eth0 (192.168.0.13).
Sep 12 14:06:36 localhost dhcpd: ** Ignoring requests on eth0. If this is not what
Sep 12 14:06:36 localhost dhcpd: you want, please write a subnet declaration
Sep 12 14:06:36 localhost dhcpd: in your dhcpd.conf file for the network segment
Sep 12 14:06:36 localhost dhcpd: to which interface eth0 is attached. **
Sep 12 14:06:36 localhost dhcpd:
Sep 12 14:06:36 localhost dhcpd:
Sep 12 14:06:36 localhost dhcpd: Not configured to listen on any interfaces!
Sep 12 14:06:36 localhost dhcpd:
Sep 12 14:06:36 localhost dhcpd: If you think you have received this message due to a bug rather
Sep 12 14:06:36 localhost dhcpd: than a configuration issue please read the section on submitting
Sep 12 14:06:36 localhost dhcpd: bugs on either our web page at www.isc.org or in the README file
Sep 12 14:06:36 localhost dhcpd: before submitting a bug. These pages explain the proper
Sep 12 14:06:36 localhost dhcpd: process and the information we find helpful for debugging..
Sep 12 14:06:36 localhost dhcpd:
Sep 12 14:06:36 localhost dhcpd: exiting.
Sep 12 14:06:38 localhost isc-dhcp-server[2767]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Sep 12 14:06:38 localhost isc-dhcp-server[2767]: failed!
Sep 12 14:06:38 localhost systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Sep 12 14:06:38 localhost systemd[1]: Failed to start LSB: DHCP server.
Sep 12 14:06:38 localhost systemd[1]: Unit isc-dhcp-server.service entered failed state.
Sep 12 14:09:01 localhost CRON[2881]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Sep 12 14:13:51 localhost avahi-daemon[2238]: Invalid response packet from host 192.168.0.10.
Sep 12 14:13:51 localhost avahi-daemon[2238]: Invalid response packet from host 192.168.0.15.
Sep 12 14:17:01 localhost CRON[2974]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)