Estou tentando seguir o tutorial Como criar um ponto de acesso duplo malvado (com captura WPA / WPA2) . Tudo funcionou, exceto que eu fico preso às 20:51 no comando:
dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhpcd.pid at0
Tudo está configurado exatamente como no vídeo do youtube. O arquivo /etc/dhcpd.conf
parece exatamente o mesmo, como no vídeo - ** minuto 7:16 (não sei se deve ou não).
No vídeo não aparece, então eu não modifiquei o /etc/default/isc-dhcp-server
. Eu tenho INTERFACES=""
. Eu não sei qual interface devo colocar aqui para combinar com o tutorial.
Também não modifiquei este /etc/network/interfaces
porque o vídeo não aparece. Este arquivo contém apenas:
auto lo
iface lo inet loopback
Eu não sei o que adicionar nele. Vou copiar o que eu digitei no terminal junto com o log:
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)