<?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>n00tz.net &#187; port forwarding</title>
	<atom:link href="http://n00tz.net/tag/port-forwarding/feed/" rel="self" type="application/rss+xml" />
	<link>http://n00tz.net</link>
	<description>so you think you&#039;re savvy? reviews.ramblings.references</description>
	<lastBuildDate>Wed, 04 Jan 2012 04:20:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Setting up a Streaming Media Server on Ubuntu 8.04LTS (Hardy Heron)</title>
		<link>http://n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/</link>
		<comments>http://n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 18:59:05 +0000</pubDate>
		<dc:creator>n00tz</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[media server]]></category>
		<category><![CDATA[port forwarding]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[streaming]]></category>
		<category><![CDATA[ubuntu hardy]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vlc]]></category>

		<guid isPermaLink="false">http://www.n00tz.net/?p=17</guid>
		<description><![CDATA[I don&#8217;t fall asleep easily when I&#8217;m on-call so I decided I&#8217;d watch Dexter Season 2. I didn&#8217;t want to download 4.1GBs of xvid/avi&#8217;s from my parents house to my place because it&#8217;s entirely unnecessary to have the videos in two places. So, let me explain how I got a Streaming Media daemon working on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.n00tz.net/wp-content/blog.dir/2/files/vlc-logo.jpg"><img class="alignleft size-medium wp-image-16" src="http://www.n00tz.net/wp-content/blog.dir/2/files/vlc-logo-300x300.jpg" alt="" width="155" height="144" /></a>I don&#8217;t fall asleep easily when I&#8217;m on-call so I decided I&#8217;d watch Dexter Season 2. I didn&#8217;t want to download 4.1GBs of xvid/avi&#8217;s from my parents house to my place because it&#8217;s entirely unnecessary to have the videos in two places. So, let me explain how I got a Streaming Media daemon working on my server.</p>
<p>I did some searching and there wasn&#8217;t anything super awesome out there that would keep me away from using the command line interface of VLC. So, the first step was to install vlc. I also use screen so I can log out of my SSH session and just use the web interface available on VLC, so I&#8217;ll include steps for using screen.</p>
<div class="codeheader">Code:</div>
<div class="code">
<pre style="margin-top: 0pt">sudo apt-get install vlc screen</pre>
</div>
<p>During or after installing vlc, you might as well set up the port forwarding on your router for access to the web interface. Log into your router and open up port 8080 to your server. If you are not trying to stream over the internet or don&#8217;t have a persistant dynamic or static IP address, you can skip this step. Check <a href="http://www.portforward.com/english/routers/port_forwarding/routerindex.htm" target="_blank">http://www.portforward.com/english/routers/port_forwarding/routerindex.htm</a> for information on how to port forward on your router.<span id="more-17"></span></p>
<p>The next step was to get into screen and start the media daemon.</p>
<div class="codeheader">Code:</div>
<div class="code">
<pre style="margin-top: 0pt">screen
 vlc -I http</pre>
</div>
<p>You can then press &#8216;CTRL&#8217;+'A&#8217; followed by pressing &#8216;D&#8217; to detach from your screen instance and log out of your server (this is the glory of screen). You can reconnect to screen later by entering &#8216;screen -r&#8217; at the shell of your server. I use screen for all of my console-based server daemons or anything I want to have run while disconnected from the SSH session I&#8217;m in (HLDS, SRCDS, VLC, &#8216;apt-get upgrade&#8217;, &#8216;tail -f&#8217;).</p>
<p style="text-align: center">Then browse to your server by going to <a href="http://your.server.ip:8080/" target="_blank">http://your.server.ip:8080/</a> . You should be greeted with an html representation of the VLC interface you may be familiar with on your computer. It will look something like this:</p>
<p style="text-align: center"><a href="http://n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/vlc-http-interface/"><img class="aligncenter size-full wp-image-298" src="http://n00tz.net/files/vlc-http-interface1.png" alt="vlc-http-interface" width="321" height="87" /></a></p>
<p>At this point you can toggle the Stream Output by clicking on the icon that has three staggered arrows pointing to the right (on the default theme). From here you want to check the &#8216;UDP&#8217; box enter your external IP and a port (default is port 1234 on VLC UDP client) to use for streaming. This method makes it easiest for connecting the client side for streaming, which in most cases is ideal. If you&#8217;re going to set this up for less savvy users simplifying their end makes it easier on you as the admin, TRUST ME.</p>
<p>Next, open up UDP ports 1234 on the client router forwarding it to the viewing computer again this won&#8217;t be necessary over LAN and won&#8217;t be possible from a NAT&#8217;d server. Start VLC on the client computer and open Network Stream (CTRL+N) and click OK.</p>
<p>Back on the Web Interface, open the file and play it. If you don&#8217;t have any port forwarding or NAT issues, you&#8217;re done!</p>
<p>UNLESS-<br />
The first 2 episodes I have are not encoded with anything special, so I was able to stream them without adding any extra codecs to my server. However, episode 3 needed xvid codecs.</p>
<p>Here&#8217;s the steps to add the &#8220;non-free&#8221; w32codecs:</p>
<div class="codeheader">Code:</div>
<div class="code">
<pre style="margin-top: 0pt">sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list</pre>
<pre style="margin-top: 0pt">sudo apt-get update &amp;&amp; sudo apt-get install medibuntu-keyring &amp;&amp; sudo apt-get update</pre>
<pre style="margin-top: 0pt">sudo apt-get install w32codecs</pre>
</div>
<p>Restart the vlc daemon and you&#8217;ll be able to play xvid (and I assume divx as well).<script type="text/javascript"><!--
google_ad_client = "ca-pub-8560919435827269";
/* Content banner 1 */
google_ad_slot = "4219269169";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
	</channel>
</rss>

