<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technical Diary &#187; wireless</title>
	<atom:link href="http://andriigrytsenko.net/tag/wireless/feed/" rel="self" type="application/rss+xml" />
	<link>http://andriigrytsenko.net</link>
	<description>With Andrii Grytsenko</description>
	<lastBuildDate>Sat, 28 Jan 2012 12:41:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Wireless internet AP based on RedHat linux</title>
		<link>http://andriigrytsenko.net/2009/11/wireless-internet-ap-based-on-linux/</link>
		<comments>http://andriigrytsenko.net/2009/11/wireless-internet-ap-based-on-linux/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 02:36:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://andriigrytsenko.net/?p=498</guid>
		<description><![CDATA[I will try to describe how to make own home wireless access point based on RedHat linux machine. This post include 2 part. In first one I&#8217;ll describe step which should be taken on linux machine and in second one step for windows client. Linux(server side) We use this host to share internet connection between [...]]]></description>
			<content:encoded><![CDATA[<p>I will try to describe how to make own home wireless access point based on RedHat linux machine.</p>
<p><span id="more-498"></span></p>
<p>This post include 2 part. In first one I&#8217;ll describe step which should be taken on linux machine and in second one step for windows client.</p>
<h2 style="text-align: center;">Linux(server side)</h2>
<p>We use this host to share internet connection between users over wireless network, so the machine has to have at least two connection:</p>
<ol>
<li>Internet ( regular ethernet connection)</li>
<li>Wireless connection( provided by wi-fi card)</li>
</ol>
<p>I will skip how to setup your Internet connection, therefore make sure its work properly.<br />
If you mounted your wi-fi card to pci slot use <em>lspci</em> to check it out:</p>
<pre>[root@localhost ~]# lspci  | grep -i wireless
02:01.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter (rev 01)</pre>
<p>For this card kernel module <em>ath5k</em> should be loaded into the kernel. Check it:</p>
<pre>lsmod | grep ath5k</pre>
<p>Use <em>modprobe</em> unless module is not loaded.</p>
<pre>modprobe ath5k</pre>
<p>If you done it without any problem I will able to set up the wi-fi card. Here is network configuration file for interface wlan0 with some comments:</p>
<pre>[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0# Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter
DEVICE=wlan0
ONBOOT=yes
IPADDR=192.168.0.1
NETMASK=255.255.255.0
HWADDR=00:17:9a:b7:d6:01
TYPE=Wireless
MODE=Ad-Hoc  # set this mode if want to make this card as access point
ESSID=homeee # the name of this connection which will be displayed for users
KEY=dffb9e2cc2 # secret key for connection</pre>
<p>To generate connection key run:</p>
<pre>dd if=/dev/random bs=1 count=5| xxd -ps</pre>
<p>Now restart the network service:</p>
<pre>service network restart</pre>
<p>and verify:</p>
<pre>iwconfig wlan0</pre>
<p>and</p>
<pre>ifconfig wlan0</pre>
<p>So 50% of linux part is done. Tune your kernel to make it forward ip traffic:</p>
<pre>vi /etc/sysctl.conf</pre>
<p>and set
<pre>net.ipv4.ip_forward</pre>
<p> to 1:<br />
<em>net.ipv4.ip_forward = <strong>1</strong></em><br />
Make changes affected:</p>
<pre>sysctl -p /etc/sysctl.conf</pre>
<p>Verify:</p>
<pre>sysctl -a | grep all.forwarding | grep ipv4</pre>
<p>And last but very important step. Its firewall and nat settings:<br />
!!! Be careful because this command flush all your rules in OUTPUT chain</p>
<pre>iptables -F OUTPUT</pre>
<p>turn masquerading on:</p>
<pre> iptables -t nat -I POSTROUTING -s 192.168.0.2/32 -o eth0 -j MASQUERADE</pre>
<p>where <em>eth0</em> your interface for share.<br />
save it all:</p>
<pre>service iptables save</pre>
<p>The linux router is ready on all 100%.</p>
<h2 style="text-align: center;">Windows(client side)</h2>
<p>I use windows Vista for this, but this steps can be used to Windows XP as well. Go to:<br />
<em>Start-&gt;Control Panel-&gt;Network and Internet-&gt; Network and Sharing center -&gt;  manage network connections </em><br />
Click right button on your <em>Wireless Network Connection</em> and choose <em>Properties</em>.<br />
Make double click on <em>Internet Protocol Version 4</em>.<br />
When new window is appear fill it up:<br />
<em>Ip address: 192.168.0.2<br />
Subnet mask: 255.255.255.0<br />
Default gateway: 192.168.0.1</em><br />
Also you need to specify you DNS server. Put the ip address of DNS server provided by your ISP.</p>
]]></content:encoded>
			<wfw:commentRss>http://andriigrytsenko.net/2009/11/wireless-internet-ap-based-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

