sorry for bumping a old thread but im having DNS issues and im hoping somone can help.
im using the below code with a linksys wusb54g wificard (rt2570 chipset) and the code works fine my psp gets a IP and the AP shows up but when i try to goto google all i get is
Code:
0.000000 192.168.1.140 -> 208.67.222.222 DNS Standard query A google.com
in tshark, im no linux guru but it looks to me like the SoftAP isnt connecting to OpenDNS and OpenDNS isnt responding back. any help?
also if it helps any heres my LAN setup
(grr 15 post rule)
mcd2012.freesitespace.net/download/Images/temp/settings.jpg
ive got backtrack3 running in vmware on my main comp. eth0 of the backtrack is assigned a ip (192.168.2.7) and is connected to the internet my router is using OpenDNS and is a DHCP server and uses a static ip.
if you need anymore info just let me know
Code:
modprobe tun
airmon-ng stop mon0
airmon-ng start rausb0
# -=SoftAP Options=-
xterm -e airbase-ng -P -C 5 -c 6 -e SoftAP -a 00:14:6C:F0:AD:00 rausb0 &
sleep 3
ifconfig at0 up
sleep 3
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
# monitor
xterm -e airodump-ng -c 6 --bssid 00:14:6C:F0:AD:00 mon0 &
xterm -e tshark -i 3 "not broadcast and not multicast" & # at0 = 3
#kill all dns
killall dnsmasq
#DHCP KillAll
killall dhcp
killall dhcpd
killall dhcpcd
## make sure we clean our dhcpd.leases
echo > '/var/state/dhcp/dhcpd.leases'
# start dhcp server for subnet
dhcpd -cf dhcpd.conf at0
## solve our dns forwarder
dnsmasq restart
# create custom dhcpd.conf for WLAN
cat > dhcpd.conf << EOF
ddns-update-style ad-hoc;
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 208.67.222.222;
range 192.168.1.130 192.168.1.140;
}
EOF
###########IP TABLES################
# iptables cleanup
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
# iptables
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE # gateway to ext. router
iptables --append FORWARD --in-interface at0 -j ACCEPT # rogue gateway
iptables -t nat -A PREROUTING -s 192.168.1.128/25 -d 192.168.1.0/25 -j DROP # protect LAN from WLAN (DROP/REJECT)
iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 208.67.222.222
echo 1 > /proc/sys/net/ipv4/ip_forward
#DriftNet
driftnet -i at0