I'm trying to follow a tutorial on youtube (How To Create An Evil Twin Access Point (with WPA/ WPA2 Capture - posted by Chris Haralson) . Everything worked except I get stuck at 20:51 at the command:
Code:
dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhpcd.pid at0
In the tutorial (minute 7:16) he creates a dhcpd file in /etc/dhcpd.conf that looks like this:
Code:
authoritative;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.128 netmask 255.255.255.128 {
option subnet-mask 255.255.255.128;
option broadcast-address 192.168.1.255;
option routers 192.168.1.129;
option domain-name-servers 8.8.8.8;
range 192.168.1.130 192.168.1.140;
}
Then he runs
Code:
airbase-ng -e SSID -c channel no. -P wlan0mon
Then:
Code:
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!
As you can see I get stuck at root@kali:~# dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhpcd.pid at0
Here is my ip route and a log:
Code:
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)
Here is my /etc/default/isc-dhcp-server.conf
Code:
# Defaults for isc-dhcp-server initscript
# sourced by /etc/init.d/isc-dhcp-server
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPD_CONF=/etc/dhcp/dhcpd.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPD_PID=/var/run/dhcpd.pid
# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""
Here is my /etc/network/interfaces
Code:
auto lo
iface lo inet loopback
I don't know how to configure to match the tutorial settings.
Please help. Thank you in advance.