<?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>onvox.net &#187; Linux</title>
	<atom:link href="http://onvox.net/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://onvox.net</link>
	<description></description>
	<lastBuildDate>Wed, 06 Apr 2011 15:46:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>IPv6 addrconf: prefix with wrong length 48</title>
		<link>http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48</link>
		<comments>http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48#comments</comments>
		<pubDate>Mon, 15 Feb 2010 18:03:25 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=176</guid>
		<description><![CDATA[If your hosting provider gives out an entire /48 for every hosted server, your syslog may get overwhelmed with messages concerning the subnet mask: 1 Time(s): [705959.619704] IPv6 addrconf: prefix with wrong length 48 To solve this temporarily you can disable auto-configuration and router advertisements: echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf This seems [...]]]></description>
			<content:encoded><![CDATA[<p>If your hosting provider gives out an entire /48 for every hosted server, your syslog may get overwhelmed with messages concerning the subnet mask:</p>
<pre>1 Time(s): [705959.619704] IPv6 addrconf: prefix with wrong length 48</pre>
<p>To solve this temporarily you can disable auto-configuration and router advertisements:</p>
<pre>
echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf
</pre>
<p>This seems to suppress the annoying log messages on my Ubuntu based environment. If you would like to make this persistent through reboots, add the following lines to <code>/etc/sysctl.conf</code>:</p>
<pre>
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.autoconf = 0
</pre>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/ipv6-addrconf-prefix-with-wrong-length-48/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create 6in4 tunnels in Arch Linux</title>
		<link>http://onvox.net/linux/how-to-create-6in4-tunnels-in-arch-linux</link>
		<comments>http://onvox.net/linux/how-to-create-6in4-tunnels-in-arch-linux#comments</comments>
		<pubDate>Sun, 25 Jan 2009 21:41:16 +0000</pubDate>
		<dc:creator>Andrew Greenwood</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[6in4]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=131</guid>
		<description><![CDATA[Arch Linux uses a BSD-style network interface configuration located in /etc/rc.conf, which can make exotic network configurations interesting, to say the least. The following rc.d script is meant to help remedy the situation by providing a configurable wrapper to sanely manage a 6in4 link interface. This script uses the route2 method; make sure that the [...]]]></description>
			<content:encoded><![CDATA[<p>Arch Linux uses a BSD-style network interface configuration located in <em>/etc/rc.conf</em>, which can make exotic network configurations interesting, to say the least. The following rc.d script is meant to help remedy the situation by providing a configurable wrapper to sanely manage a 6in4 link interface.</p>
<ul>
<li>This script uses the <em>route2</em> method; make sure that the <strong>iproute2</strong> package is installed.</li>
</ul>
<p>As <em>root</em>, write the following rc.d init script to <em>/etc/rc.d/6in4-tunnel</em>:</p>
<pre>#!/bin/bash

### begin user configuration

##############################################
#                                            #
#  Stop this script before you reconfigure!  #
#                                            #
##############################################

# if_name     - interface name that is to be created for the 6in4 link
if_name=6in4

# server_ipv4 - ipv4 address of the server that is providing the 6in4 tunnel
server_ipv4=127.0.0.1

# client_ipv4 - ipv4 address of the client that is receiving the 6in4 tunnel
client_ipv4=127.0.0.1

# client_ipv6 - ipv6 address of the client 6in4 tunnel endpoint
client_ipv6=2001:feed:face:beef::2/64

# link_mtu    - set the mtu for the 6in4 link
link_mtu=1480

# tunnel_ttl  - set the ttl for the 6in4 tunnel
tunnel_ttl=64

### end user configuration

daemon_name=6in4-tunnel

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting $daemon_name daemon"

    ifconfig $if_name &amp;&gt;/dev/null
    if [ $? -eq 0 ]; then
      stat_busy "Interface $if_name already exists"
      stat_fail
      exit 1
    fi

    ip tunnel add $if_name mode sit remote $server_ipv4 local $client_ipv4 ttl $tunnel_ttl
    ip link set $if_name up mtu $link_mtu
    ip addr add $client_ipv6 dev $if_name
    ip route add ::/0 dev $if_name

    add_daemon $daemon_name
    stat_done
    ;;

  stop)
    stat_busy "Stopping $daemon_name daemon"

    ifconfig $if_name &amp;&gt;/dev/null
    if [ $? -ne 0 ]; then
      stat_busy "Interface $if_name does not exist"
      stat_fail
      exit 1
    fi

    ip link set $if_name down
    ip tunnel del $if_name

    rm_daemon $daemon_name
    stat_done
    ;;

  *)
    echo "usage: $0 {start|stop}"
esac
exit 0</pre>
<p>You will need to provide your 6in4 link configuration between the following sections of <em>/etc/rc.d/6in4-tunnel</em>:</p>
<pre>### begin user configuration</pre>
<pre>### end user configuration</pre>
<p>Once <em>/etc/rc.d/6in4-tunnel</em> has been configured properly, give it permission to be executed:</p>
<pre># chmod +x /etc/rc.d/6in4-tunnel</pre>
<p>To create the 6in4 tunnel link and bring up the interface:</p>
<pre># /etc/rc.d/6in4-tunnel start</pre>
<p>To delete the 6in4 tunnel link and remove the interface:</p>
<pre># /etc/rc.d/6in4-tunnel stop</pre>
<p>The following method allows <em>/etc/rc.d/6in4-tunnel</em> to start automatically at system startup.</p>
<dl>
<dd>
<ul>
<li> Verify that the 6in4 tunnel link is configured and working properly before doing this!</li>
</ul>
</dd>
</dl>
<p>As <em>root</em>, insert <em>6in4-tunnel</em> right after <em>network</em> in the <strong>DAEMONS</strong> line of <em>/etc/rc.conf</em>.</p>
<p>After this addition, the <strong>DAEMONS</strong> line in <em>/etc/rc.conf</em> should look something like this:</p>
<pre>...

#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng iptables ip6tables network 6in4-tunnel openntpd ...

...</pre>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-6in4-tunnels-in-arch-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create IPv4 GRE tunnels in Ubuntu</title>
		<link>http://onvox.net/linux/how-to-create-ipv4-gre-tunnels-in-ubuntu</link>
		<comments>http://onvox.net/linux/how-to-create-ipv4-gre-tunnels-in-ubuntu#comments</comments>
		<pubDate>Mon, 19 Jan 2009 06:00:04 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[GRE]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[Tunnels]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=94</guid>
		<description><![CDATA[Here is an easy way to make use of IPv4 GRE tunnels in Ubuntu, or any other Debian based distro. You will need to edit /etc/network/interfaces. Here is a template with the information you will need to add: auto tun1 iface tun1 inet static address &#60;tunnel IP&#62; netmask &#60;tunnel subnet mask&#62; pre-up iptunnel add tun1 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an easy way to make use of IPv4 GRE tunnels in Ubuntu, or any other Debian based distro. You will need to edit <code>/etc/network/interfaces</code>.</p>
<p>Here is a template with the information you will need to add:</p>
<pre>
auto tun1
iface tun1 inet static
    address <strong>&lt;tunnel IP&gt;</strong>
    netmask <strong>&lt;tunnel subnet mask&gt;</strong>
    pre-up iptunnel add tun1 mode gre local <strong>&lt;local IP&gt;</strong> remote <strong>&lt;remote IP&gt;</strong> ttl 255
    up ifconfig tun1 multicast
    pointopoint <strong>&lt;remote tunnel IP&gt;</strong>
    post-down iptunnel del tun1
</pre>
<p>As with the previous post about <a href="http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu">6in4</a> tunnels in Ubuntu, lets take a brief look at each line.</p>
<p><code>auto tun1</code> is used by the /etc/init.d/networking script. Just like the 6in4 tunnel, the auto parameter will instruct the script to automatically start or stop the interface. The script will get called during startup and will bring up this interface automatically. This line is entirely optional and depends on your personal preference.</p>
<p><code>iface tun1 inet static</code> starts the configuration block for a new IPv4 interface. This is the interface of the tunnel we are about to create that will encapsulate traffic destined for the other side of the tunnel.</p>
<p><code>address <strong>&lt;tunnel IP&gt;</strong></code> is the IP address you wish to assign to this machine&#8217;s side of the GRE tunnel.</p>
<p><code>netmask <strong>&lt;tunnel subnet mask&gt;</strong></code> is the subnet mask of the tunnel. I highly suggest using a 255.255.255.252 subnet mask as this tunnel will be point-to-point and there is no reason to waste address space, even if it is private addressing. If you are unfamiliar with how subnet masks are used, please refer to <a href="http://en.wikipedia.org/wiki/Subnetwork">Subnetwork</a> on Wikipedia.</p>
<p><code>pre-up iptunnel add tun1 mode gre local <strong>&lt;local IP&gt;</strong> remote <strong>&lt;remote IP&gt;</strong> ttl 255</code> &#8211; The <code>pre-up</code> parameter tells the init script to run the <code>iptunnel</code> command prior to bringing up the interface. This is where we are actually creating the tunnel and telling it to use GRE mode. <code>&lt;local IP&gt;</code> is this machine&#8217;s IP address of an interface on which you want to run this tunnel. For example, if eth0 had the address of 71.31.47.23, you could set the local IP address above to that address in order to have this tunnel use eth0. <code>&lt;remote IP&gt;</code> is the global IP address where the other side of the tunnel exists. </p>
<p><code>up ifconfig tun1 multicast</code> &#8211; The <code>up</code> parameter tells the init script to run <code>ifconfig tun1 multicast</code> once the interface is up. In this case, we are enabling multicast on this interface. This is particularly useful if you wish to run a routing protocol over this tunnel, such as OSPF.</p>
<p><code>pointopoint <strong>&lt;remote tunnel IP&gt;</strong></code> &#8211; The remote IP here is the IP address of the other side of the GRE tunnel. For example, if your side of the tunnel is 172.31.10.1 and their side is 172.31.10.2, then 172.31.10.2 would be the IP address to specify here.</p>
<p><code>post-down iptunnel del tun1</code> &#8211; Just like <code>pre-up</code>, <code>post-down</code> tells the init script to run this command after the interface has been shutdown. In this case, we are deleting the tunnel we created earlier with the <code>pre-up</code> command.</p>
<p>As with the with the 6in4 tunnel, you can name this tunnel interface something that is more meaningful than <code>tun1</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-ipv4-gre-tunnels-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create 6in4 tunnels in Ubuntu</title>
		<link>http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu</link>
		<comments>http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu#comments</comments>
		<pubDate>Sun, 18 Jan 2009 18:48:35 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[6in4]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://onvox.net/?p=45</guid>
		<description><![CDATA[The simplest way to create a static 6in4 tunnel in Ubuntu, or any other Debian based distro, is to edit /etc/network/interfaces. Here is a template with the information you will need to add: auto tun1 iface tun1 inet6 v4tunnel address &#60;your IPv6 address&#62; netmask 64 ttl 64 endpoint &#60;remote IPv4 tunnel address&#62; up ip link [...]]]></description>
			<content:encoded><![CDATA[<p>The simplest way to create a static <a href="http://en.wikipedia.org/wiki/6in4">6in4</a> tunnel in Ubuntu, or any other Debian based distro, is to edit <code>/etc/network/interfaces</code>.</p>
<p>Here is a template with the information you will need to add:</p>
<pre>auto tun1
iface tun1 inet6 v4tunnel
        address <strong>&lt;your IPv6 address&gt;</strong>
        netmask 64
        ttl 64
        endpoint <strong>&lt;remote IPv4 tunnel address&gt;</strong>
        up ip link set mtu 1280 dev tun1
        up ip route add 2000::/3 dev tun1</pre>
<p>Lets take a brief look at what each line does.</p>
<p><code>auto tun1</code> is used by the <code>/etc/init.d/networking</code> script. The auto parameter will instruct the script to automatically start or stop the interface. The script will get called during startup and will bring up this interface automatically. This line is entirely optional and depends on your personal preference.</p>
<p><code>iface tun1 inet6 v4tunnel</code> starts the configuration block for a 6in4 tunnel. That is, IPv6 traffic encapsulated in IPv4 packets. This is extremely similar to how GRE works with purely IPv4 traffic.</p>
<p><code>address &lt;your IPv6 address&gt;</code> is where you need to specify the IPv6 address assigned to your machine. This is typically ends in ::2.</p>
<p><code>netmask 64</code> specifies the subnet mask for the IPv6 address you entered above. 64 is the smallest recommended subnet (see <a href="http://tools.ietf.org/html/rfc3627">RFC3627</a> for why they no longer use numbers such as 127). 64 is what you should normally expect to use.</p>
<p><code>ttl 64</code> specifies the Time to Live value set for packets sent by your tunnel endpoint. This only affects the IPv4 packet that is used to encapsulate your v6 traffic. It does not change the original IPv6 packet. Time to Live is a number of iterations a packet can live through before it should be discarded. This number is reduced by one on every router it passes enroute to its destination. 64 is used here because it restricts the packet to roughly the same region.</p>
<p>Here is a quick break down of default TTL values:</p>
<ul>
<li>0 &#8211; restricted to same host</li>
<li>1 &#8211; restricted to same subnet</li>
<li>32 &#8211; restricted to same site</li>
<li>64 &#8211; restricted to same region</li>
<li>128 &#8211; restricted to same continent</li>
<li>255 &#8211; unrestricted</li>
</ul>
<p><code>endpoint &lt;remote IPv4 tunnel address&gt;</code> is the IPv4 address to send encapsulated IPv6 traffic to. Your IPv6 provider will provide you with their IPv4 tunnel endpoint address.</p>
<p><code>up ip link set mtu 1280 dev tun1</code>. This statement reconfigures the interface from the default MTU to 1280 bytes. This is desirable to prevent fragmentation because of the IPv6 packet being encapsulated in an IPv4 packet.<br />
<b>NOTE:</b> SixXS seems to use 1280 as their default for tunnels, other providers likely use 1480 (which is default). If you leave this line out of your configuration, it should default to 1480.</p>
<p><code>up ip route add 2000::/3 dev tun1</code>. This last statement adds a default route for all IPv6 traffic to be sent through device <code>tun1</code> which in turn would be encapsulated in an IPv4 packet and sent to the endpoint address of your IPv6 provider which would send it on its way through the IPv6 network.</p>
<p>After you have saved the file, the next step is to up the interface using <strong>ifup tun1</strong> or if you decided to put in the <code>auto tun1</code> line you can restart your networking services using the init script: <strong>/etc/init.d/networking restart</strong>.</p>
<p>One final note. You can name this tunnel interface anything you want. For example, every time <code>tun1</code> was used above it could have been replaced with something more meaningful. For example, in <a href="http://www.sixxs.net/faq/connectivity/?faq=ossetup&amp;os=linuxdebian">SIXXS documentation</a>, they usually call the interface <code>sixxs</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-6in4-tunnels-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create self-signed certificates for use with Apache/SSL</title>
		<link>http://onvox.net/linux/how-to-create-self-signed-certificates-for-use-with-apachessl</link>
		<comments>http://onvox.net/linux/how-to-create-self-signed-certificates-for-use-with-apachessl#comments</comments>
		<pubDate>Sat, 20 Sep 2008 02:07:13 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://dev.onvox.net/?p=5</guid>
		<description><![CDATA[To create a self-signed certificate for use with a webserver such as Apache follow the following steps: Generate a server key: openssl genrsa -aes128 -out server.key 4096 Next, create a certificate signing request with it. This will prompt for several things such as country, state, etc. Make certain that &#8220;Common Name (eg, YOUR name)&#8221; matches [...]]]></description>
			<content:encoded><![CDATA[<p>To create a self-signed certificate for use with a webserver such as Apache follow the following steps:</p>
<p>Generate a server key:</p>
<p><code>openssl genrsa -aes128 -out server.key 4096<br />
</code><br />
Next, create a certificate signing request with it. This will prompt for several things such as country, state, etc. Make certain that &#8220;Common Name (eg, YOUR name)&#8221; matches the fully qualified domain name of your server (or IP address if you do not have one). You may create a challenge password at this point, however it will mean more typing for you.</p>
<p>Create the certificate signing requests:</p>
<p><code>openssl req -new -key server.key -out server.csr</code></p>
<p>Next, sign the certificate signing request. The following example expires the key in 365 days:</p>
<p><code>openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt</code></p>
<p>Now, make a version of the server.key which does not require a password:</p>
<p><code>openssl rsa -in server.key -out server.key.insecure</code><br />
<code>mv server.key server.key.secure</code><br />
<code>mv server.key.insecure server.key</code></p>
<p>Be careful with these files as they are quite sensitive and permissions should set very carefully. Chown them to root (if you are not already root). Some of the sites I have found say that you can chmod 000 them and it does seem to work in my experiments. Root always retains an effective 600 (read) rights on everything.</p>
<p>You now have the following files which are suitable for use on your self-signed certificate site:</p>
<pre>server.crt: The self-signed server certificate
server.csr: Server certificate signing request
server.key: The private server key
            (does not require a password when starting Apache
server.key.secure: The private server key
            (it will require a password when starting Apache)</pre>
<p>NOTE: These instructions have been paraphrased for my use. The original site can be found <a href="http://www.tc.umn.edu/%7Ebrams006/selfsign.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-create-self-signed-certificates-for-use-with-apachessl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable 802.1Q VLAN tagging in Ubuntu</title>
		<link>http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu</link>
		<comments>http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu#comments</comments>
		<pubDate>Thu, 18 Sep 2008 01:59:59 +0000</pubDate>
		<dc:creator>Jonathan Voss</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[802.1Q]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VLAN]]></category>

		<guid isPermaLink="false">http://dev.onvox.net/?p=3</guid>
		<description><![CDATA[To make use of IEEE 802.1Q VLAN tagging capabilities in Ubuntu you must first install the user mode programs for Virtual LAN support: sudo apt-get install vlan Next the 8021q kernel module must be loaded to enable VLAN support on a kernel level: sudo modprobe 8021q A quick review of lsmod will ensure the kernel [...]]]></description>
			<content:encoded><![CDATA[<p>To make use of <a href="http://en.wikipedia.org/wiki/IEEE_802.1Q">IEEE 802.1Q</a> VLAN tagging capabilities in Ubuntu you must first install the user mode programs for <a href="http://en.wikipedia.org/wiki/Vlan">Virtual LAN</a> support:</p>
<p><code>sudo apt-get install vlan</code></p>
<p>Next the <code>8021q</code> kernel module must be loaded to enable VLAN support on a kernel level:</p>
<p><code>sudo modprobe 8021q</code></p>
<p>A quick review of <code>lsmod</code> will ensure the kernel module was loaded:</p>
<p><code>lsmod | grep 8021q</code></p>
<p>The output of the command should look similar to this:</p>
<pre>8021q                  26896  0</pre>
<p>Next we can create a tagged interface  in <code>/etc/network/interfaces</code>. The following example configures eth1 for VLAN 10 to use DHCP to obtain its IP address:</p>
<p><code>iface eth1.10 inet dhcp</code></p>
<p>The new VLAN 10 interface can now be initialized using:</p>
<p><code>ifup eth1.10</code></p>
<p>The usual nomenclature for making your interface come up automatically during the boot process is the same for your existing interfaces, just use <code>eth1.10</code>.</p>
<p>Once the interface is initialized you may want to refer to the following proc locations for configuration information:</p>
<p><code>/proc/net/vlan/config</code><br />
<code>/proc/net/vlan/[vlan-device]</code></p>
]]></content:encoded>
			<wfw:commentRss>http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

