The mission of the project is to create an AP using YES internet with the lowest cost.
Hardware requirement:
1. Raspi+8GB sd + raspbian wheezy inside – est price RM130 without casing
2. Yes Go dongle – est price RM50(used)
3. Wipi – wireless adapter – est price RM60
The interfaces:
The raspi will have 3 interfaces
1. eth0 – for management port no dhcpd
2. wlan0 – will hosted hostapd and dhcpd – for clients
3. wimax0 – the internet source
The Setup:
1. gctwimax install
– Install the dependencies
- Linux kernel with TUN/TAP support (simple check with /dev/net/tun)
- libusb-1.0-dev
- libssl-dev
- libglib2.0-dev
- dbus
- libdbus-glib-1-dev
- zlib
- libeap.so
– Please install the gctwimax as exactly mentioned on the INSTALL file
– Download https://code.google.com/p/gctwimax/
Create config file /usr/share/gctwimax/gctwimax.conf
Change some values:
use_nv=0
anonymous_identity=”yes_id@yes.my”
identity=”yes_id@yes.my”
password=”password”
certnv=0
To connect :
sudo gctwimax -C /usr/share/gctwimax/gctwimax.conf
sudo gctwimax -C /usr/share/gctwimax/gctwimax.conf -d
If you can’t get it, please follow this instruction : http://9m2pju.blogspot.com/2012/07/linux-and-yes-4g-wimax-modem.html
2. hostapd install
sudo apt-get install hostapd
Create config file
sudo nano /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=YES_pi_AP
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Please change driver value respective to your hardware.
sudo nano /etc/default/hostapd
Put config files :
DAEMON_CONF=”/etc/hostapd/hostapd.conf”
Get ip foward :
sudo nano /etc/sysctl.conf
net.ipv4.ip_forward=1
sudo sh -c “echo 1 > /proc/sys/net/ipv4/ip_forward“
Create network translation :
sudo iptables -t nat -A POSTROUTING -o wimax0 -j MASQUERADE
sudo iptables -A FORWARD -i wimax0 -o wlan0 -m state –state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
make sure happen every reboot
sudo sh -c “iptables-save > /etc/iptables.ipv4.nat”
sudo nano /etc/network/interfaces
at the end put :
up iptables-restore < /etc/iptables.ipv4.nat
start the service :
sudo service hostapd start
3. install dhcpd – dnsmasq
sudo apt-get install dnsmasq
Edit config file :
sudo nano /etc/dnsmasq.conf
uncommented line
dhcp-range=192.168.2.100,192.168.2.200,255.255.255.0,12h
start the service
sudo service dnsmasq start
4. Transparent + upstream proxy – To be continue …