
Originally Posted by
SecUpwN
Fair enough, but I'm trying to figure out how to resolve the issue I described above.
Please take a look at my previously posted logfile and tell me exactly how to proceed in order to make DNS forwarding work as it should.
SecUpwN
ok, well it's best you test it manually, below is a sample of commands for non-transparent mode
in /etc/apache2/sites-available
add to symlinks:
ErrorDocument 403 /index.html
ErrorDocument 404 /index.html
then reload apache
nano /etc/bind/named.conf
options {
directory "/var/cache/bind";
auth-nxdomain no;
recursion yes;
allow-recursion {any;};
allow-query {any;};
};
zone "." {
type master;
file "/etc/bind/db.root";
};
nano /etc/bind/db.root
$TTL 604800
@ IN SOA localhost. root.localhost. (
1337 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS 192.168.1.1
@ IN A 192.168.1.1
* IN A 192.168.1.1
nano dhcp.conf
ddns-update-style none;
ignore client-updates;
authoritative;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.200;
}
Code:
sudo chmod 775 /var/run/
sudo /etc/init.d/apache2 start
sudo /etc/init.d/bind9 start
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
sudo iptables -F
sudo iptables -X
sudo iptables -Z
sudo ifconfig wlan0 192.168.1.1 netmask 255.255.255.0
route del default wlan0
sudo route add default gw 192.168.1.1 wlan0
sudo iptables -t nat -A PREROUTING -i wlan0 -j REDIRECT
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.1
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.1
sudo dhcpd3 -d -f -cf dhcp.conf wlan0
then run hostapd or airbase-ng