<?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>controlc.de &#187; openvpn</title>
	<atom:link href="http://controlc.de/tag/openvpn/feed/" rel="self" type="application/rss+xml" />
	<link>http://controlc.de</link>
	<description>mehr als nur ein Notizblock</description>
	<lastBuildDate>Fri, 13 Jan 2012 18:37:18 +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>debian &#124; OpenVPN-Server als Standard-Gateway</title>
		<link>http://controlc.de/2010/12/15/debian-openvpn-server-als-standard-gateway/</link>
		<comments>http://controlc.de/2010/12/15/debian-openvpn-server-als-standard-gateway/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 14:04:14 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[netzwerk]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ip_forward]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[opendns]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[redirect gateway]]></category>
		<category><![CDATA[skript]]></category>
		<category><![CDATA[sysctl.conf]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=1899</guid>
		<description><![CDATA[Wie im Artikel OpenVPN-Server einrichten geschrieben soll der auf dem vServer installierte OpenVPN-Server auch als Standard-Gateway für das Notebook auf Auslandsreisen fungieren, um staatliche Restriktionen umgehen zu können. Damit dies funktioniert müssen folgende Konfigurationen gemacht werden: Auf dem OpenVPN-Server muss IP-Forwarding angeschaltet sein sysctl -w net.ipv4.ip_forward=1 bzw. dauerhaft in /etc/sysctl.conf eintragen. Ebenfalls muss das OpenVPN-Netz [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://controlc.de/wp-content/uploads/2010/12/Tunnelblick-Logo.png" class="floatbox" rev="group:1899 caption:`Tunnelblick-Logo`"><img class="aligncenter size-full wp-image-1924" title="Tunnelblick-Logo" src="http://controlc.de/wp-content/uploads/2010/12/Tunnelblick-Logo.png" alt="" width="127" height="127" /></a>Wie im Artikel <a href="http://controlc.de/2009/06/03/debian-openvpn-server-einrichten/">OpenVPN-Server einrichten</a> geschrieben soll der auf dem vServer installierte OpenVPN-Server auch als Standard-Gateway für das Notebook auf Auslandsreisen fungieren, um staatliche Restriktionen umgehen zu können. Damit dies funktioniert müssen folgende Konfigurationen gemacht werden:<span id="more-1899"></span></p>
	<ul>
	<li>Auf dem OpenVPN-Server muss IP-Forwarding angeschaltet sein</li>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">sysctl <span style="color: #660033;">-w</span> net.ipv4.ip_forward=<span style="color: #000000;">1</span></pre></div></div>

	<p>bzw. dauerhaft in <em>/etc/sysctl.conf</em> eintragen.</ul>
	<ul>
	<li>Ebenfalls muss das OpenVPN-Netz beim Übergang ins Internet geNATet werden. Dazu muss eine iptables Regel gesetzt werden. Diese Befehlszeile muss jedesmal ausgeführt werden, wenn OpenVPN gestartet wird, damit es funktioniert. Deswegen wird unter <em>/etc/openvpn/firewall.sh</em> ein Script angelegt, welches folgenden Inhalt hat.</li>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
iptables <span style="color: #660033;">-t</span> nat <span style="color: #660033;">-A</span> POSTROUTING <span style="color: #660033;">-s</span> 10.8.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> <span style="color: #660033;">-o</span> eth0 <span style="color: #660033;">-j</span> MASQUERADE</pre></div></div>

	<p>Und anschließend muß noch in die OpenVPN-Konfigurationsdatei auf dieses Script gezeigt werden.</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">route-up <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>firewall.sh</pre></div></div>

	</ul>
	<p>Dann wird für in die clientspezifische Konfigurationsdatei in <em>/etc/openvpn/ccd</em> folgendes geschrieben:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">push <span style="color: #ff0000;">&quot;redirect-gateway def1&quot;</span>
push <span style="color: #ff0000;">&quot;dhcp-option DNS 208.67.222.222&quot;</span>
push <span style="color: #ff0000;">&quot;dhcp-option DNS 208.67.220.220&quot;</span></pre></div></div>

	<p>Ersteres weist den Client an den OpenVPN-Server als Default-Gateway einzutragen und die nächsten beiden Anweisungen geben dem Client die OpenDNS-Server als DNS-Server.</p>
	<p>Ich habe dafür extra clientspezifische Konfigurationsdateien in <em>/etc/openvpn/ccd </em>abgelegt, damit man zukünftig die Wahl hat.
</p>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2010/12/15/debian-openvpn-server-als-standard-gateway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>openwrt &#124; Backfire und OpenVPN</title>
		<link>http://controlc.de/2010/06/01/openwrt-backfire-und-openvpn/</link>
		<comments>http://controlc.de/2010/06/01/openwrt-backfire-und-openvpn/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 08:14:02 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[openwrt]]></category>
		<category><![CDATA[backfire]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[luci]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[uci]]></category>
		<category><![CDATA[webinterface]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=1700</guid>
		<description><![CDATA[Seit dem 09. April 2010 gibt es eine neue stabile Version von OpenWRT namens Backfire. Ich habe meine selbst kompilierte Firmware letztes Wochenende durch die aktuelle Stable ersetzt. was relativ problemlos ging. Wichtig in dem Zusammenhang war nur folgendes: Ich hatte bei der Aktualisierung über die Weboberfläche anfangs gesagt, das er die Konfigurationsdateien übernehmen sollte, [...]]]></description>
			<content:encoded><![CDATA[	<p style="text-align: center;"><a href="http://controlc.de/wp-content/uploads/2010/01/OpenWrt-OpenVPN-LuCI1.png" class="floatbox" rev="group:1700 caption:`OpenWrt - OpenVPN - LuCI1`"><img class="aligncenter size-full wp-image-1336" title="OpenWrt - OpenVPN - LuCI1" src="http://controlc.de/wp-content/uploads/2010/01/OpenWrt-OpenVPN-LuCI1.png" alt="" width="540" height="314" /></a></p>
	<p>Seit dem 09. April 2010 gibt es eine neue stabile Version von <a href="http://www.openwrt.org/">OpenWRT</a> namens <a href="http://backfire.openwrt.org/10.03/">Backfire</a>. Ich habe meine selbst kompilierte Firmware letztes Wochenende durch die aktuelle Stable ersetzt. was relativ problemlos ging. <span id="more-1700"></span>Wichtig in dem Zusammenhang war nur folgendes: Ich hatte bei der Aktualisierung über die Weboberfläche anfangs gesagt, das er die Konfigurationsdateien übernehmen sollte, was er auch ordentlich tat. Aber ich konnte dann keine weitere Software installieren — die Partition war schon voll. Erst nachdem ich die Werkseinstellungen geladen und den Router neu gestartet hatte, war ein Einspielen von Software möglich.</p>
	<p>Ab der Version Backfire ist es nun möglich die Weboberfläche von OpenVPN direkt zu installieren — leider aber funktioniert die Integration von OpenVPN immer noch nicht so vollautomatisch, wie ich mir das gewünscht hatte. Wer also OpenVPN wie ich auf einem OpenWRT-Router nutzen möchte, für den gelten immer noch die manuellen Anpassungen wie <a href="http://controlc.de/2010/01/24/openwrt-openvpn-mit-weboberflache-unter-openwrt/">hier</a> beschrieben.</p>
	<p>Zuerst muss ein neues Netzwerk-Interface für den VPN-Tunnel angelegt werden:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn=interface
uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn.proto=none
uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn.auto=<span style="color: #000000;">1</span>
uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn.ifname=tun0
uci commit network</pre></div></div>

	<p>Anschließend eine neue Firewall Zone eingerichtet:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci add firewall zone
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.name=vpn
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.forward=ACCEPT
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.input=ACCEPT
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.output=ACCEPT
uci commit</pre></div></div>

	<p>Und abschließend wird definiert, zwischen welchen Firewall Zonen überhaupt Traffic fließen darf.</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci add firewall forwarding
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>forwarding<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.dest=vpn
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>forwarding<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.src=lan
uci commit</pre></div></div>

	<p>Wer mehr darüber erfahren will, was man mit UCI alles anstellen kann, den kann ich nur auf die <a href="http://dev.luci.cyranjo.org/docsrv/index.xml">Befehlsreferenz </a>verweisen.</p>
	<p>Nun fehlen nur noch die Firewall-Einträge</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-A</span> input_rule <span style="color: #660033;">-i</span> tun+ <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> forwarding_rule <span style="color: #660033;">-i</span> tun+ <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> forwarding_rule <span style="color: #660033;">-o</span> tun+ <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> output_rule <span style="color: #660033;">-o</span> tun+ <span style="color: #660033;">-j</span> ACCEPT</pre></div></div>

	<p>dies alles in die Datei <em>/etc/firewall.user</em> eingetragen und schon funktioniert der VPN-Tunnel wie er soll.
</p>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2010/06/01/openwrt-backfire-und-openvpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>openwrt &#124; OpenVPN mit Weboberfläche unter OpenWRT</title>
		<link>http://controlc.de/2010/01/24/openwrt-openvpn-mit-weboberflache-unter-openwrt/</link>
		<comments>http://controlc.de/2010/01/24/openwrt-openvpn-mit-weboberflache-unter-openwrt/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 21:00:57 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[netzwerk]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[kamikaze]]></category>
		<category><![CDATA[luci]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trunk]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=1115</guid>
		<description><![CDATA[Wie ich schon hier und hier geschrieben habe, nutze ich auf meinem Router OpenWRT. Hauptziel meiner anderen Artikel war, aufzuzeigen, wie man sich ein eigenes Image für den Router bauen kann. In diesem Artikel möchte ich nun zeigen, wie man sich ein OpenWRT Image bauen kann mit dem man OpenVPN über eine Weboberfläche konfigurieren und [...]]]></description>
			<content:encoded><![CDATA[	<p style="text-align: center;"><a href="http://controlc.de/wp-content/uploads/2010/01/OpenWrt-OpenVPN-LuCI1.png" class="floatbox" rev="group:1115 caption:`OpenWrt - OpenVPN - LuCI1`"><img class="aligncenter size-full wp-image-1336" title="OpenWrt - OpenVPN - LuCI1" src="http://controlc.de/wp-content/uploads/2010/01/OpenWrt-OpenVPN-LuCI1.png" alt="" width="540" height="314" /></a></p>
	<p>Wie ich schon <a href="http://controlc.de/2009/09/26/debian-openwrt-und-eigenes-image-bauen/">hier</a> und <a href="http://controlc.de/2010/01/20/openwrt-openwrt-als-vm/">hier</a> geschrieben habe, nutze ich auf meinem Router OpenWRT. Hauptziel meiner anderen Artikel war, aufzuzeigen, wie man sich ein eigenes Image für den Router bauen kann. In diesem Artikel möchte ich nun zeigen, wie man sich ein OpenWRT Image bauen kann mit dem man OpenVPN über eine Weboberfläche konfigurieren und steuern kann.</p>
	<p><span id="more-1115"></span>Auf dem Host-System, auf dem man das Image kompiliert, muss man nach</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> menuconfig</pre></div></div>

	<p>zuerst das richtige Paket installieren</p>
	<p><a href="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-make-menuconfig-LuCI.png" class="floatbox" rev="group:1115 caption:`OpenWRT - make menuconfig - LuCI`"><img class="aligncenter size-medium wp-image-1305" title="OpenWRT - make menuconfig - LuCI" src="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-make-menuconfig-LuCI-300x250.png" alt="" width="300" height="250" /></a><a href="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-make-menuconfig-LuCI-components.png" class="floatbox" rev="group:1115 caption:`OpenWRT - make menuconfig - LuCI components`"><img class="aligncenter size-medium wp-image-1308" title="OpenWRT - make menuconfig - LuCI components" src="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-make-menuconfig-LuCI-components-300x258.png" alt="" width="300" height="258" /></a><a href="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-make-menuconfig-LuCI-OpenVPN.png" class="floatbox" rev="group:1115 caption:`OpenWRT - make menuconfig - LuCI OpenVPN`"><img class="aligncenter size-medium wp-image-1309" title="OpenWRT - make menuconfig - LuCI OpenVPN" src="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-make-menuconfig-LuCI-OpenVPN-300x253.png" alt="" width="300" height="253" /></a>Nach dem das Image wie in dem Artikel <a href="http://controlc.de/2009/09/26/debian-openwrt-und-eigenes-image-bauen/">OpenWRT und eigenes Image bauen</a> kompiliert ist und das Image auf dem Router installiert wurde, kann man über die Weboberfläche auf den Router zugreifen.</p>
	<p>Im Administrations-Menü unter <em>Services</em> findet man den Menüpunkt <em>openvpn</em>.</p>
	<p><a href="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-LuCI-OpenVPN.png" class="floatbox" rev="group:1115 caption:`OpenWRT - LuCI OpenVPN`"><img class="aligncenter size-medium wp-image-1310" title="OpenWRT - LuCI OpenVPN" src="http://controlc.de/wp-content/uploads/2009/12/OpenWRT-LuCI-OpenVPN-300x161.png" alt="" width="300" height="161" /></a>Ich denke, die Weboberfläche ist selbsterklärend und werde deswegen nicht näher darauf eingehen. Hier kann man die Konfiguration seines VPN-Tunnels vornehmen — egal ob der Router als VPN-Server oder VPN-Client fungieren soll. Nachdem man seine OpenVPN Konfiguration zusammengestellt hat und den VPN Tunnel aufbaut, wird man feststellen, das es noch nicht richtig funktioniert. Es fehlen noch einige kleine Details, damit man auf das hinter dem OpenVPN-Router liegende Netzwerk zugreifen kann, da zur Zeit die Firewall das VPN-Netz noch nicht kennt.</p>
	<p>Zuerst muss ein neues Netzwerk-Interface für den VPN-Tunnel angelegt werden:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn=interface
uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn.proto=none
uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn.auto=<span style="color: #000000;">1</span>
uci <span style="color: #000000; font-weight: bold;">set</span> network.vpn.ifname=tun0
uci commit network</pre></div></div>

	<p>Anschließend eine neue Firewall Zone eingerichtet:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci add firewall zone
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.name=vpn
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.forward=ACCEPT
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.input=ACCEPT
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>zone<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.output=ACCEPT
uci commit</pre></div></div>

	<p>Und abschließend wird definiert, zwischen welchen Firewall Zonen überhaupt Traffic fließen darf.</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci add firewall forwarding
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>forwarding<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.dest=vpn
uci <span style="color: #000000; font-weight: bold;">set</span> firewall.<span style="color: #000000; font-weight: bold;">@</span>forwarding<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.src=lan
uci commit</pre></div></div>

	<p>Wer mehr darüber erfahren will, was man mit UCI alles anstellen kann, den kann ich nur auf die <a href="http://dev.luci.cyranjo.org/docsrv/index.xml">Befehlsreferenz </a>verweisen.</p>
	<p>Nun fehlen nur noch die Firewall-Einträge</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-A</span> input_rule <span style="color: #660033;">-i</span> tun+ <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> forwarding_rule <span style="color: #660033;">-i</span> tun+ <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> forwarding_rule <span style="color: #660033;">-o</span> tun+ <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> output_rule <span style="color: #660033;">-o</span> tun+ <span style="color: #660033;">-j</span> ACCEPT</pre></div></div>

	<p>dies alles in die Datei <em>/etc/firewall.user</em> eingetragen und schon funktioniert der VPN-Tunnel wie er soll.</p>
	<p><strong>Konntet Ihr das nachvollziehen? Was ist möglicherweise noch unklar? Habt Ihr Verbesserungsvorschläge? Dann nutzt bitte die Kommentarfunktion.</strong>
</p>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2010/01/24/openwrt-openvpn-mit-weboberflache-unter-openwrt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>openwrt &#124; OpenWRT als VM</title>
		<link>http://controlc.de/2010/01/20/openwrt-openwrt-als-vm/</link>
		<comments>http://controlc.de/2010/01/20/openwrt-openwrt-als-vm/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 19:57:34 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[netzwerk]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[kamikaze]]></category>
		<category><![CDATA[luci]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trunk]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmware fusion]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=1173</guid>
		<description><![CDATA[Wie ich schon geschrieben hatte, bin ich ein Fan des OpenWRT-Projektes. Um die Neuerungen schneller nutzen zu können, wie zum Beispiel die Weboberfläche für OpenVPN, kompiliere ich mir in unregelmäßigen Abständen selbst eine neue Firmware um diese auf meinen ASUS-Router auszuprobieren. Ich habe aber leider nur den einen Router und mit dem Flashen und anschließendem [...]]]></description>
			<content:encoded><![CDATA[	<p style="text-align: center;"><a href="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-als-Virtuelle-Maschine.png" class="floatbox" rev="group:1173 caption:`OpenWRT als Virtuelle Maschine`"><img class="aligncenter size-full wp-image-1223" title="OpenWRT als Virtuelle Maschine" src="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-als-Virtuelle-Maschine.png" alt="" width="512" height="382" /></a></p>
	<p>Wie ich schon <a href="http://controlc.de/2009/09/26/debian-openwrt-und-eigenes-image-bauen/">geschrieben</a> hatte, bin ich ein Fan des <a href="http://www.openwrt.org/">OpenWRT-Projektes</a>. Um die Neuerungen schneller nutzen zu können, wie zum Beispiel die Weboberfläche für <a href="http://www.openvpn.net/">OpenVPN</a>, kompiliere ich mir in unregelmäßigen Abständen selbst eine neue Firmware um diese auf meinen <a href="http://de.asus.com/products.aspx?l1=29&amp;l2=172&amp;l3=743&amp;l4=59&amp;model=1121&amp;modelmenu=1">ASUS-Router </a>auszuprobieren. Ich habe aber leider nur den einen Router und mit dem Flashen und anschließendem Neukonfigurieren ist natürlich auch meine Internetleitung tot. Da man OpenWRT nicht nur auf kleinen Hardware-Routern sondern z.B. auch auf x86-Plattformen laufen lassen kann, probiere ich gerade mal aus was man machen muss um OpenWRT als virtuelle Maschine laufen zu lassen.<span id="more-1173"></span></p>
	<p>Zuerst muss man auf der Maschine, die die Firmware kompiliert, neben den schon beschrieben Voraussetzungen noch die Programme nachinstallieren, die nach der fertigen Kompilierung der Pakete diese als fertiges VM-Image zusammenbauen. Es gibt folgende Image-Versionen, die gebaut werden können:</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-make-menuconfig-VDI-oder-VMDK.png" class="floatbox" rev="group:1173 caption:`OpenWRT - make menuconfig - VDI oder VMDK`"><img class="aligncenter size-full wp-image-1221" title="OpenWRT - make menuconfig - VDI oder VMDK" src="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-make-menuconfig-VDI-oder-VMDK.png" alt="" width="474" height="34" /></a></p>
	<p>Soll das fertige Image in <a href="http://www.virtualbox.org/">VirtualBox</a> laufen, dann muss folgendes gemacht werden:</p>
	<p>Neue Quelle für APT/Aptitude</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;deb http://download.virtualbox.org/virtualbox/debian lenny non-free&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></div></div>

	<p>Herunterladen des public keys</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-q</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.virtualbox.org<span style="color: #000000; font-weight: bold;">/</span>virtualbox<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span>sun_vbox.asc <span style="color: #660033;">-O-</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">apt-key</span> add -</pre></div></div>

	<p>Aktualisieren der Paketliste</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> update</pre></div></div>

	<p>Installieren von VirtualBox</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> virtualbox</pre></div></div>

	<p><strong>Aber Achtung: Bei einem frischen Debian Lenny wurden 171MB heruntergeladen, da viele zusätzliche Pakete benötigt wurden. </strong></p>
	<p>Soll das spätere Image unter <a href="http://www.vmware.com/de/">VMware</a> laufen dann muss <a href="http://www.qemu.org/about.html">Qemu</a> installiert werden:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> qemu</pre></div></div>

	<p>Nun kann mit</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> menuconfig</pre></div></div>

	<p>sich wie gewünscht das Firmware Image zusammenbauen.</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-make-menuconfig-Menue.png" class="floatbox" rev="group:1173 caption:`OpenWRT - make menuconfig - Menue`"><img class="aligncenter size-medium wp-image-1231" title="OpenWRT - make menuconfig - Menue" src="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-make-menuconfig-Menue-238x300.png" alt="" width="238" height="300" /></a>Am Besten arbeitet man sich von oben nach unten.</p>
	<p>Als <em>target system</em> wählt man <em>x86</em> aus, <em>subtarget</em> und <em>target profile</em> bleiben auf <em>Generic</em>. Bei <em>target images</em> muss man sich entscheiden, wofür man das Image braucht: VMware oder VirtualBox.</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-make-menuconfig-Target-Images.png" class="floatbox" rev="group:1173 caption:`OpenWRT - make menuconfig - Target Images`"><img class="aligncenter size-medium wp-image-1232" title="OpenWRT - make menuconfig - Target Images" src="http://controlc.de/wp-content/uploads/2010/01/OpenWRT-make-menuconfig-Target-Images-234x300.png" alt="" width="234" height="300" /></a></p>
	<p>Anschließend müssen noch die OpenWRT-Pakete ausgewählt und beim Beenden des Programms die Konfiguration gespeichert werden. Danach</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

	<p>ausgeführt. Nach einer langen Zeit liegt im Unterverzeichnis <em>bin</em> eine Verzeichnis mit dem x86-Image. Dieses Image kann man sich auf seinen Rechner kopieren. Wie man eine virtuelle Maschine für OpenWRT zu erstellt möchte ich am Beispiel von VMware Fusion zeigen.</p>
	<p>Mit dem Erstellen einer neuen VM öffnet sich der Assistent</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-1.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - OpenWRT - 1`"><img class="aligncenter size-medium wp-image-1239" title="VMware Fusion - OpenWRT - 1" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-1-300x227.png" alt="" width="300" height="227" /></a>Mit dem Fortfahren »Ohne Datenträger« öffnet sich eine Dialog zur Auswahl des gerade kompilierten Images</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-2.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - OpenWRT - 2`"><img class="aligncenter size-medium wp-image-1240" title="VMware Fusion - OpenWRT - 2" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-2-300x231.png" alt="" width="300" height="231" /></a>Als Nächstes gibt man das zu installierende Betriebssystem an</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-3.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - OpenWRT - 3`"><img class="aligncenter size-medium wp-image-1241" title="VMware Fusion - OpenWRT - 3" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-3-300x231.png" alt="" width="300" height="231" /></a>Anschließend kann man die Einstellungen der VM noch anpassen.</p>
	<h4>RAM</h4>
	<p>allzu viel RAM braucht OpenWRT nicht und man möchte es ja so reel wie möglich machen.</p>
	<h4><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-5.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - OpenWRT - 5`"><img class="aligncenter size-medium wp-image-1243" title="VMware Fusion - OpenWRT - 5" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-5-300x194.png" alt="" width="300" height="194" /></a>Netzwerkkarten</h4>
	<p>Hier kommt es auf die Reihenfolge an, da OpenWRT die erste Netzwerkkarte als <em>eth0</em> für LAN und die zweite als <em>eth1</em> für WAN nimmt.</p>
	<p style="text-align: left;"><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-Network.png" class="floatbox" rev="group:1173"></a><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-6.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - OpenWRT - 6`"><img class="size-medium wp-image-1244 aligncenter" title="VMware Fusion - OpenWRT - 6" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-6-300x209.png" alt="" width="300" height="209" /></a>Je nach Reihenfolge sieht die Zuordnung wie folgt aus:</p>
	<p style="text-align: center;"><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-Netzwerkkarten-und-Zuordnung-1.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - Netzwerkkarten und Zuordnung 1`"><img class="alignnone size-medium wp-image-1280" title="VMware Fusion - Netzwerkkarten und Zuordnung 1" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-Netzwerkkarten-und-Zuordnung-1-288x300.png" alt="" width="259" height="270" /></a><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-Netzwerkkarten-und-Zuordnung-2.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - Netzwerkkarten und Zuordnung 2`"><img class="alignnone size-medium wp-image-1281" title="VMware Fusion - Netzwerkkarten und Zuordnung 2" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-Netzwerkkarten-und-Zuordnung-2-287x300.png" alt="" width="258" height="270" /></a></p>
	<p>Meine VM sieht abschließend so aus</p>
	<p><a href="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-7.png" class="floatbox" rev="group:1173 caption:`VMware Fusion - OpenWRT - 7`"><img class="aligncenter size-medium wp-image-1245" title="VMware Fusion - OpenWRT - 7" src="http://controlc.de/wp-content/uploads/2010/01/VMware-Fusion-OpenWRT-7-300x170.png" alt="" width="300" height="170" /></a>Nun kann man die VM das erste Mal starten.</p>
	<p>Nun muss zuerst die Netzwerkkonfiguration vorgenommen werden:</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">uci delete network.lan.ipaddr
&nbsp;
uci delete network.lan.netmask
&nbsp;
uci <span style="color: #000000; font-weight: bold;">set</span> network.lan.proto=dhcp
&nbsp;
uci commit network</pre></div></div>

	<p>Nun kann man vom Host-Computer aus auf die OpenWRT-VM zugreifen.
</p>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2010/01/20/openwrt-openwrt-als-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>debian &#124; OpenWRT und eigenes Image bauen</title>
		<link>http://controlc.de/2009/09/26/debian-openwrt-und-eigenes-image-bauen/</link>
		<comments>http://controlc.de/2009/09/26/debian-openwrt-und-eigenes-image-bauen/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 15:58:39 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[netzwerk]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[kamikaze]]></category>
		<category><![CDATA[luci]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trunk]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=873</guid>
		<description><![CDATA[Ich nutze schon seit Jahren Router, die ich mit der alternativen Firmware OpenWRT betreibe. Mir geht es dabei nicht darum, das ich den Herstellern misstraue, sondern primär darum, das mir OpenWRT die Möglichkeit lässt selbst zu entscheiden, welche Dienste ich auf dem Router anbieten will und welche nicht. Dazu kommt, das die Firewall deutlich besser [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://controlc.de/wp-content/uploads/2009/09/openwrt-logo.png" class="floatbox" rev="group:873 caption:`openwrt-logo`"><img class="aligncenter size-medium wp-image-882" title="openwrt-logo" src="http://controlc.de/wp-content/uploads/2009/09/openwrt-logo-300x76.png" alt="openwrt-logo" width="300" height="76" /></a></p>
	<p>Ich nutze schon seit Jahren Router, die ich mit der alternativen Firmware <a href="http://openwrt.org/">OpenWRT</a> betreibe. Mir geht es dabei nicht darum, das ich den Herstellern misstraue, sondern primär darum, das mir OpenWRT die Möglichkeit lässt selbst zu entscheiden, welche Dienste ich auf dem Router anbieten will und welche nicht. Dazu kommt, das die Firewall deutlich besser konfigurierbar ist und das ich mich per SSH auf den Router und über darüber gesetzte Tunnel auch auf das Netzwerk dahinter Zugriff habe. Davon einmal ganz abgesehen ist es natürlich auch gut zu wissen, das die Macher hinter OpenWRT Sicherheitslöcher stopfen — ein Verhalten, was man sich von den Hardware-Herstellern wünschen würde. Ich bin bis dato immer gut mit den Routern der Firma ASUS gefahren — zuerst hatte ich einen <a href="http://de.asus.com/products.aspx?l1=12&amp;l2=43&amp;l3=0&amp;l4=0&amp;model=359&amp;modelmenu=1">Asus WL-500g Deluxe</a>, später einen <a href="http://de.asus.com/products.aspx?l1=29&amp;l2=172&amp;l3=743&amp;l4=59&amp;model=1121&amp;modelmenu=1">Asus WL-500g Premium</a>. Der Vorteil dieser Router: Sie haben zwei USB 2.0-Ports — da kann man z.B. Festplatten dranhängen und diese als Netzwerkplatten freigeben.</p>
	<p>Aber zurück zu OpenWRT: Mit der neuesten Version von <a href="http://kamikaze.openwrt.org/8.09.1/">OpenWRT Kamikaze 8.09.1</a> ist aber über die Weboberfläche LuCI keine Steuerungs– und Konfigurationsmöglichkeit von <a href="http://www.openvpn.net/index.php/open-source.html">OpenVPN</a> möglich. Deswegen kann aus dem OpenWRT-Forum der Tipp, es mit der Trunk-Version von OpenWRT zu probieren. Da es diese Versionen aber nicht als fertiges Image gibt, muss man diese selbst kompilieren.<span id="more-873"></span></p>
	<p>Dazu habe ich mir in einer VM ein frisches <a href="http://www.debian.org/">Debian Lenny</a> aufgesetzt und mit</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential mercurial subversion <span style="color: #c20cb9; font-weight: bold;">cvs</span> zlib1g-dev <span style="color: #c20cb9; font-weight: bold;">gawk</span> <span style="color: #c20cb9; font-weight: bold;">bison</span> <span style="color: #c20cb9; font-weight: bold;">flex</span> libncurses5-dev <span style="color: #c20cb9; font-weight: bold;">unzip</span></pre></div></div>

	<p>die Basis geschaffen.</p>
	<p><strong>Update: Also entweder hat noch nie jemand versucht meine Anleitung nachzuvollziehen, Ihr wart zu faul was zu schreiben oder aber Ihr hattet schon fertige Debian-Installationen — in der Aufzählung der benötigten Pakete fehlte noch <em>unzip</em>. Ich habe die Befehlszeile mal vervollständigt.</strong></p>
	<p>Anschließend legt man sich am besten ein neues Unterverzeichnis an</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> openwrt</pre></div></div>

	<p>und wechselt in dieses Verzeichnis</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> openwrt</pre></div></div>

	<p>Jetzt kann man sich die OpenWRT-Dateien herunterladen</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.openwrt.org<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span> .</pre></div></div>

	<p>Wichtig dabei ist, das man dies alles als normaler Nutzer macht — nicht als <em>root</em>.</p>
	<p>Da die LuCI-Weboberfläche für OpenVPN nur in den Trunk-Paketen ist, müssen die Quellen für die Pakete noch angepasst werden</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;src-svn packages svn://svn.openwrt.org/openwrt/packages&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> feeds.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;src-svn luci http://svn.luci.subsignal.org/luci/trunk/contrib/package&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> feeds.conf</pre></div></div>

	<p>Jetzt noch die Paketliste aktualisieren</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>feeds update</pre></div></div>

	<p>Und die Pakete für LuCI einbinden</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>feeds <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-a</span> <span style="color: #660033;">-p</span> luci</pre></div></div>

	<p>Und schon kann man mit</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> menuconfig</pre></div></div>

	<p>das Image vorbereiten — sprich die Auswahl machen, was alles in das Image hinein soll.</p>
	<p>Abschließend ein</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

	<p>und nach ewig langer Zeit liegt ein Imagefile in dem Unterverzeichnis <em>bin</em>, welches geflasht werden möchte.</p>
	<h4>Links</h4>
	<p><a href="http://openwrt.org/">http://openwrt.org/</a></p>
	<p><a href="http://de.asus.com/products.aspx?l1=29&amp;l2=172&amp;l3=743&amp;l4=59&amp;model=1121&amp;modelmenu=1">http://de.asus.com/products.aspx?l1=29&amp;l2=172&amp;l3=743&amp;l4=59&amp;model=1121&amp;modelmenu=1</a></p>
	<p><a href="http://de.asus.com/products.aspx?l1=12&amp;l2=43&amp;l3=0&amp;l4=0&amp;model=359&amp;modelmenu=1">http://de.asus.com/products.aspx?l1=12&amp;l2=43&amp;l3=0&amp;l4=0&amp;model=359&amp;modelmenu=1</a></p>
	<p><a href="http://kamikaze.openwrt.org/8.09.1/">http://kamikaze.openwrt.org/8.09.1/</a></p>
	<p><a href="http://www.openvpn.net/index.php/open-source.html">http://www.openvpn.net/index.php/open-source.html</a></p>
	<p><a href="https://forum.openwrt.org/viewtopic.php?pid=94844#p94844">https://forum.openwrt.org/viewtopic.php?pid=94844#p94844</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2009/09/26/debian-openwrt-und-eigenes-image-bauen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mac &#124; OpenVPN und Tunnelblick</title>
		<link>http://controlc.de/2009/06/09/mac-openvpn-und-tunnelblick/</link>
		<comments>http://controlc.de/2009/06/09/mac-openvpn-und-tunnelblick/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 20:42:07 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tunnelblick]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=579</guid>
		<description><![CDATA[Wie im OpenVPN-Server-Beitrag geschrieben, möchte ich, wenn ich unterwegs bin, eine gesicherte Verbindung von meinem Macbook zum Server herstellen. Das mache ich mit der Software Tunnelblick. Nach dem Download, dem Mounten des Images und dem obligatorischen Drag and Drop des Programms in den Application-Ordner kann man das Tool schon starten. Nach dem Start kommt eine [...]]]></description>
			<content:encoded><![CDATA[	<p>Wie im <a href="http://controlc.de/2009/06/03/debian-openvpn-server-einrichten/">OpenVPN-Server-Beitrag</a> geschrieben, möchte ich, wenn ich unterwegs bin, eine gesicherte Verbindung von meinem Macbook zum Server herstellen. Das  mache ich mit der Software <a href="http://code.google.com/p/tunnelblick/">Tunnelblick</a>.</p>
	<p>Nach dem Download, dem Mounten des Images und dem obligatorischen Drag and Drop des Programms in den Application-Ordner kann man das Tool schon starten. Nach dem Start kommt eine Warnung</p>
	<p><a href="http://controlc.de/wp-content/uploads/2009/06/tunnelblick-1-startmeldung.png" class="floatbox" rev="group:579 caption:`tunnelblick-1-startmeldung`"><img class="aligncenter size-medium wp-image-601" title="tunnelblick-1-startmeldung" src="http://controlc.de/wp-content/uploads/2009/06/tunnelblick-1-startmeldung-300x125.png" alt="tunnelblick-1-startmeldung" width="300" height="125" /></a></p>
	<p><span id="more-579"></span>Es existieren keine Konfigurationsdateien im Pfad <code>~/Library/openvpn</code>. Wenn man das Angebot von Tunnelblick annimmt (was man tun sollte), dann öffnet sich automatisch Textedit mit einer Beispielkonfigurationsdatei</p>
	<p><a href="http://controlc.de/wp-content/uploads/2009/06/tunnelblick-2-konfig-datei.png" class="floatbox" rev="group:579 caption:`tunnelblick-2-konfig-datei`"><img class="aligncenter size-medium wp-image-602" title="tunnelblick-2-konfig-datei" src="http://controlc.de/wp-content/uploads/2009/06/tunnelblick-2-konfig-datei-300x214.png" alt="tunnelblick-2-konfig-datei" width="300" height="214" /></a></p>
	<p>Die editierte Datei sollte folgenden Inhalt haben</p>
	<blockquote>
	<pre>##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server.     #
#                                            #
# This configuration can be used by multiple #
# clients, however each client should have   #
# its own cert and key files.                #
#                                            #
# On Windows, you might want to rename this  #
# file so it has a .ovpn extension           #
##############################################
	
# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client
	
# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun
	
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.  On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap
	
# Are we connecting to a TCP or
# UDP server?  Use the same setting as
# on the server.
;proto tcp
proto udp
	
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
<span style=\"color: #ff0000;\">remote vpn.domain.de 1194</span>
;remote my-server-2 1194
	
# Choose a random host from the remote
# list for load-balancing.  Otherwise
# try hosts in the order specified.
;remote-random
	
# Keep trying indefinitely to resolve the
# host name of the OpenVPN server.  Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite
	
# Most clients don't need to bind to
# a specific local port number.
nobind
	
# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody
	
# Try to preserve some state across restarts.
persist-key
persist-tun
	
# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here.  See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
	
# Wireless networks often produce a lot
# of duplicate packets.  Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings
	
# SSL/TLS parms.
# See the server config file for more
# description.  It's best to use
# a separate .crt/.key file pair
# for each client.  A single ca
# file can be used for all clients.
<span style=\"color: #ff0000;\">ca vpn.domain.de/cacert.pem
cert vpn.domain.de/client1-cert.pem
key vpn.domain.de/client1-key.pem</span>
	
# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to \"server\".  This is an
# important precaution to protect against
# a potential attack discussed here:
#  http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to \"server\".  The build-key-server
# script in the easy-rsa folder will do this.
;ns-cert-type server
	
# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1
	
# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x
	
# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
comp-lzo
	
# Set log file verbosity.
verb 3
	
# Silence repeating messages
;mute 20</pre>
	</blockquote>
	<p>Anschließend legt man unter <code>~/Library/openvpn</code> einen Unterordner für die Zertifikatdateien an — ich habe ihn <code>vpn.domain.de</code> genannt. Dahinein kopiert man das öffentliche Zertifikat der CA und das private und öffentliche Schlüsselpaar des Clients, welches vorher auf dem Server generiert wurde — als Kopierprogramm vom Server auf das Macbook bietet sich <a href="http://cyberduck.ch">Cyberduck</a> an.</p>
	<p>Anschließend kann man die Verbindung starten.</p>
	<p>Möchte man mehr über das zusätzliche private Netzwerk wissen, so kann man das Terminal benutzen:</p>
	<p>Nach einem Aufbau des Tunnels kann man mit</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-nr</span></pre></div></div>

	<p>sich die aktuelle Routing-Tabelle anzeigen lassen.</p>
	<blockquote>
	<pre>$ netstat -nr
Routing tables
	
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.1        UGSc       14       39    en0
<a class=\"linkification-ext\" title=\"Linkification: http://10.8.0.1/32\" href=\"http://10.8.0.1/32\">10.8.0.1/32</a>        10.8.0.5           UGSc        0        0   tun0
10.8.0.5           10.8.0.6           UH          1        0   tun0
127                127.0.0.1          UCS         0        0    lo0
127.0.0.1          127.0.0.1          UH          7        0    lo0
169.254            link#4             UCS         0        0    en0
192.168.1          link#4             UCS         4        0    en0
192.168.1.1        0:10:10:10:10:10   UHLW       35        0    en0   1165
192.168.1.2        127.0.0.1          UHS         0        0    lo0
192.168.1.255      link#4             UHLWb       3        0    en0</pre>
	</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2009/06/09/mac-openvpn-und-tunnelblick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>debian &#124; OpenVPN-Server einrichten</title>
		<link>http://controlc.de/2009/06/03/debian-openvpn-server-einrichten/</link>
		<comments>http://controlc.de/2009/06/03/debian-openvpn-server-einrichten/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 22:33:29 +0000</pubDate>
		<dc:creator>controlc.de</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[netzwerk]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[zertifikate]]></category>

		<guid isPermaLink="false">http://controlc.de/?p=554</guid>
		<description><![CDATA[VPN-Server sind ne tolle Geschichte, da man damit verschiedenste Dinge erledigen kann: abgesicherte Kommunikation exklusive und vertraute Verbindungen Umgehung von providerabhängigen Gängeleien Neben dem reinen Interesse an der Technik möchte ich folgendes davon erreichen: Über den VPN-Tunnel soll mein Heim-Exchange seine Mails an das Mail-Gateway absetzen können — dabei kann ich die spezielle smtpd-Instanz mit [...]]]></description>
			<content:encoded><![CDATA[	<p>VPN-Server sind ne tolle Geschichte, da man damit verschiedenste Dinge erledigen kann:</p>
	<ul>
	<li>abgesicherte Kommunikation</li>
	<li>exklusive und vertraute Verbindungen</li>
	<li>Umgehung von providerabhängigen Gängeleien</li>
	</ul>
	<p>Neben dem reinen Interesse an der Technik möchte ich folgendes davon erreichen:</p>
	<ul>
	<li>Über den VPN-Tunnel soll mein Heim-Exchange seine Mails an das Mail-Gateway absetzen können — dabei kann ich die spezielle smtpd-Instanz mit weniger Restriktionen laufen lassen (z.B. keine Überprüfung auf Viren und Spam)</li>
	<li>wenn ich das nächste Mail in China bin möchte ich über den VPN-Tunnel ohne Einschränkungen im Internet unterwegs sein können</li>
	</ul>
	<p>Aber nun zur Einrichtung: <span id="more-554"></span></p>
	<h2>Vorbereitung</h2>
	<p>Zuerst müssen wir die Pakete <em>openvpn</em> (klar, was sonst) und <em>udev </em>installieren. <em>udev</em> benötigen wir, damit das Erstellen des virtuellen Interface dynamisch erfolgt.</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> udev openvpn</pre></div></div>

	<p>Damit man über den Server eine Verbindung ins Internet aufbauen kann muß man noch das IP-Forwarding einschalten. Dazu editiert man die Datei <code>/etc/sysctl.conf</code> und aktiviert den Eintrag  <code>net.ipv4.ip_forward = 1</code></p>
	<h2>Zertifikate erstellen</h2>
	<p>Wir benötigen für OpenVPN Zertifikate, d.h. eine bestehende CA und müssen dann weitere Clientzertifikate erstellen. Zuerst aber müssen wir einen sogenannten Diffie-Hellman Parameter erzeugen. Dieser wird, laut dem <a href="http://wiki.openvpn.eu/index.php/Erzeugen_einer_PKI_mit_EasyRSA#Diffie-Hellman_Parameter_erzeugen">OpenVPN.eu-Wiki</a>, »vom OpenVPN Server verwendet um bei vielen gleichzeitigen Clientverbindungen den TLS-Handshake zu beschleunigen.«</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #666666; font-style: italic;"># openssl dhparam -out dh1024.pem 1024</span>
Generating DH parameters, <span style="color: #000000;">1024</span> bit long safe prime, generator <span style="color: #000000;">2</span>
This is going to take a long <span style="color: #000000; font-weight: bold;">time</span>
..................+......................+......+...............</pre></div></div>

	<p>Nun nutze ich mein <a href="http://controlc.de/2009/05/11/zertifikaterstellungsskript/">Zertifikatsskript</a> zur Erstellung des Server-Zertifikats</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">create_certs vpn.domain.de</pre></div></div>

	<p>Und damit habe ich folgende Dateien erstellt, die ich zukünftig brauche  <code>/etc/ssl/vpn.domain.de-cert.pem /etc/ssl/private/vpn.domain.de-key.pem</code> Natürlich brauche ich noch Zertifikate für die Clients, diese erstell ich mit</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">create_certs client1</pre></div></div>

	<p>Wichtig ist dabei, das als <em>common name</em> der Clientname (in dem Beispiel <code>client1</code>) angegeben wird. Anschließend können die Dateien <code>/etc/ssl/client1-cert.pem</code> und <code>/etc/ssl/private/client1-key.pem</code> sowie <code>/etc/ssl/cacert.pem</code> auf den Client kopiert werden, damit dieser sich mit einem gültigen Zertifikat später verbinden kann.</p>
	<h2>Konfigurationsdatei erstellen</h2>
	<p>Anschließend habe ich aus /usr/share/doc/openvpn/examples die Datei server.conf.gz nach /etc/openssl kopiert und dort ausgepackt. Beim Editieren dieser Datei habe ich die Pfade und die Namen der Zertifikatsdateien sowie das Logging angepaßt. Die Datei (meine Änderungen sind rot markiert) sieht anschließend so aus</p>
	<blockquote>
	<pre>#################################################
# Sample OpenVPN 2.0 config file for            #
# multi-client server.                          #
#                                               #
# This file is for the server side              #
# of a many-clients &lt;-&gt; one-server              #
# OpenVPN configuration.                        #
#                                               #
# OpenVPN also supports                         #
# single-machine &lt;-&gt; single-machine             #
# configurations (See the Examples page         #
# on the web site for more info).               #
#                                               #
# This config should work on Windows            #
# or Linux/BSD systems.  Remember on            #
# Windows to quote pathnames and use            #
# double backslashes, e.g.:                     #
# \"C:\\Program Files\\OpenVPN\\config\\foo.key\" #
#                                               #
# Comments are preceded with '#' or ';'         #
#################################################
	
# Which local IP address should OpenVPN
# listen on? (optional)
;local a.b.c.d
	
# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one.  You will need to
# open up this port on your firewall.
port 1194
	
# TCP or UDP server?
;proto tcp
proto udp</pre>
	<pre># \"dev tun\" will create a routed IP tunnel,
# \"dev tap\" will create an ethernet tunnel.
# Use \"dev tap0\" if you are ethernet bridging
# and have precreated a tap0 virtual interface
# and bridged it with your ethernet interface.
# If you want to control access policies
# over the VPN, you must create firewall
# rules for the the TUN/TAP interface.
# On non-Windows systems, you can give
# an explicit unit number, such as tun0.
# On Windows, use \"dev-node\" for this.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun
	
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel if you
# have more than one.  On XP SP2 or higher,
# you may need to selectively disable the
# Windows firewall for the TAP adapter.
# Non-Windows systems usually don't need this.
;dev-node MyTap
	
# SSL/TLS root certificate (ca), certificate
# (cert), and private key (key).  Each client
# and the server must have their own cert and
# key file.  The server and all clients will
# use the same ca file.
#
# See the \"easy-rsa\" directory for a series
# of scripts for generating RSA certificates
# and private keys.  Remember to use
# a unique Common Name for the server
# and each of the client certificates.
#
# Any X509 key management system can be used.
# OpenVPN can also use a PKCS #12 formatted key file
# (see \"pkcs12\" directive in man page).
<span style=\"color: #ff0000;\">ca /etc/ssl/cacert.pem
cert /etc/ssl/vpn.domain.de-cert.pem
key /etc/ssl/private/vpn.domain.de-key.pem</span>  # This file should be kept secret
	
# Diffie hellman parameters.</pre>
	<pre># Generate your own with:
#   openssl dhparam -out dh1024.pem 1024
# Substitute 2048 for 1024 if you are using
# 2048 bit keys.
<span style=\"color: #ff0000;\">dh /etc/ssl/dh1024.pem</span>
	
# Configure server mode and supply a VPN subnet
# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.255.0
	
# Maintain a record of client &lt;-&gt; virtual IP address
# associations in this file.  If OpenVPN goes down or
# is restarted, reconnecting clients can be assigned
# the same virtual IP address from the pool that was
# previously assigned.
ifconfig-pool-persist ipp.txt
	
# Configure server mode for ethernet bridging.
# You must first use your OS's bridging capability
# to bridge the TAP interface with the ethernet
# NIC interface.  Then you must manually set the
# IP/netmask on the bridge interface, here we
# assume <a class=\"linkification-ext\" title=\"Linkification: http://10.8.0.4/255.255.255.0\" href=\"http://10.8.0.4/255.255.255.0\">10.8.0.4/255.255.255.0</a>.  Finally we
# must set aside an IP range in this subnet
# (start=10.8.0.50 end=10.8.0.100) to allocate
# to connecting clients.  Leave this line commented
# out unless you are ethernet bridging.
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
	
# Configure server mode for ethernet bridging
# using a DHCP-proxy, where clients talk
# to the OpenVPN server-side DHCP server
# to receive their IP address allocation
# and DNS server addresses.  You must first use
# your OS's bridging capability to bridge the TAP
# interface with the ethernet NIC interface.
# Note: this mode only works on clients (such as
# Windows), where the client-side TAP adapter is
# bound to a DHCP client.
;server-bridge</pre>
	<pre># Push routes to the client to allow it
# to reach other private subnets behind
# the server.  Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (<a class=\"linkification-ext\" title=\"Linkification: http://10.8.0.0/255.255.255.0\" href=\"http://10.8.0.0/255.255.255.0\">10.8.0.0/255.255.255.0</a>)
# back to the OpenVPN server.
;push \"route 192.168.10.0 255.255.255.0\"
;push \"route 192.168.20.0 255.255.255.0\"
	
# To assign specific IP addresses to specific
# clients or if a connecting client has a private
# subnet behind it that should also have VPN access,
# use the subdirectory \"ccd\" for client-specific
# configuration files (see man page for more info).
	
# EXAMPLE: Suppose the client
# having the certificate common name \"Thelonious\"
# also has a small subnet behind his connecting
# machine, such as <a class=\"linkification-ext\" title=\"Linkification: http://192.168.40.128/255.255.255.248\" href=\"http://192.168.40.128/255.255.255.248\">192.168.40.128/255.255.255.248</a>.
# First, uncomment out these lines:
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
	
# Then create a file ccd/Thelonious with this line:
#   iroute 192.168.40.128 255.255.255.248
# This will allow Thelonious' private subnet to
# access the VPN.  This example will only work
# if you are routing, not bridging, i.e. you are
# using \"dev tun\" and \"server\" directives.
	
# EXAMPLE: Suppose you want to give
# Thelonious a fixed VPN IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
	
# Then add this line to ccd/Thelonious:
#   ifconfig-push 10.9.0.1 10.9.0.2
	
# Suppose that you want to enable different
# firewall access policies for different groups
# of clients.  There are two methods:
# (1) Run multiple OpenVPN daemons, one for each
#     group, and firewall the TUN/TAP interface
#     for each group/daemon appropriately.
# (2) (Advanced) Create a script to dynamically
#     modify the firewall in response to access
#     from different clients.  See man
#     page for more info on learn-address script.
;learn-address ./script
	
# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# or bridge the TUN/TAP interface to the internet
# in order for this to work properly).
;push \"redirect-gateway def1 bypass-dhcp\"
	
# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses.  CAVEAT:
# <a class=\"linkification-ext\" title=\"Linkification: http://openvpn.net/faq.html#dhcpcaveats\" href=\"http://openvpn.net/faq.html#dhcpcaveats\">http://openvpn.net/faq.html#dhcpcaveats</a>
# The addresses below refer to the public
# DNS servers provided by opendns.com.
;push \"dhcp-option DNS 208.67.222.222\"
;push \"dhcp-option DNS 208.67.220.220\"
	
# Uncomment this directive to allow different
# clients to be able to \"see\" each other.
# By default, clients will only see the server.
# To force clients to only see the server, you
# will also need to appropriately firewall the
# server's TUN/TAP interface.
;client-to-client
	
# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names.  This is recommended
# only for testing purposes.  For production use,
# each client should have its own certificate/key
# pair.
#
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE \"COMMON NAME\",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn
	
# The keepalive directive causes ping-like
# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.
keepalive 10 120
	
# For extra security beyond that provided
# by SSL/TLS, create an \"HMAC firewall\"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
#   openvpn --genkey --secret ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
;tls-auth ta.key 0 # This file is secret
	
# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
;cipher BF-CBC        # Blowfish (default)
;cipher AES-128-CBC   # AES
;cipher DES-EDE3-CBC  # Triple-DES
	
# Enable compression on the VPN link.
# If you enable it here, you must also
# enable it in the client config file.
comp-lzo
	
# The maximum number of concurrently connected
# clients we want to allow.
;max-clients 100
	
# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.
;user nobody
;group nogroup
	
# The persist options will try to avoid
# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun
	
# Output a short status file showing
# current connections, truncated
# and rewritten every minute.
status openvpn-status.log
	
# By default, log messages will go to the syslog (or
# on Windows, if running as a service, they will go to
# the \"\Program Files\OpenVPN\log\" directory).
# Use log or log-append to override this default.
# \"log\" will truncate the log file on OpenVPN startup,
# while \"log-append\" will append to it.  Use one
# or the other (but not both).
;log         openvpn.log
<span style=\"color: #ff0000;\">log-append  /var/log/openvpn.log</span>
	
# Set the appropriate level of log
# file verbosity.
#
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 3
	
# Silence repeating messages.  At most 20
# sequential messages of the same message
# category will be output to the log.
;mute 20</pre>
	</blockquote>
	<p>Natürlich ist die Konfiguration noch lange nicht optimiert und ermöglicht noch nicht alles, was ich mir als Ziel gesetzt habe.  Mit einem</p>
	
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>openvpn start</pre></div></div>

	<p>starten wir den Server. Um zu schauen, ob alles funktioniert schauen wir uns zuerst die  Datei <code>/var/log/openvpn.log</code> an</p>
	<blockquote>
	<pre>Wed Jun  3 23:26:18 2009 OpenVPN 2.1_rc11 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Sep 18 2008
Wed Jun  3 23:26:18 2009 Diffie-Hellman initialized with 1024 bit key
Wed Jun  3 23:26:18 2009 WARNING: file '/etc/ssl/private/vpn.domain.de-key.pem' is group or others accessible
Wed Jun  3 23:26:18 2009 /usr/bin/openssl-vulnkey -q -b 1024 -m &lt;modulus omitted&gt;
Wed Jun  3 23:26:18 2009 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Jun  3 23:26:18 2009 ROUTE default_gateway=180.190.200.1
Wed Jun  3 23:26:18 2009 TUN/TAP device tun0 opened
Wed Jun  3 23:26:18 2009 TUN/TAP TX queue length set to 100
Wed Jun  3 23:26:18 2009 /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Wed Jun  3 23:26:18 2009 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Wed Jun  3 23:26:18 2009 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun  3 23:26:18 2009 Socket Buffers: R=[129024-&gt;131072] S=[129024-&gt;131072]
Wed Jun  3 23:26:18 2009 UDPv4 link local (bound): [undef]:1194
Wed Jun  3 23:26:18 2009 UDPv4 link remote: [undef]
Wed Jun  3 23:26:18 2009 MULTI: multi_init called, r=256 v=256
Wed Jun  3 23:26:18 2009 IFCONFIG POOL: base=10.8.0.4 size=62
Wed Jun  3 23:26:18 2009 IFCONFIG POOL LIST
Wed Jun  3 23:26:18 2009 Initialization Sequence Completed</pre>
	</blockquote>
	<p>Damit steht unser Server schon mal und in einem <a href="http://controlc.de/2009/06/09/mac-openvpn-und-tunnelblick/">weiteren Beitrag</a> zeige ich, wie man sich mit einem Client verbindet.
</p>
]]></content:encoded>
			<wfw:commentRss>http://controlc.de/2009/06/03/debian-openvpn-server-einrichten/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

