<?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/"
	xmlns:georss="http://www.georss.org/georss" >

<channel>
	<title>Even the wrong words seem to rhyme &#187; networking</title>
	<atom:link href="http://www.kevinblake.co.uk/tag/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevinblake.co.uk</link>
	<description>a blog-life by Kevin Blake</description>
	<lastBuildDate>Thu, 13 May 2010 22:27:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mobile Internet on the Eee PC (Ubuntu Eee)</title>
		<link>http://www.kevinblake.co.uk/mobile-internet-on-the-eee-pc-ubuntu-eee/242/</link>
		<comments>http://www.kevinblake.co.uk/mobile-internet-on-the-eee-pc-ubuntu-eee/242/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 20:04:19 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[eee]]></category>
		<category><![CDATA[gprs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[N95]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=242</guid>
		<description><![CDATA[Setting up the Internet on the Eee PC over bluetooth to my Nokia N95 with T-Mobile GPRS/EDGE/3G connection can be tricky.  Yet it sounds like one of those setups that could be so easy, right?  Well it seems stable for the moment, so here&#8217;s what you&#8217;ll need.  Or rather, what I have&#8230; Eee PC 701 [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up the Internet on the Eee PC over bluetooth to my Nokia N95 with T-Mobile GPRS/EDGE/3G connection can be tricky.  Yet it sounds like one of those setups that could be so easy, right?  Well it seems stable for the moment, so here&#8217;s what you&#8217;ll need.  Or rather, what I have&#8230;</p>
<ul>
<li><a href="http://www.expansys.com/p.aspx?i=158485" target="_blank">Eee PC 701</a></li>
<li>Nokia N95</li>
<li><a href="http://www.memorybits.co.uk/shop/bluetooth-dongles/bluemicronext-pro-v2.0-bluetooth-dongle-/8156" target="_blank">Bluetooth dongle</a></li>
<li><a href="http://www.ubuntu-eee.com/" target="_blank">Ubuntu Eee installed</a> on the 701 (not Xandros &#8211; although check out <a href="http://www.3eportal.com/index.php?option=com_content&amp;task=view&amp;id=17&amp;Itemid=1" target="_blank">these scripts</a> if you don&#8217;t want to change)</li>
<li>T-Mobile UK contract with included data plan (preferably).  And Internet already working on the phone.</li>
</ul>
<p>You&#8217;re going to be setting up your connection though pppd, and all of these instructions are <a href="http://davesource.com/Solutions/20070520.T-Mobile-Nokia-E65-Ubuntu-Linux.html#bluetooth" target="_blank">based on instructions</a> that I&#8217;m going to steal, slightly change and probably skip parts to suit my purposes (and hopefully yours) perfectly.</p>
<p>If your set-up doesn&#8217;t match exactly, perhaps you can make use of both pages and work out where things should change.  Or lovingly rip these instructions off, as I did &#8211; to make your own.</p>
<p><strong>Setup your bluetooth dongle</strong><br />
First off, you&#8217;re going to need an apt repository that has the bluez-utils packages in.  So open up a terminal<br />
<code>sudo nano /etc/apt/sources.list</code><br />
and add the line<br />
<code>deb http://ftp.de.debian.org/debian etch main</code></p>
<p>Then you can install the package.</p>
<p><code>apt-update<br />
apt-get install bluez-utils<br />
/etc/init.d/bluetooth restart<br />
lsusb | grep -i bluetooth<br />
<em>(should show the bluetooth device)</em><br />
hcitool dev<br />
<em> (also lists bluetooth devices)</em><br />
</code></p>
<p><strong>Setup networking</strong></p>
<p>You can grab my <a href="http://www.kevinblake.co.uk/wp-content/uploads/2008/09/gprs-settings.tar">gprs-settings</a> which should be put into /etc/ppp/peers directory, and untarred.<br />
<code>tar -xvf gprs-settings.tar</code></p>
<p><strong>Pair the phone</strong></p>
<p>First, get the bluetooth ID of the N95<br />
<code>hcitool scan</code><br />
Then pair your Eee with your phone, you have to do this from the N95.<br />
<code>Bluetooth -&gt; right arrow (Paired devices) - Options<br />
New paired devices (search)<br />
Choose your eee and then type the pairing keys (anything of your choosing</code></p>
<p><strong>Bind bluetooth to an rfcomm device</strong></p>
<p>We use &#8220;rfcomm&#8221; to bind the bluetooth connection to a device. So first, find out the channel the phones bluetooth dial up networking system is on.  You can do this with sdptool (Service Discovery Protocol tool):<br />
<code>sdptool search dun<br />
Service Name: Dial-Up Networking<br />
Service RecHandle: 0x1001e<br />
Service Class ID List:<br />
"Dialup Networking" (0x1103)<br />
Protocol Descriptor List:<br />
"L2CAP" (0x0100)<br />
"RFCOMM" (0x0003)<br />
<strong>Channel: 2</strong><br />
Language Base Attr List:<br />
code_ISO639: 0x454e<br />
encoding:    0x6a<br />
base_offset: 0x100<br />
Profile Descriptor List:<br />
"Dialup Networking" (0x1103)<br />
Version: 0x0100</code></p>
<p>Note the &#8220;Channel: 2&#8243; which show which channel to bind.</p>
<p>Then to bind the channel (in this case #2) to one of the rfcomm devices (for example, rfcomm0):<br />
<code>rfcomm bind 0 11:22:BE:EF:44:33 2</code><br />
You can see the binding with:<br />
<code>rfcomm<br />
rfcomm0: 11:22:BE:EF:44:33 channel 2 clean</code><br />
You might find you need to reset the bind and restart it every now and then (especially failed connection attempts)<br />
<code>rfcomm release 0<br />
rfcomm bind 0 11:22:BE:EF:44:33 2</code><br />
You can edit the settings in &#8220;/etc/bluetooth/rfcomm.conf,&#8221; set bind to &#8220;yes&#8221; and give the device and channel for rfcomm0.  Then you can put these commands into /etc/init.d/bluetooth and it will automatically bind and release the rfcomm device:<br />
<code># At the end of the "start)" section<br />
rfcomm bind all<br />
# At the beginning of the "stop)" section<br />
rfcomm release all</code><br />
<strong>Start pppd to connect.</strong><br />
Start up pppd.  Command line first, but because we&#8217;ve called it ppp0, you will later be able to do this via the normal ubuntu eee networking menu in the menu bar.<br />
<code>% pppd call ppp0</code><br />
You should now have a <tt>ppp0</tt> interface in your &#8216;ifconfig&#8217; output that is up and running.  The output should look something like this:<br />
<code># pppd call ppp0<br />
Press CTRL-C to close the connection at any stage!<br />
defining PDP context...<br />
rAT<br />
OK<br />
ATH<br />
OK<br />
ATE1<br />
OK<br />
AT+CGDCONT=1,"IP","general.t-mobile.uk","",0,0<br />
OK<br />
waiting for connect...<br />
ATD*99#<br />
CONNECT<br />
Connected.<br />
If the following ppp negotiations fail,<br />
try restarting the phone.<br />
Serial connection established.<br />
using channel 1<br />
Using interface ppp0<br />
Connect: ppp0 &lt;--&gt; /dev/rfcomm0</code></p>
<p>You can hit control-c on the pppd process and it will shut down the connection, then you can release the rfcomm binding.</p>
<p>So&#8230; as I was saying&#8230; It&#8217;s not the easiest thing in the world to get going, but once you&#8217;ve got the hang of it, and set it up once you&#8217;ll have a connection everywhere you go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/mobile-internet-on-the-eee-pc-ubuntu-eee/242/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<georss:point>51.6548576 -0.3982030</georss:point>	</item>
		<item>
		<title>Linux server as a wireless bridge</title>
		<link>http://www.kevinblake.co.uk/linux-server-as-a-wireless-bridge/169/</link>
		<comments>http://www.kevinblake.co.uk/linux-server-as-a-wireless-bridge/169/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 22:05:47 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://www.kevinblake.co.uk/?p=169</guid>
		<description><![CDATA[Since learning the XBox 360 doesn&#8217;t come with a wifi adapter, and that buying such a thing would add another 60 pounds to the cost of the console&#8230; I&#8217;ve been thinking of different ways to get an Internet connection from my high-speed wired network in the living room out to the router way out in [...]]]></description>
			<content:encoded><![CDATA[<p>Since learning the XBox 360 doesn&#8217;t come with a wifi adapter, and that buying such a thing would add another 60 pounds to the cost of the console&#8230; I&#8217;ve been thinking of different ways to get an Internet connection from my high-speed wired network in the living room out to the router way out in the spare room.  For many reasons, it&#8217;s just not practical for me to wire the whole flat.</p>
<p>Most of the solutions I came up with involved things like &#8216;spending money&#8217;, which I&#8217;m slightly adverse to do if I can do it with the existing kit, so these are the really basic steps to turn the existing linux box (with both wireless and wired cards) into a useful bridge.  As usual, don&#8217;t be fooled into thinking this guide is here for anyone else, as much as it&#8217;s here for me when I need to rebuild the machine and I&#8217;ve forgotten it all.  But feel free to leave a comment about how much warmer and fuzzier I&#8217;ve made your life through your use of these &#8220;instructions&#8221;.</p>
<p><strong>The current configuration</strong></p>
<p>Fedora 8 installation<br />
Wireless Ethernet (ath0) card is connected as 192.168.0.8<br />
Wired Ethernet (eth1) card is connected as 192.168.1.8<br />
Named/bind/DNS server already configured and set-up to accept requests on 192.168.1.8<br />
The Xbox will be wired, on 192.168.1.20</p>
<p><strong>Setting up Fedora</strong></p>
<p>Setup the forwarding rules</p>
<p><code>#Outgoing requests<br />
iptables -t nat -A POSTROUTING -s 192.168.1.8/24 -o ath0 -j MASQUERADE<br />
iptables -A FORWARD -s 192.168.1.0/24 -o ath0 -j ACCEPT<br />
iptables -A FORWARD -d 192.168.1.0/24 -m state --state ESTABLISHED,RELATED -i eth1 -j ACCEPT<br />
#Incoming requests (port forwarding)<br />
iptables -t nat -A PREROUTING -p tcp -i ath0 -d 192.168.0.8 --dport 88 -j DNAT --to 192.168.1.20:88<br />
iptables -t nat -A PREROUTING -p tcp -i ath0 -d 192.168.0.8 --dport 3074 -j DNAT --to 192.168.1.20:3074</code></p>
<p>Save your rules so they&#8217;re applied on start-up<br />
<code>sudo iptables-save &gt; /etc/sysconfig/iptables</code></p>
<p>Enable ipv4 port forwarding<br />
<code>nano /etc/sysctl.conf</code><br />
Change this line<br />
<code>net.ipv4.ip_forward = 0</code><br />
to<br />
<code>net.ipv4.ip_forward = 1</code></p>
<p><strong>The client machine / Xbox 360</strong></p>
<p>Now on your client machine (note this will only have a wired connection).<br />
<code>IP Address: 192.168.1.20<br />
Subnet mask: 255.255.255.0<br />
Default Gateway: 192.168.1.8<br />
DNS Server: 192.168.1.8</code></p>
<p>You&#8217;re going to need a DHCP server so that these settings are automatically assigned to the XBox 360.  If don&#8217;t have one for your subnet already, you can set it up through dhcpd.  You&#8217;ll probably want to do something about</p>
<p>Edit /etc/dhcpd.conf</p>
<p><code>ddns-update-style interim;<br />
# HardWired<br />
subnet 192.168.1.0 netmask 255.255.255.0 {<br />
option routers 192.168.1.8;<br />
option domain-name-servers 192.168.1.8;<br />
authoritative;<br />
range 192.168.1.10 192.168.1.20;<br />
}<br />
# Assign a static IP<br />
host xbox {<br />
hardware ethernet 00:45:40:10:FE:12;<br />
fixed-address 192.168.1.20;<br />
}</code></p>
<p>Then restart dhcpd<br />
<code>/etc/rc.d/init.d/dhcpd restart</code></p>
<p><strong>Router</strong></p>
<p>Remember those ports we forwarded on the server?  You&#8217;ll also need to add port forwarding to your router, to forward the same ports (88, 3074) to the Fedora machine on 192.168.0.8.</p>
<p>And that&#8217;s really it.  You should now be able to connect to the Internet without any troubles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinblake.co.uk/linux-server-as-a-wireless-bridge/169/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
