{"id":222,"date":"2015-01-15T11:26:43","date_gmt":"2015-01-15T03:26:43","guid":{"rendered":"http:\/\/matnet.my\/blog\/?p=222"},"modified":"2015-01-18T21:10:04","modified_gmt":"2015-01-18T13:10:04","slug":"yes-huddle-replacement-raspiyeswipiap","status":"publish","type":"post","link":"https:\/\/matnet.my\/blog\/2015\/01\/yes-huddle-replacement-raspiyeswipiap\/","title":{"rendered":"Yes Huddle Replacement &#8211; raspi+yes+wipi+ap+?+?"},"content":{"rendered":"<p>The mission of the project is to create an AP using YES internet with the lowest cost.<\/p>\n<p>Hardware requirement:<\/p>\n<p>1. Raspi+8GB sd + raspbian wheezy inside &#8211; est price RM130 without casing<\/p>\n<p>2. Yes Go dongle &#8211; est price RM50(used)<\/p>\n<p>3. Wipi &#8211; wireless adapter &#8211; est price RM60<\/p>\n<p>&nbsp;<\/p>\n<p>The interfaces:<\/p>\n<p>The raspi will have 3 interfaces<\/p>\n<p>1. eth0 &#8211; for management port no dhcpd<\/p>\n<p>2. wlan0 &#8211; will hosted hostapd and dhcpd &#8211; for clients<\/p>\n<p>3. wimax0 &#8211; the internet source<\/p>\n<p>&nbsp;<\/p>\n<p>The Setup:<\/p>\n<p>1. gctwimax install<\/p>\n<p>&#8211; Install the dependencies<\/p>\n<ul>\n<li>Linux kernel with TUN\/TAP support (simple check with \/dev\/net\/tun)<\/li>\n<li>libusb-1.0-dev<\/li>\n<li>libssl-dev<\/li>\n<li>libglib2.0-dev<\/li>\n<li>dbus<\/li>\n<li>libdbus-glib-1-dev<\/li>\n<li>zlib<\/li>\n<li>libeap.so<\/li>\n<\/ul>\n<p>&#8211; Please install the gctwimax as exactly mentioned on the INSTALL file<\/p>\n<p>&#8211; Download\u00a0https:\/\/code.google.com\/p\/gctwimax\/<\/p>\n<p>Create config file\u00a0\/usr\/share\/gctwimax\/gctwimax.conf<\/p>\n<p>Change some values:<\/p>\n<p>use_nv=0<br \/>\nanonymous_identity=&#8221;yes_id@yes.my&#8221;<br \/>\nidentity=&#8221;yes_id@yes.my&#8221;<br \/>\npassword=&#8221;password&#8221;<br \/>\ncertnv=0<\/p>\n<p>To connect :<\/p>\n<p>sudo gctwimax -C \/usr\/share\/gctwimax\/gctwimax.conf<br \/>\nsudo gctwimax -C \/usr\/share\/gctwimax\/gctwimax.conf -d<\/p>\n<p>If you can&#8217;t get it, please follow this instruction :\u00a0http:\/\/9m2pju.blogspot.com\/2012\/07\/linux-and-yes-4g-wimax-modem.html<\/p>\n<p>2. hostapd install<\/p>\n<p>sudo apt-get install hostapd<\/p>\n<p>Create config file<\/p>\n<p><b>sudo nano \/etc\/hostapd\/hostapd.conf<\/b><\/p>\n<p>interface=wlan0<br \/>\ndriver=<b>nl80211<\/b><br \/>\nssid=YES_pi_AP<br \/>\nhw_mode=g<br \/>\nchannel=6<br \/>\nmacaddr_acl=0<br \/>\nauth_algs=1<br \/>\nignore_broadcast_ssid=0<br \/>\nwpa=2<br \/>\nwpa_passphrase=Raspberry<br \/>\nwpa_key_mgmt=WPA-PSK<br \/>\nwpa_pairwise=TKIP<br \/>\nrsn_pairwise=CCMP<\/p>\n<p>Please change driver value respective to your hardware.<\/p>\n<p><b>sudo nano \/etc\/default\/hostapd<\/b><\/p>\n<p>Put config files :<\/p>\n<p><b><span class=\"editor-monospace\">DAEMON_CONF=&#8221;\/etc\/hostapd\/hostapd.conf&#8221;<\/span><\/b><\/p>\n<p>Get ip foward :<\/p>\n<p><b><span class=\"editor-monospace\">sudo nano \/etc\/sysctl.conf<\/span><\/b><\/p>\n<p><b>net.ipv4.ip_forward=1<\/b><\/p>\n<p><b><span class=\"editor-monospace\">sudo sh -c &#8220;echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<\/span><\/b><span class=\"editor-monospace\">&#8220;<\/span><\/p>\n<p>Create network translation :<\/p>\n<p><strong>sudo iptables -t nat -A POSTROUTING -o wimax0 -j MASQUERADE<\/strong><br \/>\n<strong>sudo iptables -A FORWARD -i wimax0 -o wlan0 -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<\/strong><br \/>\n<strong>sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT<\/strong><\/p>\n<p>make sure happen every reboot<\/p>\n<p><b><span class=\"editor-monospace\">sudo sh -c &#8220;iptables-save &gt; \/etc\/iptables.ipv4.nat&#8221;<\/span><\/b><\/p>\n<p><b>sudo nano \/etc\/network\/interfaces<\/b><\/p>\n<p>at the end put :<\/p>\n<p><strong>up iptables-restore &lt; \/etc\/iptables.ipv4.nat<\/strong><\/p>\n<p>start the service :<\/p>\n<p><strong>sudo service hostapd start<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>3. install dhcpd &#8211; dnsmasq<\/p>\n<p><strong>sudo apt-get install dnsmasq<\/strong><\/p>\n<p>Edit config file :<\/p>\n<p><strong>sudo nano \/etc\/dnsmasq.conf<\/strong><\/p>\n<p>uncommented line<\/p>\n<p><strong>dhcp-range=192.168.2.100,192.168.2.200,255.255.255.0,12h<\/strong><\/p>\n<p>start the service<\/p>\n<p><strong>sudo service dnsmasq start\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>4. Transparent + upstream proxy &#8211; To be continue &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The mission of the project is to create an AP using YES internet with the lowest cost. Hardware requirement: 1. &hellip; <a href=\"https:\/\/matnet.my\/blog\/2015\/01\/yes-huddle-replacement-raspiyeswipiap\/\" class=\"more-link\">More <span class=\"screen-reader-text\">Yes Huddle Replacement &#8211; raspi+yes+wipi+ap+?+?<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","hentry","category-bsd-nix","category-hobbies","standard"],"_links":{"self":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":4,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":226,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions\/226"}],"wp:attachment":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}