<?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>Raspberry Pi Archives - Network Guy</title>
	<atom:link href="https://networkguy.de/category/raspberry-pi/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Share your knowledge!</description>
	<lastBuildDate>Mon, 27 Nov 2017 09:31:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://networkguy.de/wp-content/uploads/2016/09/cropped-og-image-32x32.jpg</url>
	<title>Raspberry Pi Archives - Network Guy</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">35051042</site>	<item>
		<title>Using different smarthosts in your mail environment</title>
		<link>https://networkguy.de/using-different-smarthosts-in-your-mail-environment/</link>
					<comments>https://networkguy.de/using-different-smarthosts-in-your-mail-environment/#respond</comments>
		
		<dc:creator><![CDATA[Michel]]></dc:creator>
		<pubDate>Tue, 25 Jul 2017 11:46:21 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<guid isPermaLink="false">https://networkguy.de/?p=1677</guid>

					<description><![CDATA[<p>Hello guys! I was asked how to configure multiple domains on a Microsoft Exchange server. The reception is very easy: Add the new domain name to your Exchange server and configure your POPcon to collect the mails or configure the MX DNS entry of this domain to your fixed WAN IP. But what about sending [&#8230;]</p>
<p>The post <a href="https://networkguy.de/using-different-smarthosts-in-your-mail-environment/">Using different smarthosts in your mail environment</a> appeared first on <a href="https://networkguy.de">Network Guy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hello guys! I was asked how to configure multiple domains on a Microsoft Exchange server. The reception is very easy: Add the new domain name to your Exchange server and configure your <a href="http://www.servolutions.de/popcon.htm" target="_blank" rel="noopener">POPcon</a> to collect the mails or configure the MX DNS entry of this domain to your fixed WAN IP. But what about sending different mail domains over different smarthosts? This feature is not included in the Exchange server and can only added via third-party tools. And i thought &#8220;Isn&#8217;t it possible to do it with tiny postfix server?&#8221; (I&#8217;ve never configured a postfix server and I have only a few linux knowledge ^^). So ok, let&#8217;s start with our experiment.</p>
<p>I installed <a href="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/" target="_blank" rel="noopener">Debian</a> with Gnome in my VMware Workstation environment and installed postfix. Open Terminal and change to root user:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">su -
apt-get update
apt-get install postfix</pre>
<p>after this you can edit your configuration and add your provider smarthosts. Open the main.cf file with nano:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">nano /etc/postfix/main.cf</pre>
<p>When the setup wizards starts, choose &#8220;no configuration&#8221; we want to do it by our own ;) This is my whole configuration (<strong>bold</strong> lines were very relevant while troubleshooting ^^):</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtp_tls_security_level = may
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = debian
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = debian, localhost.localdomain, , localhost
#relayhost =

sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.10.10.0/24 192.168.0.0/16

mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
message_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all</pre>
<p>I allowed the complete internal network. You should only add your server in &#8220;mynetworks&#8221;. After this we need to create the list relayhosts and the logins. Create/open the relayhost_maps file in the postfix folder:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">nano /etc/postfix/relayhost_maps
@networkguy.de [smtp.strato.de]
@gmx.de [mail.gmx.net]:587</pre>
<p>this smarthosts need login data, so create/open a file called &#8220;sasl_password&#8221;:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">nano /etc/postfix/sasl_password
smtp.strato.de michel[put in the "at"-symbol here]networkguy.de:MySuperPassword
[mail.gmx.net]:587 xxx[put in the "at"-symbol here]gmx.de:MySuperPassword</pre>
<p>I also needed to create the tls_policy file because the SMTP server from GMX only allows encrypted communication:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">nano /etc/postfix/tls_policy
mail.gmx.net:587 encrypt</pre>
<p>save the files with Ctrl+O and exit the texteditor nano. Now we need to convert this files to a binary database format:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">postmap /etc/postfix/relayhost_maps
postmap /etc/postfix/sasl_passwd
postmap /etc/postfix/tls_policy</pre>
<p>reload the postfix server:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">service postfix restart</pre>
<p>at this point, we can test the postfix server. Open the live log on the debian server:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">tail -f /var/log/mail.log</pre>
<p>I&#8217;m using the windows tool <a href="http://www.virtualobjectives.com.au/utilitiesprogs/utilsprogs-index.htm" target="_blank" rel="noopener">SendSMTP </a>from John Buoro, VirtualObjectives to test the mailing. Configure the IP address of your debian server in the settings:</p>
<p><a href="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp1.png"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-1678" src="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp1.png" alt="" width="542" height="545" srcset="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp1.png 542w, https://networkguy.de/wp-content/uploads/2017/07/sendsmtp1-150x150.png 150w, https://networkguy.de/wp-content/uploads/2017/07/sendsmtp1-298x300.png 298w" sizes="(max-width: 542px) 100vw, 542px" /></a></p>
<p>and write a test mail:</p>
<p><a href="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp2.png"><img decoding="async" class="alignnone size-full wp-image-1679" src="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp2.png" alt="" width="542" height="545" srcset="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp2.png 542w, https://networkguy.de/wp-content/uploads/2017/07/sendsmtp2-150x150.png 150w, https://networkguy.de/wp-content/uploads/2017/07/sendsmtp2-298x300.png 298w" sizes="(max-width: 542px) 100vw, 542px" /></a></p>
<p><a href="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp3.png"><img decoding="async" class="alignnone size-full wp-image-1680" src="https://networkguy.de/wp-content/uploads/2017/07/sendsmtp3.png" alt="" width="223" height="142" /></a></p>
<p>If you look at the log file, you can see if your test runs well:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">Jul 25 13:28:38 debian postfix/smtpd[1555]: connect from unknown[192.168.88.1]
Jul 25 13:28:38 debian postfix/smtpd[1555]: 492E161710: client=unknown[192.168.88.1]
Jul 25 13:28:38 debian postfix/cleanup[1558]: 492E161710: message-id=&lt;&gt;
Jul 25 13:28:38 debian postfix/qmgr[1500]: 492E161710: from=&lt;xxx[at-symbol]gmx.de&gt;, size=466, nrcpt=1 (queue active)
Jul 25 13:28:38 debian postfix/smtpd[1555]: disconnect from unknown[192.168.88.1]
Jul 25 13:28:38 debian postfix/smtp[1559]: 492E161710: to=&lt;michel[at-symbol]networkguy.de&gt;, relay=mail.gmx.net[212.227.17.168]:587, delay=0.58, delays=0.08/0.05/0.35/0.1, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0LguAU-1duRFo272k-00oJ8q)
Jul 25 13:28:38 debian postfix/qmgr[1500]: 492E161710: removed</pre>
<p>aaaaaaaaand I got the mail:</p>
<p><a href="https://networkguy.de/wp-content/uploads/2017/07/mail.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1681" src="https://networkguy.de/wp-content/uploads/2017/07/mail.png" alt="" width="625" height="271" srcset="https://networkguy.de/wp-content/uploads/2017/07/mail.png 625w, https://networkguy.de/wp-content/uploads/2017/07/mail-300x130.png 300w" sizes="(max-width: 625px) 100vw, 625px" /></a></p>
<p>Maybe you will have problems with SSL ports and authentication. Check the postfix logs and correct your &#8220;relayhost_maps&#8221;, &#8220;sasl_passwd&#8221; and &#8220;tls_policy&#8221; file. Don&#8217;t forget to delete (rm filename.db) the .db-files and postmap again. You can also install this on your Raspberry Pi if you want. I think this is a very nice service to relay from different mail domains without buying a third-party-tool. In your Exchange server, change your send connector for &#8220;*&#8221; to the debian server.</p>
<p>You need help with your postfix server or Debian installation? Feel free to write in the comments below.</p>
<p>The post <a href="https://networkguy.de/using-different-smarthosts-in-your-mail-environment/">Using different smarthosts in your mail environment</a> appeared first on <a href="https://networkguy.de">Network Guy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://networkguy.de/using-different-smarthosts-in-your-mail-environment/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1677</post-id>	</item>
		<item>
		<title>Securing ownCloud with Sophos UTM Webserver Protection</title>
		<link>https://networkguy.de/securing-owncloud-with-sophos-utm-webserver-protection/</link>
					<comments>https://networkguy.de/securing-owncloud-with-sophos-utm-webserver-protection/#comments</comments>
		
		<dc:creator><![CDATA[Michel]]></dc:creator>
		<pubDate>Tue, 08 Oct 2013 14:54:37 +0000</pubDate>
				<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Sophos UTM]]></category>
		<guid isPermaLink="false">http://networkguy.de/?p=533</guid>

					<description><![CDATA[<p>Hi guys! To secure your ownCloud access via Sophos UTM Webserver Protection, you will need to add your local webserver (in my case a Raspberry Pi; tutorial here) to the webserver protection module: &#160; &#160; now we will configure a new firewall policy especially for our requirements: &#160; I configured uploads only at the Antivirus option. [&#8230;]</p>
<p>The post <a href="https://networkguy.de/securing-owncloud-with-sophos-utm-webserver-protection/">Securing ownCloud with Sophos UTM Webserver Protection</a> appeared first on <a href="https://networkguy.de">Network Guy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi guys!</p>
<p>To secure your ownCloud access via Sophos UTM Webserver Protection, you will need to add your local webserver (in my case a Raspberry Pi; tutorial <a href="http://networkguy.de/?p=518" target="_blank">here</a>) to the webserver protection module:</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-realwebserver.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-535" alt="owncloud-utm-realwebserver" src="http://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-realwebserver.png" width="494" height="476" srcset="https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-realwebserver.png 494w, https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-realwebserver-300x289.png 300w, https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-realwebserver-195x187.png 195w" sizes="(max-width: 494px) 100vw, 494px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>now we will configure a new firewall policy especially for our requirements:</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-firewall.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-534" alt="owncloud-utm-firewall" src="http://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-firewall.png" width="566" height="688" srcset="https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-firewall.png 566w, https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-firewall-247x300.png 247w, https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-firewall-160x195.png 160w" sizes="(max-width: 566px) 100vw, 566px" /></a></p>
<p>&nbsp;</p>
<p>I configured uploads only at the Antivirus option. After this we need to configure a virtual webserver (the reverse proxy from the UTM):</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-virtualwebserver.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-537" alt="owncloud-utm-virtualwebserver" src="http://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-virtualwebserver.png" width="515" height="818" srcset="https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-virtualwebserver.png 515w, https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-virtualwebserver-189x300.png 189w, https://networkguy.de/wp-content/uploads/2013/10/owncloud-utm-virtualwebserver-122x195.png 122w" sizes="(max-width: 515px) 100vw, 515px" /></a></p>
<p>you can generate a trusted SSL certificate for free for personal use at <a href="http://www.startssl.com/" target="_blank">StartSSL</a> or you can choose the self-generated WebAdmin certificate from the UTM itself. If you have any questions, just ask in the comments and I will add additional informations to this tutorial.</p>
<p>The post <a href="https://networkguy.de/securing-owncloud-with-sophos-utm-webserver-protection/">Securing ownCloud with Sophos UTM Webserver Protection</a> appeared first on <a href="https://networkguy.de">Network Guy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://networkguy.de/securing-owncloud-with-sophos-utm-webserver-protection/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">533</post-id>	</item>
		<item>
		<title>ownCloud with Raspberry Pi</title>
		<link>https://networkguy.de/owncloud-with-raspberry-pi/</link>
					<comments>https://networkguy.de/owncloud-with-raspberry-pi/#comments</comments>
		
		<dc:creator><![CDATA[Michel]]></dc:creator>
		<pubDate>Tue, 10 Sep 2013 20:45:55 +0000</pubDate>
				<category><![CDATA[Raspberry Pi]]></category>
		<guid isPermaLink="false">http://networkguy.de/?p=518</guid>

					<description><![CDATA[<p>Long time ago since last post, sorry! I bought a Raspberry Pi Model B to build my own &#8220;Dropbox&#8221;. I will show you how to install Raspbian and ownCloud on the Raspberry Pi. What items do you need for this? I bought the following things: Mainboard: Raspberry Pi RBCA000 Mainboard (ARM 1176JZF-S, 512MB RAM, HDMI, 2x USB [&#8230;]</p>
<p>The post <a href="https://networkguy.de/owncloud-with-raspberry-pi/">ownCloud with Raspberry Pi</a> appeared first on <a href="https://networkguy.de">Network Guy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Long time ago since last post, sorry! I bought a Raspberry Pi Model B to build my own &#8220;Dropbox&#8221;. I will show you how to install <a href="http://www.raspbian.org/" target="_blank">Raspbian </a>and <a href="http://owncloud.org/" target="_blank">ownCloud </a>on the <a href="http://www.raspberrypi.org/" target="_blank">Raspberry Pi</a>.</p>
<p>What items do you need for this? I bought the following things:</p>
<ul>
<li>Mainboard: <a href="http://www.amazon.de/gp/product/B008PT4GGC/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1638&amp;creative=6742&amp;creativeASIN=B008PT4GGC&amp;linkCode=as2&amp;tag=netguy-21" target="_blank">Raspberry Pi RBCA000 Mainboard (ARM 1176JZF-S, 512MB RAM, HDMI, 2x USB 2.0, 3,5 Watt)</a></li>
<li>Power: <a href="http://www.amazon.de/gp/product/B00CJB4D1U/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1638&amp;creative=6742&amp;creativeASIN=B00CJB4D1U&amp;linkCode=as2&amp;tag=netguy-21" target="_blank">Micro USB 5V 1000 mAh für Raspberry Pi B and A Model</a> (use a power adapter with minimum 1000 mAh)</li>
<li>SD-Card: <a href="http://www.amazon.de/gp/product/B003VNKNE6/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1638&amp;creative=6742&amp;creativeASIN=B003VNKNE6&amp;linkCode=as2&amp;tag=netguy-21" target="_blank">Transcend Extreme-Speed SDHC 4GB Class 10</a></li>
<li>USB-Adapter (for ownCloud Data): <a href="http://www.amazon.de/gp/product/B007V9U81E/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1638&amp;creative=6742&amp;creativeASIN=B007V9U81E&amp;linkCode=as2&amp;tag=netguy-21" target="_blank">Kingston Data Traveler micro 16GB USB-Stick</a></li>
</ul>
<p>And the case? You can use whatever you want! Feel free to use Lego, wood or anything else :) there are some cool ideas on Raspberry Pi websites. I also had an HDMI cable to my TV so I used my TV for installing Raspbian and configureing the basics (IP address, SSH access).</p>
<p>First we will download and copy the newest OS Raspbian on our SD Card. I copied it from a Windows system so I used <a href="http://sourceforge.net/projects/win32diskimager/" target="_blank">Win32 Disk Imager</a> (works also on Win8). After this you can download the latest Raspbian Version <a href="http://downloads.raspberrypi.org/raspbian_latest" target="_blank">here</a>. Start Win32 Disk Imager and choose your extracted Raspbian Image and your SD drive (I used an USB cardreader for this):</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/09/win32diskimager.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-519" alt="win32diskimager" src="http://networkguy.de/wp-content/uploads/2013/09/win32diskimager.png" width="421" height="214" srcset="https://networkguy.de/wp-content/uploads/2013/09/win32diskimager.png 421w, https://networkguy.de/wp-content/uploads/2013/09/win32diskimager-300x152.png 300w, https://networkguy.de/wp-content/uploads/2013/09/win32diskimager-195x99.png 195w" sizes="(max-width: 421px) 100vw, 421px" /></a></p>
<p>&nbsp;</p>
<p>Click &#8220;Write&#8221; and wait until the copy job has been done. Put the &#8220;fresh&#8221; SD card into the Raspberry Pi, connect it with an USB keyboard and your TFT or TV, connect your power cable and watch it boot the OS. You will see the Raspberry Pi Configuration Tool:</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/09/raspi-config.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-520" alt="raspi-config" src="http://networkguy.de/wp-content/uploads/2013/09/raspi-config.png" width="883" height="585" srcset="https://networkguy.de/wp-content/uploads/2013/09/raspi-config.png 883w, https://networkguy.de/wp-content/uploads/2013/09/raspi-config-300x199.png 300w, https://networkguy.de/wp-content/uploads/2013/09/raspi-config-620x410.png 620w, https://networkguy.de/wp-content/uploads/2013/09/raspi-config-195x129.png 195w" sizes="(max-width: 883px) 100vw, 883px" /></a></p>
<p>&nbsp;</p>
<p>The first step is to use all the storage on you SD card, so choose &#8220;1 Expand Filesystem&#8221;. Now we will activate SSH by choosing &#8220;8 Advanced Options&#8221; and &#8220;A4 SSH&#8221;. Enable SSH for remote control of your device.</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/09/raspberrypi-ssh.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-521" alt="raspberrypi-ssh" src="http://networkguy.de/wp-content/uploads/2013/09/raspberrypi-ssh.png" width="883" height="585" srcset="https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-ssh.png 883w, https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-ssh-300x199.png 300w, https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-ssh-620x410.png 620w, https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-ssh-195x129.png 195w" sizes="(max-width: 883px) 100vw, 883px" /></a></p>
<p>&nbsp;</p>
<p>Add also your locales. Default is en_GB UTF-8 and I also select de_DE UTF-8 and en_US UTF-8. I set en_US as the default.</p>
<p>Connect a cable to your network, the Raspberry Pi will get an DHCP address. Look at your DHCP server leases and connect to your device via <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY</a> and SSH.</p>
<p>For the first login, please take the user <strong>pi</strong> and password <strong>raspberry</strong>. You can let the automatic IP address configuration. For our goal we need to configure a fixed IP address. Type in:</p>
<blockquote><p>sudo nano /etc/network/interfaces</p></blockquote>
<p>and change your eth0 interface to something like this:</p>
<blockquote><p>iface eth0 inet static<br />
address 10.10.10.42<br />
netmask 255.255.255.0<br />
gateway 10.10.10.1</p></blockquote>
<p>press Ctrl+O to save the file. Overwrite the file and close the nano editor with Ctrl+X. Now we need to restart the network service:</p>
<blockquote><p>sudo /etc/init.d/networking restart</p></blockquote>
<p>sometimes this didn&#8217;t work and you can also restart the whole machine:</p>
<blockquote><p>sudo shutdown -r now</p></blockquote>
<p>connect again to your Raspberry Pi and update your system:</p>
<blockquote><p>sudo apt-get update</p></blockquote>
<p>To run the ownCloud services we need to install the Apache2 webserver and a SQL database. I choose <a href="http://www.mysql.com/" target="_blank">MySQL </a>as my prefered database. Install the apache and mysql server with this commands:</p>
<blockquote><p>sudo apt-get install apache2 php5 php5-gd php-xml-parser php5-intl<br />
sudo apt-get install php5-mysql curl libcurl3 php5-curl<br />
sudo apt-get install mysql-server</p></blockquote>
<p>During the setup you will get a prompt to choose a root password for the MySQL service. In my example I will choose &#8220;YOURPASSWORD&#8221;.</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/09/raspberry-mysql.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-524" alt="raspberry-mysql" src="http://networkguy.de/wp-content/uploads/2013/09/raspberry-mysql.png" width="883" height="585" srcset="https://networkguy.de/wp-content/uploads/2013/09/raspberry-mysql.png 883w, https://networkguy.de/wp-content/uploads/2013/09/raspberry-mysql-300x199.png 300w, https://networkguy.de/wp-content/uploads/2013/09/raspberry-mysql-620x410.png 620w, https://networkguy.de/wp-content/uploads/2013/09/raspberry-mysql-195x129.png 195w" sizes="(max-width: 883px) 100vw, 883px" /></a></p>
<p>You can now test your apache webserver by connecting to your IP address via your browser:</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/09/raspberrypi-it_works.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-522" alt="raspberrypi-it_works" src="http://networkguy.de/wp-content/uploads/2013/09/raspberrypi-it_works.png" width="602" height="235" srcset="https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-it_works.png 602w, https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-it_works-300x117.png 300w, https://networkguy.de/wp-content/uploads/2013/09/raspberrypi-it_works-195x76.png 195w" sizes="(max-width: 602px) 100vw, 602px" /></a></p>
<p>&nbsp;</p>
<p>We will now create a new database called &#8220;owncloud&#8221; (watch out for case sensitive):</p>
<blockquote><p>mysql -uroot -pYOURPASSWORD</p></blockquote>
<p>yes, after the parameter -u and -p is no space! You are now connected to your MySQL server and can create the new database:</p>
<p>CREATE DATABASE owncloud</p>
<p>and grant access to your new user &#8220;<strong>ownclouduser</strong>&#8221; with password &#8220;<strong>mynewpassword</strong>&#8220;:</p>
<p>mysql &gt; GRANT ALL PRIVILEGES ON owncloud.* TO ownclouduser@&#8217;localhost&#8217;</p>
<p>[press enter here]</p>
<p>-&gt; IDENTIFIED BY &#8216;mynewpassword&#8217;</p>
<p>disconnect from your MySQL server by typing in &#8220;<strong>exit</strong>&#8220;. For an explicit storage device I connect my new 16GB USB-Stick to the RaspberryPi. You can view the device by typing in &#8220;<strong>df -h</strong>&#8220;:</p>
<blockquote><p>Filesystem Size Used Avail Use% Mounted on<br />
rootfs 3.6G 1.8G 1.7G 52% /<br />
/dev/root 3.6G 1.8G 1.7G 52% /<br />
devtmpfs 212M 0 212M 0% /dev<br />
tmpfs 44M 228K 44M 1% /run<br />
tmpfs 5.0M 0 5.0M 0% /run/lock<br />
tmpfs 88M 0 88M 0% /run/shm<br />
/dev/mmcblk0p1 56M 19M 38M 33% /boot<br />
/dev/sda1 15G 2.0G 13G 14% /mnt/usb1</p></blockquote>
<p>You can see that the USB-Stick &#8220;/dev/sda1&#8221; is mounted to &#8220;<strong>/mnt/usb1</strong>&#8221; and I will explain how to do this permanently:</p>
<blockquote><p>sudo nano /etc/fstab</p></blockquote>
<p>add the sda1 device to the config-file. It should look like this:</p>
<blockquote><p>proc /proc proc defaults 0 0<br />
/dev/mmcblk0p1 /boot vfat defaults 0 2<br />
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1<br />
/dev/sda1 /mnt/usb1/ vfat rw,umask=007,auto,user,users,uid=33,gid=33 0 0</p></blockquote>
<p>The uid (User ID) is &#8220;33&#8221;. That is the system-user &#8220;www-data&#8221; which will have access to the usb device. Save the file and exit nano.</p>
<p>The usb device will now mount itself after a reboot. You can mount it immediately with</p>
<blockquote><p>mount -a</p></blockquote>
<p>create a new folder on your usb device</p>
<blockquote><p>sudo mkdir /mnt/usb1/ocdata</p></blockquote>
<p>To bring ownCloud alive, please download the newest version into your /var/www/ folder with the command</p>
<blockquote><p>cd /var/www<br />
sudo wget http://download.owncloud.org/community/owncloud-6.0.0a.tar.bz2</p></blockquote>
<p>Look at the ownCloud website, may be there is a newer version than 5.0.10. We will extract the files and give www-data access to this folder:</p>
<blockquote><p>sudo tar -xvjf owncloud-6.0.0a.tar.bz2<br />
sudo chown -R www-data:www-data owncloud/</p></blockquote>
<p>to allow big file uploads, we need to edit the php.ini:</p>
<blockquote><p>sudo nano /etc/php5/apache2/php.ini</p></blockquote>
<p>search for &#8220;upload_max_filesize&#8221; and &#8220;post_max_size&#8221; and change it to &#8220;512M&#8221; so you can upload files up to an half GByte filesize.</p>
<p>For more security we will configure https with this:</p>
<blockquote><p>sudo nano /etc/apache2/sites-enabled/000-default</p></blockquote>
<p>under &lt;Directory /var/www/&gt; change &#8220;AllowOverride&#8221; from &#8220;None&#8221; to &#8220;All&#8221; and overwrite the file. Activate HTTPS with:</p>
<blockquote><p>sudo a2enmod rewrite<br />
sudo a2enmod headers</p>
<p>sudo openssl genrsa -des3 -out server.key 1024; sudo openssl rsa -in server.key -out server.key.insecure;sudo openssl req -new -key server.key -out server.csr;sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt;sudo cp server.crt /etc/ssl/certs;sudo cp server.key /etc/ssl/private;sudo a2enmod ssl;sudo a2ensite default-ssl</p>
<p>sudo /etc/init.d/apache2 restart</p></blockquote>
<p>After this you are able to access your webserver with https://. As you can see, the certificate is configured with the hostname of your Raspberry Pi. I will post an update soon to show you how to generate certificates with your informations. Connect to your webserver and let us start with the ownCloud configuration (german wizard):</p>
<p><a href="http://networkguy.de/wp-content/uploads/2013/09/owncloud-setup.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-523" alt="owncloud-setup" src="http://networkguy.de/wp-content/uploads/2013/09/owncloud-setup.png" width="326" height="984" srcset="https://networkguy.de/wp-content/uploads/2013/09/owncloud-setup.png 326w, https://networkguy.de/wp-content/uploads/2013/09/owncloud-setup-99x300.png 99w" sizes="(max-width: 326px) 100vw, 326px" /></a></p>
<p>&nbsp;</p>
<p>fill in your configured user and password. You can now upload some test files with the webinterface and can use the <a href="https://itunes.apple.com/de/app/owncloud/id543672169?mt=8" target="_blank">iPad/iPhone App</a> and/or a <a href="http://owncloud.org/sync-clients/" target="_blank">Windows client</a>.</p>
<p>Actually I have a problem with special characters like Ü, Ö, or Ä in the file name. I already changed this:</p>
<blockquote><p>sudo nano /etc/mysql/my.cnf</p>
<p>my.cnf:</p>
<p>[client]<br />
default-character-set = utf8<br />
[mysqld]<br />
character-set-server = utf8</p>
<p>sudo /etc/init.d/mysql restart</p>
<p>sudo nano /etc/php5/apache2/php.ini</p>
<p>; PHP&#8217;s default character set is set to empty.<br />
; http://php.net/default-charset<br />
default_charset = &#8220;UTF-8&#8221;</p>
<p>sudo nano /etc/apache2/conf.d/charset</p>
<p>#AddDefaultCharset UTF-8<br />
to<br />
AddDefaultCharset UTF-8</p>
<p>sudo /etc/init.d/apache2 restart</p></blockquote>
<p>but this didn&#8217;t work for me. Any other ideas?</p>
<p>&nbsp;</p>
<p>If you see any errors or have any questions, please ask and comment :)</p>
<p>The post <a href="https://networkguy.de/owncloud-with-raspberry-pi/">ownCloud with Raspberry Pi</a> appeared first on <a href="https://networkguy.de">Network Guy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://networkguy.de/owncloud-with-raspberry-pi/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">518</post-id>	</item>
	</channel>
</rss>
