<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Summer</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Summer"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Summer"/>
	<updated>2026-05-01T09:30:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Summer&amp;diff=11499</id>
		<title>User:Summer</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Summer&amp;diff=11499"/>
		<updated>2015-11-23T17:01:03Z</updated>

		<summary type="html">&lt;p&gt;Summer: Contributions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Raspberry Pi]]&lt;br /&gt;
* [[Uncomplicated Firewall]]&lt;br /&gt;
* [[GCC]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11498</id>
		<title>GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11498"/>
		<updated>2015-11-23T17:00:41Z</updated>

		<summary type="html">&lt;p&gt;Summer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://gcc.gnu.org/ GCC], which stands for GNU Compiler Collection, is a free, open-source compiler system produced by the [https://gnu.org/ GNU Project].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The quickest way to install GCC on Alpine Linux is by issuing the following command:&lt;br /&gt;
{{cmd|apk add build-base}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;build-base&amp;lt;/code&amp;gt; is a meta-package that will install the GCC, libc-dev and binutils packages (amongst others).&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=GNU_Compiler_Collection&amp;diff=11497</id>
		<title>GNU Compiler Collection</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=GNU_Compiler_Collection&amp;diff=11497"/>
		<updated>2015-11-23T16:59:14Z</updated>

		<summary type="html">&lt;p&gt;Summer: Redirects to GCC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT[[GCC]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Gcc&amp;diff=11496</id>
		<title>Gcc</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Gcc&amp;diff=11496"/>
		<updated>2015-11-23T16:55:13Z</updated>

		<summary type="html">&lt;p&gt;Summer: Summer moved page Gcc to GCC: Title should be all in capital letters (in this case)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[GCC]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11495</id>
		<title>GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11495"/>
		<updated>2015-11-23T16:55:13Z</updated>

		<summary type="html">&lt;p&gt;Summer: Summer moved page Gcc to GCC: Title should be all in capital letters (in this case)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://gcc.gnu.org/ GCC] (GNU Compiler Collection) is a free, open-source compiler system produced by the [https://gnu.org/ GNU Project].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The quickest way to install GCC on Alpine Linux is by issuing the following command:&lt;br /&gt;
{{cmd|apk add build-base}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;build-base&amp;lt;/code&amp;gt; is a meta-package that will install the GCC, libc-dev and binutils packages (amongst others).&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11494</id>
		<title>GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11494"/>
		<updated>2015-11-23T16:50:21Z</updated>

		<summary type="html">&lt;p&gt;Summer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://gcc.gnu.org/ GCC] (GNU Compiler Collection) is a free, open-source compiler system produced by the [https://gnu.org/ GNU Project].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The quickest way to install GCC on Alpine Linux is by issuing the following command:&lt;br /&gt;
{{cmd|apk add build-base}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;build-base&amp;lt;/code&amp;gt; is a meta-package that will install the GCC, libc-dev and binutils packages (amongst others).&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11493</id>
		<title>GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11493"/>
		<updated>2015-11-23T16:49:14Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added links to the GNU project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://gcc.gnu.org/ GCC] is a free, open-source compiler system produced by the [https://gnu.org/ GNU Project].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The quickest way to install GCC on Alpine Linux is by issuing the following command:&lt;br /&gt;
{{cmd|apk add build-base}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;build-base&amp;lt;/code&amp;gt; is a meta-package that will install the GCC, libc-dev and binutils packages (amongst others).&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11492</id>
		<title>GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=GCC&amp;diff=11492"/>
		<updated>2015-11-23T16:46:20Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added GCC tutorial page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GCC is a free, open-source compiler system produced by the GNU Project.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The quickest way to install GCC on Alpine Linux is by issuing the following command:&lt;br /&gt;
{{cmd|apk add build-base}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;build-base&amp;lt;/code&amp;gt; is a meta-package that will install the GCC, libc-dev and binutils (amongst others) packages.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11263</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11263"/>
		<updated>2015-10-14T16:26:19Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added Post-installation section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball which is named as &amp;lt;code&amp;gt;alpine-rpi-&amp;lt;version&amp;gt;-armhf.rpi.tar.gz&amp;lt;/code&amp;gt;.  You will need version 3.2.0 or greater if you have a Raspberry Pi 2.&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition type is called &#039;&#039;W95 FAT32 (LBA)&#039;&#039; and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system as root.  Leave the password empty.&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt; to verify that the installation was indeed successful.&lt;br /&gt;
&lt;br /&gt;
== Post Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Update the System ===&lt;br /&gt;
&lt;br /&gt;
Upon installation, make sure that your system is up-to-date:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk update&lt;br /&gt;
apk upgrade}}&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to save the changes:&lt;br /&gt;
&lt;br /&gt;
{{cmd|lbu commit}}&lt;br /&gt;
&lt;br /&gt;
=== Clock-related error messages ===&lt;br /&gt;
&lt;br /&gt;
During the booting time, you might notice errors related to the hardware clock.  The Raspberry Pi does not have&lt;br /&gt;
a hardware clock and therefore you need to disable the hwclock daemon and enable swclock:&lt;br /&gt;
&lt;br /&gt;
{{cmd|rc-update add swclock boot    # enable the software clock&lt;br /&gt;
rc-update del hwclock boot    # disable the hardware clock}}&lt;br /&gt;
&lt;br /&gt;
Since Raspberry Pi does not have a clock, the Alpine Linux needs to know what the time is by using a&lt;br /&gt;
[https://en.wikipedia.org/wiki/Network_Time_Protocol Network Time Protocol (NTP)] daemon.  Make sure that you a&lt;br /&gt;
NTP daemon installed and running.  If you are not sure, then you can install NTP client by running the following&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
{{cmd|setup-ntp}}&lt;br /&gt;
&lt;br /&gt;
Busybox NTP client might be the most lightweight solution.  Save the changes and reboot, once the NTP software is&lt;br /&gt;
installed and running:&lt;br /&gt;
&lt;br /&gt;
{{cmd|lbu commit&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
After reboot, make sure that the &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; command outputs the correct date and time.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11262</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11262"/>
		<updated>2015-10-13T20:29:51Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball which is named as &amp;lt;code&amp;gt;alpine-rpi-&amp;lt;version&amp;gt;-armhf.rpi.tar.gz&amp;lt;/code&amp;gt;.  You will need version 3.2.0 or greater if you have a Raspberry Pi 2.&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition type is called &#039;&#039;W95 FAT32 (LBA)&#039;&#039; and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system as root.  Leave the password empty.&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;code&amp;gt;reboot&amp;lt;/code&amp;gt; to verify that the installation was indeed successful.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11261</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11261"/>
		<updated>2015-10-13T15:59:27Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added See Also section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball which is named as &amp;lt;code&amp;gt;alpine-rpi-&amp;lt;version&amp;gt;-armhf.rpi.tar.gz&amp;lt;/code&amp;gt;.  You will need version 3.2.0 or greater if you have a Raspberry Pi 2.&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition type is called &#039;&#039;W95 FAT32 (LBA)&#039;&#039; and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system as root.  Leave the password empty.&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot to verify that the installation was indeed successful.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11250</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11250"/>
		<updated>2015-10-04T10:02:19Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball which is named as &amp;lt;code&amp;gt;alpine-rpi-&amp;lt;version&amp;gt;-armhf.rpi.tar.gz&amp;lt;/code&amp;gt;.  You will need version 3.2.0 or greater if you have a Raspberry Pi 2.&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition is named as W95 FAT32 (LBA) and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11249</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11249"/>
		<updated>2015-10-04T10:00:59Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Preparation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball which is named as &amp;lt;code&amp;gt;alpine-rpi-&amp;lt;version&amp;gt;-armhf.rpi.tar.gz&amp;lt;/code&amp;gt;.  You will need version 3.2.0 or greater if you have a Raspberry Pi 2.&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition is named as W95 FAT32 (LBA) and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11248</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11248"/>
		<updated>2015-10-04T09:57:18Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Preparation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [http://linux.die.net/man/8/fdisk fdisk] to create a FAT32 partition.  If you are using fdisk, the FAT32 partition is named as W95 FAT32 (LBA) and its ID is 0xC.&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created partition&lt;br /&gt;
# Extract the tarball contents to your FAT32 partition&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11247</id>
		<title>Uncomplicated Firewall</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11247"/>
		<updated>2015-10-04T09:38:35Z</updated>

		<summary type="html">&lt;p&gt;Summer: Fixed formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UFW stands for [https://launchpad.net/ufw Uncomplicated Firewall], and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
UFW can be found in the testing repository.  Read [[Alpine_Linux_package_management#Repository_pinning]] to enable the testing repository.&lt;br /&gt;
&lt;br /&gt;
Once the testing repository has been enabled, UFW can be installed by issuing the following command:&lt;br /&gt;
{{cmd| apk add ip6tables ufw@testing}}&lt;br /&gt;
&lt;br /&gt;
== Basic configuration ==&lt;br /&gt;
&lt;br /&gt;
The following is a simple configuration that will deny all incoming and outgoing data communication by default and allow incoming SSH, outgoing DNS and NTP traffic: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ufw default deny incoming&lt;br /&gt;
ufw default deny outgoing&lt;br /&gt;
ufw limit SSH         # open SSH port and protect against brute-force login attacks&lt;br /&gt;
ufw allow out 123/udp # allow outgoing NTP (Network Time Protocol)&lt;br /&gt;
&lt;br /&gt;
# The following instructions will allow apk to work:&lt;br /&gt;
ufw allow out DNS     # allow outgoing DNS&lt;br /&gt;
ufw allow out 80/tcp  # allow outgoing HTTP traffic&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lines are only needed the first time you install the package:&lt;br /&gt;
{{cmd|ufw enable     # enable the firewall&lt;br /&gt;
rc-update add ufw    # add UFW init scripts}}&lt;br /&gt;
&lt;br /&gt;
Check the status of UFW:&lt;br /&gt;
{{cmd|ufw status}}&lt;br /&gt;
&lt;br /&gt;
== Diskless mode ==&lt;br /&gt;
&lt;br /&gt;
If you have installed Alpine Linux as [[Installation#Installation_Handbook|diskless]] then you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your UFW configuration.  UFW data is stored in &amp;lt;code&amp;gt;/usr/lib/ufw&amp;lt;/code&amp;gt;, therefore use the following commands to save the UFW configuration:&lt;br /&gt;
{{cmd|lbu add /usr/lib/ufw&lt;br /&gt;
lbu commit}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11246</id>
		<title>Uncomplicated Firewall</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11246"/>
		<updated>2015-10-04T09:33:17Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Basic configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UFW stands for [https://launchpad.net/ufw Uncomplicated Firewall], and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
UFW can be found in the testing repository.  Read [[Alpine_Linux_package_management#Repository_pinning]] to enable the testing repository.&lt;br /&gt;
&lt;br /&gt;
Once the testing repository has been enabled, UFW can be installed by issuing the following command:&lt;br /&gt;
{{cmd| apk add ip6tables ufw@testing}}&lt;br /&gt;
&lt;br /&gt;
== Basic configuration ==&lt;br /&gt;
&lt;br /&gt;
The following is a simple configuration that will deny all incoming and outgoing data communication by default and allow incoming SSH, outgoing DNS and NTP traffic: &lt;br /&gt;
&lt;br /&gt;
{{cmd|ufw default deny incoming&lt;br /&gt;
ufw default deny outgoing&lt;br /&gt;
ufw limit SSH         # open SSH port and protect against brute-force login attacks&lt;br /&gt;
ufw allow out 123/udp # allow outgoing NTP (Network Time Protocol)&lt;br /&gt;
&lt;br /&gt;
# The following instructions will allow apk to work:&lt;br /&gt;
ufw allow out DNS     # allow outgoing DNS&lt;br /&gt;
ufw allow out 80/tcp  # allow outgoing HTTP traffic&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following lines are only needed the first time you install the package:&lt;br /&gt;
{{cmd|ufw enable&lt;br /&gt;
rc-update add ufw    # add UFW init scripts}}&lt;br /&gt;
&lt;br /&gt;
Check the status of UFW:&lt;br /&gt;
{{cmd|ufw status}}&lt;br /&gt;
&lt;br /&gt;
== Diskless mode ==&lt;br /&gt;
&lt;br /&gt;
If you have installed Alpine Linux as [[Installation#Installation_Handbook|diskless]] then you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your UFW configuration.  UFW data is stored in &amp;lt;code&amp;gt;/usr/lib/ufw&amp;lt;/code&amp;gt;, therefore use the following commands to save the UFW configuration:&lt;br /&gt;
{{cmd|lbu add /usr/lib/ufw&lt;br /&gt;
lbu commit}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Linux_Router_with_VPN_on_a_Raspberry_Pi&amp;diff=11245</id>
		<title>Linux Router with VPN on a Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Linux_Router_with_VPN_on_a_Raspberry_Pi&amp;diff=11245"/>
		<updated>2015-10-01T17:23:35Z</updated>

		<summary type="html">&lt;p&gt;Summer: Installation:  Added link to Raspberry Pi installation article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
= Rationale =&lt;br /&gt;
&lt;br /&gt;
This guide demonstrates how to set up a Raspberry Pi as an open source Linux router with a VPN tunnel. You will need a USB ethernet adaptor. I chose the [http://store.apple.com/us/product/MC704LL/A/apple-usb-ethernet-adapter Apple USB Ethernet Adapter] as it contains a ASIX AX88772 which has good Linux support. Be sure to not buy a cheap [https://projectgus.com/2013/03/anatomy-of-a-cheap-usb-ethernet-adapter/ counterfeit] one as they do exist. You may choose to also buy an [http://www.element14.com/community/docs/DOC-68907/l/shim-rtc-realtime-clock-accessory-board-for-raspberry-pi RTC clock]. If you don&#039;t have an RTC clock, the time is lost when your Pi is shut down. When it is rebooted, the time will be set back to Thursday, 1 January 1970. As this is earlier than the creation time of your VPN certificates OpenVPN will refuse to start, which may mean you cannot do DNS lookups over VPN.&lt;br /&gt;
&lt;br /&gt;
For wireless, a separate access point was purchased ([http://wiki.openwrt.org/toh/ubiquiti/unifi Ubiquiti UniFi AP]) because it contains a Atheros AR9287 which is supported by [https://wireless.wiki.kernel.org/en/users/drivers/ath9k ath9k] and I was keen to avoid blob drivers.&lt;br /&gt;
&lt;br /&gt;
You could choose to use an old x86/amd64 system instead. This may be a more attractive option if you want to route high speeds. If you want to route speeds above 100 Mbit/s you&#039;ll want to make use of hardware encryption like AES-NI.&lt;br /&gt;
&lt;br /&gt;
The network in this tutorial looks like this: [[File:network_diagram.png|center|Network Diagram]]&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This guide assumes you&#039;re using Alpine Linux from a micro SD card in ramdisk mode. It assumes you&#039;ve read the basics of how to use [[Alpine local backup]].  The [[Raspberry Pi]] article contains information on how to install Alpine Linux on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
= Modem in full bridge mode =&lt;br /&gt;
Your modem will need to be configured in &amp;quot;full bridge mode&amp;quot;. The method for doing this varies depending on the interface on your device and is out of the scope of this tutorial.&lt;br /&gt;
&lt;br /&gt;
The modem I am using is a [http://www.cisco.com/c/en/us/products/routers/877-integrated-services-router-isr/index.html Cisco 877 Integrated Services Router]. It has no web interface and is controlled over SSH. More information can be found [[Configuring a Cisco 877 in full bridge mode]].&lt;br /&gt;
&lt;br /&gt;
= Configuring PPP =&lt;br /&gt;
Next up we need to configure our router to be able to dial a PPP connection with our modem.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add ppp-pppoe}}&lt;br /&gt;
&lt;br /&gt;
Check that the interface between your router and modem is eth1, or change it. Enter your credentials at the bottom of the file or use /etc/ppp/chap-secrets&lt;br /&gt;
&lt;br /&gt;
== /etc/ppp/peers/yourISP ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nolog&lt;br /&gt;
&lt;br /&gt;
# Try to get the IP address from the ISP&lt;br /&gt;
noipdefault&lt;br /&gt;
&lt;br /&gt;
# Try to get the name server addresses from the ISP&lt;br /&gt;
usepeerdns&lt;br /&gt;
&lt;br /&gt;
# Use this connection as the default route.&lt;br /&gt;
defaultroute&lt;br /&gt;
&lt;br /&gt;
defaultroute-metric 300&lt;br /&gt;
&lt;br /&gt;
# detatch after ppp0 interface is created&lt;br /&gt;
updetach&lt;br /&gt;
&lt;br /&gt;
# Replace previous default route&lt;br /&gt;
#replacedefaultroute&lt;br /&gt;
&lt;br /&gt;
# rp-pppoe plug-in makes PPPoE connection so rp-pppoe package is not needed&lt;br /&gt;
#  Possibly, you may need to change interface according your configuration&lt;br /&gt;
plugin rp-pppoe.so eth1&lt;br /&gt;
&lt;br /&gt;
# Uncomment if you need on-demand connection&lt;br /&gt;
#demand&lt;br /&gt;
&lt;br /&gt;
# Disconnect after 300 seconds (5 minutes) of idle time.&lt;br /&gt;
#idle 300&lt;br /&gt;
&lt;br /&gt;
# Hide password from log entries&lt;br /&gt;
hide-password&lt;br /&gt;
&lt;br /&gt;
# Send echo requests&lt;br /&gt;
lcp-echo-interval 20&lt;br /&gt;
lcp-echo-failure 3&lt;br /&gt;
&lt;br /&gt;
# Do not authenticate ISP peer&lt;br /&gt;
noauth&lt;br /&gt;
&lt;br /&gt;
# Control connection consistency&lt;br /&gt;
persist&lt;br /&gt;
maxfail 0&lt;br /&gt;
&lt;br /&gt;
# Control MTU size if your ISP does not force it&lt;br /&gt;
#mtu 1492&lt;br /&gt;
&lt;br /&gt;
# Set your credentials&lt;br /&gt;
#  Alternatively you may use /etc/ppp/pap-secrets or /etc/ppp/chap-secrets files&lt;br /&gt;
user username@yourISP.tld&lt;br /&gt;
password &amp;lt;SECRET&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/modules ==&lt;br /&gt;
Update modules to include pppoe:&lt;br /&gt;
&amp;lt;pre&amp;gt;pppoe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Network =&lt;br /&gt;
&lt;br /&gt;
== /etc/hostname ==&lt;br /&gt;
Set this to your hostname eg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;HOST_NAME&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/hosts ==&lt;br /&gt;
Set your host and hostname&lt;br /&gt;
&amp;lt;pre&amp;gt;127.0.0.1	&amp;lt;HOST_NAME&amp;gt; &amp;lt;HOST_NAME&amp;gt;.&amp;lt;DOMAIN_NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::1		&amp;lt;HOST_NAME&amp;gt; ipv6-gateway ipv6-loopback&lt;br /&gt;
ff00::0		ipv6-localnet&lt;br /&gt;
ff00::0		ipv6-mcastprefix&lt;br /&gt;
ff02::1		ipv6-allnodes&lt;br /&gt;
ff02::2		ipv6-allrouters&lt;br /&gt;
ff02::3		ipv6-allhosts&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/network/interfaces ==&lt;br /&gt;
Configure your network interfaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;auto lo&lt;br /&gt;
    iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# internal interface&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
	address 192.168.1.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# external interface&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
	address 192.168.0.2&lt;br /&gt;
	netmask 255.255.255.252&lt;br /&gt;
&lt;br /&gt;
# internet connection&lt;br /&gt;
auto ppp0&lt;br /&gt;
iface ppp0 inet ppp&lt;br /&gt;
	pre-up ip link set dev eth1 up&lt;br /&gt;
	provider &amp;lt;yourISP&amp;gt; # Make sure this is the same as /etc/ppp/peers/yourISP&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Basic IPtables firewall with routing ==&lt;br /&gt;
This demonstrates how to set up basic routing with a permissive outgoing firewall. Incoming packets are blocked. The rest is commented in the rule set.&lt;br /&gt;
&lt;br /&gt;
First install iptables:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add iptables ip6tables}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#################################&lt;br /&gt;
# Basic iptables routing rule set&lt;br /&gt;
#################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Mangle Table&lt;br /&gt;
# We leave this empty for the moment.&lt;br /&gt;
#&lt;br /&gt;
*mangle&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Filter Table&lt;br /&gt;
# This is where we decide to ACCEPT, DROP or REJECT things&lt;br /&gt;
#&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT DROP [0:0]&lt;br /&gt;
:FORWARD DROP [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
*filter&lt;br /&gt;
&lt;br /&gt;
# Create rule chain per input interface for forwarding packets&lt;br /&gt;
:FWD_ETH0 - [0:0]&lt;br /&gt;
:FWD_ETH1 - [0:0]&lt;br /&gt;
:FWD_PPP0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create rule chain per input interface for input packets (for host itself)&lt;br /&gt;
:IN_ETH0 - [0:0]&lt;br /&gt;
:IN_ETH1 - [0:0]&lt;br /&gt;
:IN_PPP0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create a log drop chain&lt;br /&gt;
:LOG_DROP - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Pass input packet to corresponding rule chain&lt;br /&gt;
-A INPUT -i lo -j ACCEPT&lt;br /&gt;
-A INPUT -i eth0 -j IN_ETH0&lt;br /&gt;
-A INPUT -i eth1 -j IN_ETH1&lt;br /&gt;
-A INPUT -i ppp0 -j IN_PPP0&lt;br /&gt;
&lt;br /&gt;
# Pass forwarded packet to corresponding rule chain&lt;br /&gt;
-A FORWARD -i eth0 -j FWD_ETH0&lt;br /&gt;
-A FORWARD -i eth1 -j FWD_ETH1&lt;br /&gt;
-A FORWARD -i ppp0 -j FWD_PPP0&lt;br /&gt;
&lt;br /&gt;
# Forward LAN traffic out&lt;br /&gt;
-A FWD_ETH0 -s 192.168.1.0/24 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward SSH packets from network to modem&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.0/30 -d 192.168.1.0/24 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward HTTP to modem&#039;s webserver&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.0/30 -d 192.168.1.0/24 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward traffic to ISP&lt;br /&gt;
-A FWD_PPP0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# SSH to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# DNS to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p tcp -m tcp --dport 1812 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# FreeRadius Client (eg a UniFi AP)&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 1812 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# NTP to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Accept traffic&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# SSH To Modem from Router&lt;br /&gt;
-A IN_ETH1 -s 192.168.0.1/32 -d 192.168.0.0/30 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# HTTP to modem&lt;br /&gt;
-A IN_ETH1 -s 192.168.0.1/32 -d 192.168.0.0/30 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Accept incoming tracked PPP0 connection&lt;br /&gt;
-A IN_PPP0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# NAT Table&lt;br /&gt;
# This is where translation of packets happens and &amp;quot;forwarding&amp;quot; of ports&lt;br /&gt;
# to specific hosts.&lt;br /&gt;
#&lt;br /&gt;
*nat&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Port forwarding for Bittorrent&lt;br /&gt;
-A PREROUTING -i ppp0 -p tcp -m tcp --dport 6881:6889 -j DNAT --to-destination 192.168.1.20&lt;br /&gt;
-A PREROUTING -i ppp0 -p udp -m udp --dport 6881:6889 -j DNAT --to-destination 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
# Allows routing to our modem subnet so we can access the web interface or SSH&lt;br /&gt;
-A POSTROUTING -s 192.168.1.0/24 -d 192.168.0.1/32 -o eth1 -p tcp -m tcp --dport 22 -j MASQUERADE&lt;br /&gt;
-A POSTROUTING -s 192.168.1.0/24 -d 192.168.0.1/32 -o eth1 -p tcp -m tcp --dport 80 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
# Allows hosts of the network to use the PPP tunnel&lt;br /&gt;
-A POSTROUTING -s 192.168.1.0/24 -o ppp0 -j MASQUERADE&lt;br /&gt;
COMMIT&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;d also highly suggest reading these resources if you are new to iptables: &lt;br /&gt;
&lt;br /&gt;
* [https://www.frozentux.net/category/linux/iptables Frozen Tux Iptables-tutorial]&lt;br /&gt;
* [http://inai.de/links/iptables/ Words of wisdom for #netfilter]&lt;br /&gt;
* [http://sfvlug.editthis.info/wiki/Things_You_Should_Know_About_Netfilter Things You Should Know About Netfilter]&lt;br /&gt;
* [http://inai.de/documents/Perfect_Ruleset.pdf Towards the perfect ruleset]&lt;br /&gt;
&lt;br /&gt;
== /etc/sysctl.conf ==&lt;br /&gt;
These sysctl settings harden a few things and were mostly borrowed from the [https://wiki.archlinux.org/index.php/Sysctl#TCP.2FIP_stack_hardening ArchLinux wiki].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;net.ipv4.ip_forward = 1&lt;br /&gt;
net.ipv4.conf.default.rp_filter = 1&lt;br /&gt;
kernel.panic = 120&lt;br /&gt;
&lt;br /&gt;
#### ipv4 networking and equivalent ipv6 parameters ####&lt;br /&gt;
&lt;br /&gt;
## TCP SYN cookie protection (default)&lt;br /&gt;
## helps protect against SYN flood attacks&lt;br /&gt;
## only kicks in when net.ipv4.tcp_max_syn_backlog is reached&lt;br /&gt;
net.ipv4.tcp_syncookies = 1&lt;br /&gt;
&lt;br /&gt;
## protect against tcp time-wait assassination hazards&lt;br /&gt;
## drop RST packets for sockets in the time-wait state&lt;br /&gt;
## (not widely supported outside of linux, but conforms to RFC)&lt;br /&gt;
net.ipv4.tcp_rfc1337 = 1&lt;br /&gt;
&lt;br /&gt;
## sets the kernels reverse path filtering mechanism to value 1(on)&lt;br /&gt;
## will do source validation of the packet&#039;s recieved from all the interfaces on the machine&lt;br /&gt;
## protects from attackers that are using ip spoofing methods to do harm&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
net.ipv6.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
## tcp timestamps&lt;br /&gt;
## + protect against wrapping sequence numbers (at gigabit speeds)&lt;br /&gt;
## + round trip time calculation implemented in TCP&lt;br /&gt;
## - causes extra overhead and allows uptime detection by scanners like nmap&lt;br /&gt;
## enable @ gigabit speeds&lt;br /&gt;
net.ipv4.tcp_timestamps = 0&lt;br /&gt;
#net.ipv4.tcp_timestamps = 1&lt;br /&gt;
&lt;br /&gt;
## log martian packets&lt;br /&gt;
net.ipv4.conf.all.log_martians = 1&lt;br /&gt;
&lt;br /&gt;
## ignore echo broadcast requests to prevent being part of smurf attacks (default)&lt;br /&gt;
net.ipv4.icmp_echo_ignore_broadcasts = 1&lt;br /&gt;
&lt;br /&gt;
## ignore bogus icmp errors (default)&lt;br /&gt;
net.ipv4.icmp_ignore_bogus_error_responses = 1&lt;br /&gt;
&lt;br /&gt;
## send redirects (not a router, disable it)&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
## ICMP routing redirects (only secure)&lt;br /&gt;
#net.ipv4.conf.all.secure_redirects = 1 (default)&lt;br /&gt;
net/ipv4/conf/default/accept_redirects=0&lt;br /&gt;
net/ipv4/conf/all/accept_redirects=0&lt;br /&gt;
net/ipv6/conf/default/accept_redirects=0&lt;br /&gt;
net/ipv6/conf/all/accept_redirects=0&lt;br /&gt;
&lt;br /&gt;
# Disable ipv6&lt;br /&gt;
net.ipv6.conf.all.disable_ipv6 = 1&lt;br /&gt;
net.ipv6.conf.default.disable_ipv6 = 1&lt;br /&gt;
net.ipv6.conf.lo.disable_ipv6 = 1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DHCP =&lt;br /&gt;
{{cmd|apk add dhcp}}&lt;br /&gt;
&lt;br /&gt;
== /etc/conf.d/dhcpd ==&lt;br /&gt;
Change DHCPD_IFACE=&amp;quot;eth0&amp;quot; to the interface you want DHCP to run on.&lt;br /&gt;
&lt;br /&gt;
== /etc/dhcp/dhcpd.conf ==&lt;br /&gt;
Configure your DHCP configuration server. For my DHCP server I&#039;m going to have three subnets. Each has a specific purpose. You may choose to have any number of subnets like below. The broadcast-address would be different if you used VLANs. However in this case we are not.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;authoritative;&lt;br /&gt;
ddns-update-style interim;&lt;br /&gt;
&lt;br /&gt;
shared-network home {&lt;br /&gt;
    # Subnet for regular nodes that require direct Internet access&lt;br /&gt;
    subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.240;&lt;br /&gt;
	default-lease-time 259200;&lt;br /&gt;
	max-lease-time 518400;&lt;br /&gt;
	option subnet-mask 255.255.255.0;&lt;br /&gt;
	option broadcast-address 192.168.1.255;&lt;br /&gt;
	option routers 192.168.1.1;&lt;br /&gt;
	option ntp-servers 192.168.1.1;&lt;br /&gt;
	option domain-name-servers 192.168.1.1;&lt;br /&gt;
	allow unknown-clients;&lt;br /&gt;
&lt;br /&gt;
        host Gaming_Computer {&lt;br /&gt;
            hardware ethernet XX:XX:XX:XX:XX:XX;&lt;br /&gt;
            fixed-address 192.168.1.20;&lt;br /&gt;
            option subnet-mask 255.255.255.0;&lt;br /&gt;
            option routers 192.168.1.1;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    # Subnet for regular nodes that require VPN access&lt;br /&gt;
    subnet 192.168.2.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.2.10 192.168.2.240;&lt;br /&gt;
	default-lease-time 259200;&lt;br /&gt;
	max-lease-time 518400;&lt;br /&gt;
	option subnet-mask 255.255.255.0;&lt;br /&gt;
	option broadcast-address 192.168.1.255;&lt;br /&gt;
	option routers 192.168.2.1;&lt;br /&gt;
        option ntp-servers 192.168.2.1;&lt;br /&gt;
	option domain-name-servers 192.168.1.1;&lt;br /&gt;
	ignore unknown-clients;&lt;br /&gt;
&lt;br /&gt;
        host Linux_Workstation {&lt;br /&gt;
            hardware ethernet YY:YY:YY:YY:YY:YY;&lt;br /&gt;
            fixed-address 192.168.2.20;&lt;br /&gt;
            option subnet-mask 255.255.255.0;&lt;br /&gt;
            option routers 192.168.2.1;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    # Subnet for regular nodes that require no Internet access&lt;br /&gt;
    subnet 192.168.3.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.3.10 192.168.3.240;&lt;br /&gt;
	default-lease-time 259200;&lt;br /&gt;
	max-lease-time 518400;&lt;br /&gt;
	option subnet-mask 255.255.255.0;&lt;br /&gt;
	option broadcast-address 192.168.1.255;&lt;br /&gt;
	option routers 192.168.3.1;&lt;br /&gt;
        option ntp-servers 192.168.3.1;&lt;br /&gt;
	option domain-name-servers 192.168.1.1;&lt;br /&gt;
	ignore unknown-clients;&lt;br /&gt;
&lt;br /&gt;
        host printer {&lt;br /&gt;
            hardware ethernet ZZ:ZZ:ZZ:ZZ:ZZ:ZZ;&lt;br /&gt;
            fixed-address 192.168.3.9;&lt;br /&gt;
            option subnet-mask 255.255.255.0;&lt;br /&gt;
            option routers 192.168.3.1;&lt;br /&gt;
	}&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure to add this to the default run level once configured:&lt;br /&gt;
{{cmd|rc-update add dhcp default}}&lt;br /&gt;
&lt;br /&gt;
= Synchronizing the clock =&lt;br /&gt;
&lt;br /&gt;
You can choose to use BusyBox&#039;s ntpd or you can choose a more fully fledged option like [http://www.openntpd.org OpenNTPD]&lt;br /&gt;
&lt;br /&gt;
== Busybox /etc/conf.d/ntpd ==&lt;br /&gt;
Allow clients to synchronize their clocks with the router.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# By default ntpd runs as a client. Add -l to run as a server on port 123.&lt;br /&gt;
NTPD_OPTS=&amp;quot;-l -N -p &amp;lt;REMOTE TIME SERVER&amp;gt;&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure to add this to the default run level once configured:&lt;br /&gt;
{{cmd|rc-update add ntpd default}}&lt;br /&gt;
&lt;br /&gt;
Or if you prefer to synchronize with multiple servers...&lt;br /&gt;
&lt;br /&gt;
== OpenNTPD /etc/ntpd.conf ==&lt;br /&gt;
&lt;br /&gt;
Install OpenNTPD&lt;br /&gt;
{{cmd|apk add openntpd}}&lt;br /&gt;
&lt;br /&gt;
Add to default run level.&lt;br /&gt;
{{cmd|rc-update add openntpd default}}&lt;br /&gt;
&lt;br /&gt;
=== /etc/ntpd.conf ===&lt;br /&gt;
&amp;lt;pre&amp;gt;# sample ntpd configuration file, see ntpd.conf(5)&lt;br /&gt;
&lt;br /&gt;
# Addresses to listen on (ntpd does not listen by default)&lt;br /&gt;
listen on 192.168.1.1&lt;br /&gt;
listen on 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
# sync to a single server&lt;br /&gt;
#server ntp.example.org&lt;br /&gt;
&lt;br /&gt;
# use a random selection of NTP Pool Time Servers&lt;br /&gt;
# see http://support.ntp.org/bin/view/Servers/NTPPoolServers&lt;br /&gt;
server 0.pool.ntp.org&lt;br /&gt;
server 1.pool.ntp.org&lt;br /&gt;
server 2.pool.ntp.org&lt;br /&gt;
server 3.pool.ntp.org&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== tlsdate ==&lt;br /&gt;
The time can also be extracted from a https handshake. If the certificate is self-signed you will need to use skip-verification:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add tlsdate}}&lt;br /&gt;
{{cmd|tlsdate -V --skip-verification -p 80 -H example.com}}&lt;br /&gt;
&lt;br /&gt;
== timezone ==&lt;br /&gt;
You might also want to set a timezone, see [[Setting the timezone]].&lt;br /&gt;
&lt;br /&gt;
= Saving Time =&lt;br /&gt;
There are two ways to do this. If you didn&#039;t buy an RTC clock see [[Saving time with Software Clock]]. If you did like the PiFace Real Time Clock see [[Saving time with Hardware Clock]]&lt;br /&gt;
&lt;br /&gt;
= Unbound DNS forwarder with dnscrypt =&lt;br /&gt;
We want to be able to do our lookups using [http://dnscrypt.org dnscrypt] without installing dnscrypt on every client on the network. Therefore the router will also run a DNS forwarder and request unknown domains over dnscrypt for our clients.&lt;br /&gt;
&lt;br /&gt;
== Unbound ==&lt;br /&gt;
First install {{cmd|apk add unbound}}&lt;br /&gt;
&lt;br /&gt;
=== /etc/unbound/unbound.conf ===&lt;br /&gt;
&amp;lt;pre&amp;gt;# unbound.conf(5) man page.&lt;br /&gt;
#&lt;br /&gt;
# See /usr/share/doc/unbound/examples/unbound.conf for a commented&lt;br /&gt;
# reference config file.&lt;br /&gt;
&lt;br /&gt;
server:&lt;br /&gt;
    # The following line will configure unbound to perform cryptographic&lt;br /&gt;
    # DNSSEC validation using the root trust anchor.&lt;br /&gt;
    # auto-trust-anchor-file: &amp;quot;/var/lib/unbound/root.key&amp;quot;&lt;br /&gt;
server:&lt;br /&gt;
verbosity: 1&lt;br /&gt;
num-threads: 4                                                        &lt;br /&gt;
interface: 192.168.1.1&lt;br /&gt;
 do-ip4: yes&lt;br /&gt;
 do-udp: yes&lt;br /&gt;
 do-tcp: yes&lt;br /&gt;
 access-control: 192.168.1.0/24 allow  # Specify the subnets you want to listen on&lt;br /&gt;
 access-control: 192.168.2.0/24 allow&lt;br /&gt;
 do-not-query-localhost: no&lt;br /&gt;
 chroot: &amp;quot;&amp;quot;       &lt;br /&gt;
 logfile: &amp;quot;/var/log/unbound.log&amp;quot;             &lt;br /&gt;
 use-syslog: no &lt;br /&gt;
 hide-identity: yes&lt;br /&gt;
 hide-version: yes &lt;br /&gt;
 harden-glue: yes&lt;br /&gt;
 harden-dnssec-stripped: yes&lt;br /&gt;
 use-caps-for-id: yes       &lt;br /&gt;
 private-domain: &amp;quot;&amp;lt;HOSTNAME&amp;gt;&amp;quot;      &lt;br /&gt;
 #local-zone: &amp;quot;localhost.&amp;quot; static&lt;br /&gt;
 #local-data: &amp;quot;freebox.localhost. IN A 192.168.0.254&amp;quot;                                              &lt;br /&gt;
 #local-data-ptr: &amp;quot;192.168.0.254 freebox.localhost&amp;quot;&lt;br /&gt;
python:&lt;br /&gt;
remote-control:&lt;br /&gt;
forward-zone:&lt;br /&gt;
  name: &amp;quot;.&amp;quot;&lt;br /&gt;
  forward-addr: 127.0.0.2@53&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== /etc/network/interfaces ===&lt;br /&gt;
You&#039;ll need a second loopback device, put it under the already existing one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;auto lo&lt;br /&gt;
    iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto lo:1&lt;br /&gt;
iface lo:1 inet static&lt;br /&gt;
	address 127.0.0.2&lt;br /&gt;
	netmask 255.0.0.0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Blocking nasties on the network by domain ==&lt;br /&gt;
It seems Microsoft has added a whole bunch of telemetry (spyware) analytics to Windows itself, whereby the OS now calls home with various information regarding it&#039;s usage. Back porting to previous versions of Windows is not an option, because the telemetry patches have also been back ported to 7/8.1.&lt;br /&gt;
&lt;br /&gt;
Changing the knobs in Windows to stop this activity doesn&#039;t silence it completely, and they can always be reset with another update from Microsoft. It is however unlikely they will change the domains that are looked up. More information about that can be found [https://www.privacytools.io/#win10 here]. You should also consider ditching Windows entirely and using a proper operating system that does not contain intrusive malware [https://www.privacytools.io/#os here are a few choices to consider].&lt;br /&gt;
&lt;br /&gt;
As this is a network router, it might be prudent to block those domains.&lt;br /&gt;
&lt;br /&gt;
This script takes in a list of domains and produces a filter file. We are directing all lookups to &amp;quot;0.0.0.1&amp;quot; which is an invalid IP and should fail immediately, unlike localhost. There are lists of the addresses in various places such as [https://www.reddit.com/r/privacy/comments/3htei2/stop_windows_10_from_phoning_home_by_blocking/cuafuvg here] and in this [https://github.com/10se1ucgo/DisableWinTracking/blob/master/run.py#L188 script].&lt;br /&gt;
&lt;br /&gt;
You could also use this to block advertising, but that&#039;s probably easier to do in a web browser with something like [https://en.wikipedia.org/wiki/UBlock UBlock/UBlock Origin].&lt;br /&gt;
&lt;br /&gt;
=== /etc/unbound/unbound.conf ===&lt;br /&gt;
In your main unbound configuration add&lt;br /&gt;
&amp;lt;pre&amp;gt;include: /etc/unbound/filter.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Script to prepare/sort domains for Unbound  ===&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
##################################################&lt;br /&gt;
# Script taken from http://npr.me.uk/unbound.html&lt;br /&gt;
# Note you need GNU sed&lt;br /&gt;
##################################################&lt;br /&gt;
&lt;br /&gt;
# Remove &amp;quot;#&amp;quot; comments&lt;br /&gt;
# Remove space and tab&lt;br /&gt;
# Remove blank lines&lt;br /&gt;
# Remove localhost and broadcasthost lines&lt;br /&gt;
# Keep just the hosts&lt;br /&gt;
# Remove leading and trailing space and tab (again)&lt;br /&gt;
# Make everything lower case&lt;br /&gt;
&lt;br /&gt;
sed -e &amp;quot;s/#.*//&amp;quot; \&lt;br /&gt;
    -e &amp;quot;s/[ \x09]*$//&amp;quot;\&lt;br /&gt;
    -e &amp;quot;/^$/ d&amp;quot; \&lt;br /&gt;
    -e &amp;quot;/^.*local.*/ d&amp;quot; \&lt;br /&gt;
    -e &amp;quot;/^.*broadcasthost.*/ d&amp;quot; \&lt;br /&gt;
    -e &amp;quot;s/\(^.*\) \([a-zA-Z0-9\.\-]*\)/\2/&amp;quot; \&lt;br /&gt;
    -e &amp;quot;s/^[ \x09]*//;s/[ \x09]*$//&amp;quot; $1 \&lt;br /&gt;
    -e &amp;quot;s/\(.*\)/\L\1/&amp;quot; hosts.txt &amp;gt; temp1.txt&lt;br /&gt;
&lt;br /&gt;
# Remove any duplicate hosts&lt;br /&gt;
&lt;br /&gt;
sort temp1.txt | uniq &amp;gt;temp2.txt&lt;br /&gt;
&lt;br /&gt;
# Remove any hosts starting with &amp;quot;.&amp;quot;&lt;br /&gt;
# Create the two required lines for each host.&lt;br /&gt;
&lt;br /&gt;
sed -e &amp;quot;/^\..*/ d&amp;quot; \&lt;br /&gt;
    -e &amp;quot;s/\(^.*\)/local-zone: \x22\1\x22 redirect\nlocal-data: \x22\1 A 0.0.0.1\x22/&amp;quot; \&lt;br /&gt;
       temp2.txt &amp;gt; filter.conf&lt;br /&gt;
&lt;br /&gt;
# Clean up&lt;br /&gt;
rm temp1.txt&lt;br /&gt;
rm temp2.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/unbound/filter.conf ==&lt;br /&gt;
&amp;lt;pre&amp;gt;local-zone: &amp;quot;a-0001.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0001.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0002.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0002.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0003.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0003.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0004.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0004.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0005.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0005.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0006.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0006.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0007.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0007.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0008.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0008.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-0009.a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-0009.a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a-msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a-msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a.ads1.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a.ads1.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a.ads2.msads.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a.ads2.msads.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a.ads2.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a.ads2.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;a.rad.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;a.rad.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ac3.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ac3.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ad.doubleclick.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ad.doubleclick.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;adnexus.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;adnexus.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;adnxs.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;adnxs.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ads.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ads.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ads1.msads.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ads1.msads.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ads1.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ads1.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;aidps.atdmt.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;aidps.atdmt.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;aka-cdn-ns.adtech.de&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;aka-cdn-ns.adtech.de A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;apps.skype.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;apps.skype.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;az361816.vo.msecnd.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;az361816.vo.msecnd.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;az512334.vo.msecnd.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;az512334.vo.msecnd.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;b.ads1.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;b.ads1.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;b.ads2.msads.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;b.ads2.msads.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;b.rad.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;b.rad.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;bs.serving-sys.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;bs.serving-sys.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;c.atdmt.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;c.atdmt.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;c.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;c.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;cdn.atdmt.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;cdn.atdmt.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;cds26.ams9.msecn.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;cds26.ams9.msecn.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;choice.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;choice.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;choice.microsoft.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;choice.microsoft.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;compatexchange.cloudapp.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;compatexchange.cloudapp.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;corp.sts.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;corp.sts.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;corpext.msitadfs.glbdns2.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;corpext.msitadfs.glbdns2.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;cs1.wpc.v0cdn.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;cs1.wpc.v0cdn.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;db3aqu.atdmt.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;db3aqu.atdmt.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;df.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;df.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;diagnostics.support.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;diagnostics.support.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ec.atdmt.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ec.atdmt.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;fe2.update.microsoft.com.akadns.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;fe2.update.microsoft.com.akadns.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;feedback.microsoft-hohm.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;feedback.microsoft-hohm.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;feedback.search.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;feedback.search.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;feedback.windows.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;feedback.windows.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;flex.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;flex.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;g.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;g.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;h1.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;h1.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;h2.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;h2.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;i1.services.social.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;i1.services.social.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;i1.services.social.microsoft.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;i1.services.social.microsoft.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;lb1.www.ms.akadns.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;lb1.www.ms.akadns.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;live.rads.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;live.rads.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;m.adnxs.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;m.adnxs.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;m.hotmail.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;m.hotmail.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;msedge.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;msedge.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;msftncsi.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;msftncsi.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;msnbot-65-55-108-23.search.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;msnbot-65-55-108-23.search.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;msntest.serving-sys.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;msntest.serving-sys.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;oca.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;oca.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;oca.telemetry.microsoft.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;oca.telemetry.microsoft.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;pre.footprintpredict.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;pre.footprintpredict.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;preview.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;preview.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;pricelist.skype.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;pricelist.skype.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;rad.live.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;rad.live.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;rad.msn.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;rad.msn.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;redir.metaservices.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;redir.metaservices.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;reports.wes.df.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;reports.wes.df.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;s.gateway.messenger.live.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;s.gateway.messenger.live.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;s0.2mdn.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;s0.2mdn.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;schemas.microsoft.akadns.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;schemas.microsoft.akadns.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;secure.adnxs.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;secure.adnxs.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;secure.flashtalking.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;secure.flashtalking.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;services.wes.df.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;services.wes.df.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;settings-sandbox.data.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;settings-sandbox.data.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;settings-win.data.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;settings-win.data.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;sls.update.microsoft.com.akadns.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;sls.update.microsoft.com.akadns.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;so.2mdn.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;so.2mdn.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;sqm.df.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;sqm.df.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;sqm.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;sqm.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;sqm.telemetry.microsoft.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;sqm.telemetry.microsoft.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;static.2mdn.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;static.2mdn.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;statsfe1.ws.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;statsfe1.ws.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;statsfe2.update.microsoft.com.akadns.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;statsfe2.update.microsoft.com.akadns.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;statsfe2.ws.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;statsfe2.ws.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;survey.watson.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;survey.watson.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;telecommand.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;telecommand.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;telecommand.telemetry.microsoft.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;telecommand.telemetry.microsoft.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;telemetry.appex.bing.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;telemetry.appex.bing.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;telemetry.appex.bing.net:443&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;telemetry.appex.bing.net:443 A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;telemetry.urs.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;telemetry.urs.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;ui.skype.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;ui.skype.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;view.atdmt.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;view.atdmt.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;vortex-bn2.metron.live.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;vortex-bn2.metron.live.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;vortex-cy2.metron.live.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;vortex-cy2.metron.live.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;vortex-sandbox.data.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;vortex-sandbox.data.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;vortex-win.data.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;vortex-win.data.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;vortex.data.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;vortex.data.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;watson.live.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;watson.live.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;watson.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;watson.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;watson.ppe.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;watson.ppe.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;watson.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;watson.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;watson.telemetry.microsoft.com.nsatc.net&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;watson.telemetry.microsoft.com.nsatc.net A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;wes.df.telemetry.microsoft.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;wes.df.telemetry.microsoft.com A 0.0.0.1&amp;quot;&lt;br /&gt;
local-zone: &amp;quot;www.msftncsi.com&amp;quot; redirect&lt;br /&gt;
local-data: &amp;quot;www.msftncsi.com A 0.0.0.1&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DNSCrypt ==&lt;br /&gt;
You&#039;ll need to pin the testing repository. See: [[Alpine Linux package management#Repository pinning]]&lt;br /&gt;
&lt;br /&gt;
Then install:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add dnscrypt-proxy@testing}}&lt;br /&gt;
&lt;br /&gt;
=== /etc/conf.d/dnscrypt-proxy ===&lt;br /&gt;
Enter a dnscrypt server, it should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# DNSCRYPT_LOGFILE=/var/log/dnscrypt-proxy/dnscrypt-proxy.log&lt;br /&gt;
&lt;br /&gt;
# override listen address where DNSCRYPT listen&lt;br /&gt;
DNSCRYPT_LOCALIP=127.0.0.2:53&lt;br /&gt;
&lt;br /&gt;
RESOLVER=208.67.220.220:443                                                        &lt;br /&gt;
PROVIDER=2.dnscrypt-cert.opendns.com                                               &lt;br /&gt;
PUBKEY=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally add both to the default run level&lt;br /&gt;
{{cmd|rc-update add unbound default}}&lt;br /&gt;
{{cmd|rc-update add dnscrypt-proxy default}}&lt;br /&gt;
&lt;br /&gt;
= WiFi 802.1x EAP and FreeRadius =&lt;br /&gt;
A more secure way than using pre-shared keys (WPA2) is to use [https://en.wikipedia.org/wiki/Extensible_Authentication_Protocol#EAP-TLS EAP-TLS] and use separate certificates for each device. See [[FreeRadius EAP-TLS configuration]]&lt;br /&gt;
&lt;br /&gt;
= VPN Tunnel on specific subnet =&lt;br /&gt;
As mentioned earlier in this article it might be useful to have a VPN subnet and a non-VPN subnet. Typically gaming consoles or computers might want low-latency connections. For this exercise we use fwmark.&lt;br /&gt;
&lt;br /&gt;
Install the necessary packages:&lt;br /&gt;
{{cmd|apk add openvpn iproute2 iputils}}&lt;br /&gt;
&lt;br /&gt;
== /etc/modules ==&lt;br /&gt;
You&#039;ll want to add the tun module&lt;br /&gt;
&amp;lt;pre&amp;gt;tun&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/iproute2/rt_tables ==&lt;br /&gt;
Add the two routing tables to the bottom of rt_tables. It should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;#&lt;br /&gt;
# reserved values&lt;br /&gt;
#&lt;br /&gt;
255	local&lt;br /&gt;
254	main&lt;br /&gt;
253	default&lt;br /&gt;
0	unspec&lt;br /&gt;
#&lt;br /&gt;
# local&lt;br /&gt;
#&lt;br /&gt;
#1	inr.ruhep&lt;br /&gt;
1 ISP&lt;br /&gt;
2 VPN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/network/interfaces ==&lt;br /&gt;
Next up add the virtual interface: eth0:2, just under eth0 will do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
	address 192.168.1.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# Virtual interface&lt;br /&gt;
auto eth0:2&lt;br /&gt;
iface eth0:2 inet static&lt;br /&gt;
	address 192.168.2.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
        post-up /etc/network/fwmark_rules&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/sysctl.conf ==&lt;br /&gt;
If you want to use fwmark rules you need to change this setting. It causes the router to still do source validation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;net.ipv4.conf.all.rp_filter = 2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fwmark won&#039;t work if you have this set to 1.&lt;br /&gt;
&lt;br /&gt;
== /etc/network/fwmark_rules ==&lt;br /&gt;
In this file we want to put the fwmark rules and set the correct priorities.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Normal packets to go direct out WAN&lt;br /&gt;
/sbin/ip rule add fwmark 1 table ISP prio 100&lt;br /&gt;
&lt;br /&gt;
# Put packets destined into VPN when VPN is up&lt;br /&gt;
/sbin/ip rule add fwmark 2 table VPN prio 200&lt;br /&gt;
&lt;br /&gt;
# Prevent packets from being routed out when VPN is down.&lt;br /&gt;
# This prevents packets from falling back to the main table&lt;br /&gt;
# that has a priority of 32766&lt;br /&gt;
/sbin/ip rule add prohibit fwmark 2 prio 300&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/ppp/ip-up ==&lt;br /&gt;
Next up we want to create the routes that should be run when PPP comes online. There are special hooks we can use in ip-up and ip-down to refer to the IP address, [https://ppp.samba.org/pppd.html#sect13 ppp man file - Scripts ] You can also read about them in your man file if you have ppp-doc installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# This script is run by pppd when there&#039;s a successful ppp connection.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Flush out any old rules that might be there&lt;br /&gt;
/sbin/ip route flush table ISP&lt;br /&gt;
&lt;br /&gt;
# Add route to table from subnets on LAN&lt;br /&gt;
/sbin/ip route add 192.168.1.0/24 dev eth0 table ISP&lt;br /&gt;
/sbin/ip route add 192.168.2.0/24 dev eth0 table ISP&lt;br /&gt;
&lt;br /&gt;
# Add route from IP given by ISP to the table&lt;br /&gt;
/sbin/ip rule add from ${IPLOCAL} table ISP prio 100&lt;br /&gt;
&lt;br /&gt;
# Add a default route&lt;br /&gt;
/sbin/ip route add table ISP default via ${IPLOCAL}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/ppp/ip-down ==&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# This script is run by pppd after the connection has ended.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Delete the rules when we take the interface down&lt;br /&gt;
/sbin/ip rule del from ${IPLOCAL} table ISP prio 100&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/openvpn/route-up-fwmark.sh ==&lt;br /&gt;
OpenVPN needs similar routing scripts and it also has it&#039;s own special hooks that allow you to specify particular values. A full list is here [https://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html#lbAS OpenVPN man file - Environmental Variables]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# This script is run by OpenVPN when there&#039;s a successful VPN connection.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Flush out any old rules that might be there&lt;br /&gt;
/sbin/ip route flush table VPN&lt;br /&gt;
&lt;br /&gt;
# Add route to table from 192.168.2.0/24 subnet on LAN&lt;br /&gt;
/sbin/ip route add 192.168.2.0/24 dev eth0 table VPN&lt;br /&gt;
&lt;br /&gt;
# Add route from VPN interface IP to the VPN table&lt;br /&gt;
/sbin/ip rule add from ${ifconfig_local} table VPN prio 200&lt;br /&gt;
&lt;br /&gt;
# Add a default route&lt;br /&gt;
/sbin/ip route add default via ${ifconfig_local} dev ${dev} table VPN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/openvpn/route-pre-down-fwmark.sh ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# This script is run by OpenVPN after the connection has ended&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Delete the rules when we take the interface down&lt;br /&gt;
/sbin/ip rule del from ${ifconfig_local} table VPN prio 200&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What I did find was when starting and stopping the OpenVPN service if you used:&lt;br /&gt;
&lt;br /&gt;
{{cmd|service openvpn stop}}&lt;br /&gt;
&lt;br /&gt;
The rules in route-pre-down-fwmark.sh were not executed.&lt;br /&gt;
&lt;br /&gt;
However:&lt;br /&gt;
&lt;br /&gt;
{{cmd|/etc/init.d/openvpn stop}}&lt;br /&gt;
&lt;br /&gt;
seemed to work correctly.&lt;br /&gt;
&lt;br /&gt;
== Advanced IPtables rules that allow us to route into our two routing tables ==&lt;br /&gt;
This is an expansion of the previous set of rules. It sets up NAT masquerading for the 192.168.2.0 to go through the VPN using marked packets.&lt;br /&gt;
&lt;br /&gt;
I used these guides to write complete this: &lt;br /&gt;
&lt;br /&gt;
* [http://nerdboys.com/2006/05/05/conning-the-mark-multiwan-connections-using-iptables-mark-connmark-and-iproute2 Conning the Mark: Multiwan connections using IPTables, MARK, CONNMARK and iproute2 ]&lt;br /&gt;
* [http://nerdboys.com/2006/05/08/multiwan-connections-addendum Multiwan connections addendum]&lt;br /&gt;
* [http://inai.de/images/nf-packet-flow.png Netfilter packet flow]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#########################################################################&lt;br /&gt;
# Advanced routing rule set&lt;br /&gt;
# Uses 192.168.1.0 via ISP&lt;br /&gt;
#      192.168.2.0 via VPN&lt;br /&gt;
#&lt;br /&gt;
# Packets to/from 192.168.1.0/24 are marked with 0x1 and routed to ISP&lt;br /&gt;
# Packets to/from 192.168.2.0/24 are marked with 0x2 and routed to VPN&lt;br /&gt;
#&lt;br /&gt;
#########################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# NAT Table&lt;br /&gt;
# This is where translation of packets happens and &amp;quot;forwarding&amp;quot; of ports&lt;br /&gt;
# to specific hosts.&lt;br /&gt;
#&lt;br /&gt;
*nat&lt;br /&gt;
&lt;br /&gt;
# Set default policies for table&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Port forwarding for Bittorrent&lt;br /&gt;
-A PREROUTING -i tun0 -p tcp -m tcp --dport 6881:6889 -j DNAT --to-destination 192.168.2.20&lt;br /&gt;
-A PREROUTING -i tun0 -p udp -m udp --dport 6881:6889 -j DNAT --to-destination 192.168.2.20&lt;br /&gt;
&lt;br /&gt;
# Allows routing to our modem subnet so we can access the web interface&lt;br /&gt;
-A POSTROUTING -s 192.168.1.0/24 -d 192.168.0.1/32 -o eth1 -p tcp -m tcp --dport 80 -j MASQUERADE&lt;br /&gt;
-A POSTROUTING -s 192.168.2.0/24 -d 192.168.0.1/32 -o eth1 -p tcp -m tcp --dport 80 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
# Allows hosts of the network to use the VPN tunnel&lt;br /&gt;
-A POSTROUTING -o tun0 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
# Allows hosts of the network to use the PPP tunnel&lt;br /&gt;
-A POSTROUTING -o ppp0 -j MASQUERADE&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Filter Table&lt;br /&gt;
# This is where we decide to ACCEPT, DROP or REJECT things&lt;br /&gt;
#&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT DROP [0:0]&lt;br /&gt;
:FORWARD DROP [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create rule chain per input interface for forwarding packets&lt;br /&gt;
:FWD_ETH0 - [0:0]&lt;br /&gt;
:FWD_ETH1 - [0:0]&lt;br /&gt;
:FWD_PPP0 - [0:0]&lt;br /&gt;
:FWD_TUN0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create rule chain per input interface for input packets (for host itself)&lt;br /&gt;
:IN_ETH0 - [0:0]&lt;br /&gt;
:IN_ETH1 - [0:0]&lt;br /&gt;
:IN_PPP0 - [0:0]&lt;br /&gt;
:IN_TUN0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create a log drop chain&lt;br /&gt;
:LOG_DROP - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create a reject chain&lt;br /&gt;
:LOG_REJECT - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Pass input packet to corresponding rule chain&lt;br /&gt;
-A INPUT -i lo -j ACCEPT&lt;br /&gt;
-A INPUT -i eth0 -j IN_ETH0&lt;br /&gt;
-A INPUT -i eth1 -j IN_ETH1&lt;br /&gt;
-A INPUT -i ppp0 -j IN_PPP0&lt;br /&gt;
-A INPUT -i tun0 -j IN_TUN0&lt;br /&gt;
&lt;br /&gt;
# Track forwarded packets&lt;br /&gt;
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Pass forwarded packet to corresponding rule chain&lt;br /&gt;
-A FORWARD -i eth0 -j FWD_ETH0&lt;br /&gt;
-A FORWARD -i eth1 -j FWD_ETH1&lt;br /&gt;
-A FORWARD -i ppp0 -j FWD_PPP0&lt;br /&gt;
-A FORWARD -i tun0 -j FWD_TUN0&lt;br /&gt;
&lt;br /&gt;
# Forward traffic to ISP&lt;br /&gt;
-A FWD_ETH0 -s 192.168.1.0/24 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward traffic to VPN&lt;br /&gt;
-A FWD_ETH0 -s 192.168.2.0/24 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Allow excepted server to be FORWARD to ppp0&lt;br /&gt;
#-A FWD_ETH0 -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -o ppp0 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward SSH packets from network to modem&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.1.0/24 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.2.0/24 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward HTTP packets from network to modem&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.1.0/24 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.2.0/24 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward Bittorrent Port to workstation&lt;br /&gt;
-A FWD_TUN0 -d 192.168.2.20/32 -p tcp -m tcp --dport 6881:6889 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A FWD_TUN0 -d 192.168.2.20/32 -p udp -m udp --dport 6881:6889 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# SSH to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# DNS to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -p udp -m udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# FreeRadius Client (eg a UniFi AP)&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p tcp -m tcp --dport 1812 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 1812 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Ubiquiti UAP Device Discovery Broadcast&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 10001 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# NTP to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -p udp -m udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Accept traffic to router on both subnets&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Allow excepted server to be INPUT to eth0 from LAN&lt;br /&gt;
#-A IN_ETH0 -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -o ppp0 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# SSH To Modem from Router&lt;br /&gt;
-A IN_ETH1 -s 192.168.0.1/32 -d 192.168.0.0/30 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# HTTP To Modem from Router&lt;br /&gt;
-A IN_ETH1 -s 192.168.0.1/32 -d 192.168.0.0/30 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Accept incoming tracked PPP0 connection&lt;br /&gt;
-A IN_PPP0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Log dropped packets coming in on PPP0&lt;br /&gt;
-A IN_PPP0 -j LOG --log-prefix &amp;quot;DROP:INPUT &amp;quot; --log-level 6&lt;br /&gt;
-A IN_PPP0 -j LOG_DROP&lt;br /&gt;
&lt;br /&gt;
# Accept incoming tracked TUN0 connection&lt;br /&gt;
-A IN_TUN0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Log dropped packets coming in on TUN0&lt;br /&gt;
-A IN_TUN0 -j LOG --log-prefix &amp;quot;DROP:INPUT &amp;quot; --log-level 6&lt;br /&gt;
-A IN_TUN0 -j LOG_DROP&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Mangle Table&lt;br /&gt;
# This is the place where our markings happen, whether they be 0x1 or 0x2&lt;br /&gt;
#&lt;br /&gt;
*mangle&lt;br /&gt;
&lt;br /&gt;
# Set default policies for table&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Restore CONNMARK to the MARK (If one doesn&#039;t exist then no mark is set)&lt;br /&gt;
-A PREROUTING -j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff&lt;br /&gt;
&lt;br /&gt;
# If packet MARK is 2, then it means there is already a connection mark and the&lt;br /&gt;
# original packet came in on VPN&lt;br /&gt;
-A PREROUTING -s 192.168.2.0/24 -m mark --mark 0x2 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Check exception (this is a server which when accessed on a 192.168.2.0/24 address will go out the ISP table) are 0x1&lt;br /&gt;
#-A PREROUTING -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -m mark --mark 0x1 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Mark packets coming from 192.168.2.0/24 are 0x2&lt;br /&gt;
-A PREROUTING -s 192.168.2.0/24 -j MARK --set-xmark 0x2/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# If packet MARK is 1, then it means there is already a connection mark and the&lt;br /&gt;
# original packet came in on ISP&lt;br /&gt;
-A PREROUTING -s 192.168.1.0/24 -m mark --mark 0x1 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Mark packets 192.168.1.0/24 are 0x1&lt;br /&gt;
-A PREROUTING -s 192.168.1.0/24 -j MARK --set-xmark 0x1/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# Mark exception (this is a server which when accessed on a 192.168.2.0/24 address will go out the ISP table) as 0x1&lt;br /&gt;
#-A PREROUTING -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -j MARK --set-xmark 0x1/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# Set mark to 0 - This is for the modem. Otherwise it will mark with 0x1 or 0x2&lt;br /&gt;
-A PREROUTING -d 192.168.0.1/32 -j MARK --set-xmark 0x0/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# Save MARK to CONNMARK (remember iproute can&#039;t see CONNMARKs)&lt;br /&gt;
-A PREROUTING -j CONNMARK --save-mark --nfmask 0xffffffff --ctmask 0xffffffff&lt;br /&gt;
COMMIT&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may want to delete certain rules here that do not apply to you, eg the FreeRadius rules. That is covered later in this article.&lt;br /&gt;
&lt;br /&gt;
== OpenVPN Routing ==&lt;br /&gt;
Usually when you connect with OpenVPN the remote VPN server will push routes down to your system. We don&#039;t want this as we still want to be able to access the internet without the VPN. We have also created our own routes that we want to use earlier in this guide.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to add this to the bottom of your OpenVPN configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;# Prevents default gateway from being set on the default routing table&lt;br /&gt;
route-noexec&lt;br /&gt;
&lt;br /&gt;
# Allows route-up script to be executed&lt;br /&gt;
script-security 2&lt;br /&gt;
&lt;br /&gt;
# Calls custom shell script after connection to add necessary routes&lt;br /&gt;
route-up /etc/openvpn/route-up-fwmark.sh&lt;br /&gt;
route-pre-down /etc/openvpn/route-pre-down-fwmark.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
My VPNs are arranged like this in /etc/openvpn:&lt;br /&gt;
&lt;br /&gt;
OpenVPN configuration file for that server:&lt;br /&gt;
&amp;lt;pre&amp;gt;countrycode.serverNumber.openvpn.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenVPN certs for that server:&lt;br /&gt;
&amp;lt;pre&amp;gt;countrycode.serverNumber.openvpn/countrycode.serverNumber.openvpn.crt&lt;br /&gt;
countrycode.serverNumber.openvpn/countrycode.serverNumber.openvpn.key&lt;br /&gt;
countrycode.serverNumber.openvpn/myKey.crt&lt;br /&gt;
countrycode.serverNumber.openvpn/myKey.key&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So I use this helpful script to automate the process of changing between servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
vpn_server_filename=$1&lt;br /&gt;
&lt;br /&gt;
rm /etc/openvpn/openvpn.conf&lt;br /&gt;
ln -s $vpn_server_filename /etc/openvpn/openvpn.conf&lt;br /&gt;
chown -R openvpn:openvpn /etc/openvpn&lt;br /&gt;
chmod -R a=-rwx,u=+rX /etc/openvpn&lt;br /&gt;
chmod u=x /etc/openvpn/*.sh*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if grep -Fxq &amp;quot;#CustomStuffHere&amp;quot; openvpn.conf&lt;br /&gt;
then&lt;br /&gt;
    echo &amp;quot;Not adding custom routes, this server has been used previously&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;Adding custom route rules&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    echo -e &amp;quot;#CustomStuffHere\&lt;br /&gt;
\n# Prevents default gateway from being set on the default routing table\&lt;br /&gt;
\nroute-noexec\&lt;br /&gt;
\n# Allows route-up script to be executed\&lt;br /&gt;
\nscript-security 2 \&lt;br /&gt;
\n# Calls custom shell script after connection to add necessary routes\&lt;br /&gt;
\nroute-up /etc/openvpn/route-up-fwmark.sh\&lt;br /&gt;
\nroute-pre-down /etc/openvpn/route-pre-down-fwmark.sh\&lt;br /&gt;
\n# Logging of OpenVPN to file\&lt;br /&gt;
\n#log /etc/openvpn/openvpn.log&amp;quot;\&lt;br /&gt;
&amp;gt;&amp;gt; /etc/openvpn/openvpn.conf&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Remember to set BitTorrent port forward in vcp.ovpn.to control panel&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way I can simply change between servers by running:&lt;br /&gt;
{{cmd|changevpn.sh countrycode.serverNumber.openvpn}}&lt;br /&gt;
&lt;br /&gt;
and then restart openvpn. I am also reminded to put the port forward through on the VPN control panel so my BitTorrent client is connectable:&lt;br /&gt;
&lt;br /&gt;
{{cmd|service openvpn restart}}&lt;br /&gt;
&lt;br /&gt;
Finally add openvpn to the default run level&lt;br /&gt;
{{cmd|rc-update add openvpn default}}&lt;br /&gt;
&lt;br /&gt;
= Creating a LAN only Subnet =&lt;br /&gt;
In this section, we&#039;ll be creating a LAN only subnet. This subnet will be 192.168.3.0/24. The idea of this subnet is nodes in it cannot have their packets forwarded to the Internet, however they can be accessed via the other LAN subnets 192.168.1.0/24 and 192.168.2.0/24. This approach doesn&#039;t use VLANs although that would be recommended if you had a managed switch. The idea of this subnet is for things like WiFi access points, IP Phones which contact a local Asterisk server and of course printers.&lt;br /&gt;
&lt;br /&gt;
At the end of this section we will have something like:&lt;br /&gt;
&lt;br /&gt;
[[File:network_diagram2.png|center|Network Diagram]]&lt;br /&gt;
&lt;br /&gt;
== /etc/iproute2/rt_tables ==&lt;br /&gt;
First up we&#039;ll add a third routing table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;3 LAN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/network/interfaces ==&lt;br /&gt;
Add a an extra interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;auto eth0:3&lt;br /&gt;
iface eth0:3 inet static&lt;br /&gt;
	address 192.168.3.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
        post-up /etc/network/route_LAN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/network/route_LAN ==&lt;br /&gt;
This file will have our route added to it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Add routes from ISP to LAN&lt;br /&gt;
/sbin/ip route add 192.168.1.0/24 dev eth0 table LAN&lt;br /&gt;
&lt;br /&gt;
# Add route from VPN to LAN&lt;br /&gt;
/sbin/ip route add 192.168.2.0/24 dev eth0 table LAN&lt;br /&gt;
&lt;br /&gt;
# Add route from LAN to it&#039;s own table&lt;br /&gt;
/sbin/ip route add 192.168.3.0/24 dev eth0 table LAN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/ppp/ip-up ==&lt;br /&gt;
Append a route from the LAN subnet to the ISP table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# Add route to LAN subnet&lt;br /&gt;
/sbin/ip route add 192.168.3.0/24 dev eth0 table ISP&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/openvpn/route-up-fwmark.sh ==&lt;br /&gt;
Append a route from the LAN subnet to the VPN table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# Add route to LAN only subnet&lt;br /&gt;
/sbin/ip route add 192.168.3.0/24 dev eth0 table VPN&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/ntpd.conf ==&lt;br /&gt;
Add a listen address for ntp (OpenNTPD).&lt;br /&gt;
&lt;br /&gt;
You should now have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# Addresses to listen on (ntpd does not listen by default)&lt;br /&gt;
listen on 192.168.1.1&lt;br /&gt;
listen on 192.168.2.1&lt;br /&gt;
listen on 192.168.3.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Devices needing the correct time will need to use this NTP server because they will not be able to get it from the Internet.&lt;br /&gt;
&lt;br /&gt;
== Blocking bogons ==&lt;br /&gt;
Our LAN now has 4 subnets in total that are possible:&lt;br /&gt;
&lt;br /&gt;
* 192.168.0.0/30 (connection between modem and router)&lt;br /&gt;
* 192.168.1.0/24 (ISP table, directly routed out WAN)&lt;br /&gt;
* 192.168.2.0/24 (VPN table, routed out VPN)&lt;br /&gt;
* 192.168.3.0/24 (Null routed subnet for LAN only hosts)&lt;br /&gt;
* 172.16.32.0/20 (VPN provider&#039;s network, so we can access things on the VPN&#039;s network).&lt;br /&gt;
&lt;br /&gt;
Everything else should be rejected. No packets should ever be forwarded on 192.168.5.2 or 10.0.0.5 for example.&lt;br /&gt;
&lt;br /&gt;
=== Installing ipset ===&lt;br /&gt;
Install ipset:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add ipset}}&lt;br /&gt;
&lt;br /&gt;
Add it to start up:&lt;br /&gt;
{{cmd|rc-update add ipset default}}&lt;br /&gt;
&lt;br /&gt;
Now we need to load the lists of addresses into ipset [http://blog.ls20.com/securing-your-server-using-ipset-and-dynamic-blocklists Securing Your Server using IPset and Dynamic Blocklists] mentions a [https://gist.github.com/hwdsl2/6dce75072274abfd2781 script] which was particularly useful. This script could be run on a cron job if you wanted to regularly update it and for the full bogon list you should as they change when that address space has been allocated.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this we will be using just the [https://files.pfsense.org/lists/bogon-bn-nonagg.txt bogon-bn-nonagg.txt] list. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0.0.0/8&lt;br /&gt;
10.0.0.0/8&lt;br /&gt;
100.64.0.0/10&lt;br /&gt;
127.0.0.0/8&lt;br /&gt;
169.254.0.0/16&lt;br /&gt;
172.16.0.0/12&lt;br /&gt;
192.0.0.0/24&lt;br /&gt;
192.0.2.0/24&lt;br /&gt;
192.168.0.0/16&lt;br /&gt;
198.18.0.0/15&lt;br /&gt;
198.51.100.0/24&lt;br /&gt;
203.0.113.0/24&lt;br /&gt;
224.0.0.0/4&lt;br /&gt;
240.0.0.0/4&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is unlikely to change as it&#039;s the IPV4 [https://en.wikipedia.org/wiki/Reserved_IP_addresses Reserved IP addresses] space. The script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#! /bin/bash&lt;br /&gt;
&lt;br /&gt;
# /usr/local/sbin/fullbogons-ipv4&lt;br /&gt;
# BoneKracker&lt;br /&gt;
# Rev. 11 October 2012&lt;br /&gt;
# Tested with ipset 6.13&lt;br /&gt;
&lt;br /&gt;
# Purpose: Periodically update an ipset used in a running firewall to block&lt;br /&gt;
# bogons. Bogons are addresses that nobody should be using on the public&lt;br /&gt;
# Internet because they are either private, not to be assigned, or have&lt;br /&gt;
# not yet been assigned.&lt;br /&gt;
#&lt;br /&gt;
# Notes: Call this from crontab. Feed updated every 4 hours.&lt;br /&gt;
&lt;br /&gt;
# target=&amp;quot;http://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt&amp;quot;&lt;br /&gt;
# Use alternative URL from pfSense, due to 404 error with URL above&lt;br /&gt;
target=&amp;quot;https://files.pfsense.org/lists/bogon-bn-nonagg.txt&amp;quot;&lt;br /&gt;
ipset_params=&amp;quot;hash:net&amp;quot;&lt;br /&gt;
&lt;br /&gt;
filename=$(basename ${target})&lt;br /&gt;
firewall_ipset=${filename%.*}           # ipset will be filename minus ext&lt;br /&gt;
data_dir=&amp;quot;/var/tmp/${firewall_ipset}&amp;quot;   # data directory will be same&lt;br /&gt;
data_file=&amp;quot;${data_dir}/${filename}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# if data directory does not exist, create it&lt;br /&gt;
mkdir -pm 0750 ${data_dir}&lt;br /&gt;
&lt;br /&gt;
# function to get modification time of the file in log-friendly format&lt;br /&gt;
get_timestamp() {&lt;br /&gt;
    date -r $1 +%m/%d&#039; &#039;%R&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# file modification time on server is preserved during wget download&lt;br /&gt;
[ -w ${data_file} ] &amp;amp;&amp;amp; old_timestamp=$(get_timestamp ${data_file})&lt;br /&gt;
&lt;br /&gt;
# fetch file only if newer than the version we already have&lt;br /&gt;
wget -qNP ${data_dir} ${target}&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$?&amp;quot; -ne &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
    logger -p cron.err &amp;quot;IPSet: ${firewall_ipset} wget failed.&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
timestamp=$(get_timestamp ${data_file})&lt;br /&gt;
&lt;br /&gt;
# compare timestamps because wget returns success even if no newer file&lt;br /&gt;
if [ &amp;quot;${timestamp}&amp;quot; != &amp;quot;${old_timestamp}&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    temp_ipset=&amp;quot;${firewall_ipset}_temp&amp;quot;&lt;br /&gt;
    ipset create ${temp_ipset} ${ipset_params}&lt;br /&gt;
&lt;br /&gt;
    #sed -i &#039;/^#/d&#039; ${data_file}            # strip comments&lt;br /&gt;
    sed -ri &#039;/^[#&amp;lt; \t]|^$/d&#039; ${data_file}   # occasionally the file has been xhtml&lt;br /&gt;
&lt;br /&gt;
    while read network; do&lt;br /&gt;
        ipset add ${temp_ipset} ${network}&lt;br /&gt;
    done &amp;lt; ${data_file}&lt;br /&gt;
&lt;br /&gt;
    # if ipset does not exist, create it&lt;br /&gt;
    ipset create -exist ${firewall_ipset} ${ipset_params}&lt;br /&gt;
&lt;br /&gt;
    # swap the temp ipset for the live one&lt;br /&gt;
    ipset swap ${temp_ipset} ${firewall_ipset}&lt;br /&gt;
    ipset destroy ${temp_ipset}&lt;br /&gt;
&lt;br /&gt;
    # log the file modification time for use in minimizing lag in cron schedule&lt;br /&gt;
    logger -p cron.notice &amp;quot;IPSet: ${firewall_ipset} updated (as of: ${timestamp}).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should see the list loaded into memory when you do:&lt;br /&gt;
&lt;br /&gt;
{{cmd|ipset list}}&lt;br /&gt;
&lt;br /&gt;
We want to save it so our router can refer to it next time it starts up so for that:&lt;br /&gt;
&lt;br /&gt;
{{cmd|/etc/init.d/ipset save}}&lt;br /&gt;
&lt;br /&gt;
== Restricting our LAN subnet with iptables, and blocking the bogons ==&lt;br /&gt;
&lt;br /&gt;
Finally we can apply our iptables rules, to filter both 192.168.3.0/24 and make sure that subnets like 192.168.5.0/24 are not forwarded or accessible by our router. You will need to review these rules, and remove the ones that do not apply to you.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to change your RADIUS rules if you moved your WiFi APs into the 192.168.3.0/24 subnet. You&#039;ll also need to edit /etc/raddb/clients.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#########################################################################&lt;br /&gt;
# Advanced routing rule set&lt;br /&gt;
# Uses 192.168.1.0 via ISP&lt;br /&gt;
#      192.168.2.0 via VPN&lt;br /&gt;
#      192.168.3.0 via LAN&lt;br /&gt;
#&lt;br /&gt;
# Packets to/from 192.168.1.0/24 are marked with 0x1 and routed to ISP&lt;br /&gt;
# Packets to/from 192.168.2.0/24 are marked with 0x2 and routed to VPN&lt;br /&gt;
# Packets to/from 192.168.3.0/24 are routed to LAN and not forwarded onto&lt;br /&gt;
#                                    the internet&lt;br /&gt;
# &lt;br /&gt;
#########################################################################&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Mangle Table&lt;br /&gt;
# This is the place where our markings happen, whether they be 0x1 or 0x2&lt;br /&gt;
#&lt;br /&gt;
*mangle&lt;br /&gt;
&lt;br /&gt;
# Set default policies for table&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Restore CONNMARK to the MARK (If one doesn&#039;t exist then no mark is set)&lt;br /&gt;
-A PREROUTING -j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff&lt;br /&gt;
&lt;br /&gt;
# If packet MARK is 2, then it means there is already a connection mark and the&lt;br /&gt;
# original packet came in on VPN&lt;br /&gt;
-A PREROUTING -s 192.168.2.0/24 -m mark --mark 0x2 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Check exception (this is a server which when accessed on a 192.168.2.0/24 address will go out the ISP table) are 0x1&lt;br /&gt;
#-A PREROUTING -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -m mark --mark 0x1 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Mark packets coming from 192.168.2.0/24 are 0x2&lt;br /&gt;
-A PREROUTING -s 192.168.2.0/24 -j MARK --set-xmark 0x2/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# If packet MARK is 1, then it means there is already a connection mark and the&lt;br /&gt;
# original packet came in on ISP&lt;br /&gt;
-A PREROUTING -s 192.168.1.0/24 -m mark --mark 0x1 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Mark packets 192.168.1.0/24 are 0x1&lt;br /&gt;
-A PREROUTING -s 192.168.1.0/24 -j MARK --set-xmark 0x1/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# Mark exception (this is a server which when accessed on a 192.168.2.0/24 address will go out the ISP table) as 0x1&lt;br /&gt;
#-A PREROUTING -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -j MARK --set-xmark 0x1/0xffffff&lt;br /&gt;
&lt;br /&gt;
# Strip mark if packet is destined for modem.&lt;br /&gt;
-A PREROUTING -d 192.168.0.1/32 -j MARK --set-xmark 0x0/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# Strip mark if unknown bogon range to be blocked&lt;br /&gt;
-A PREROUTING -m set --match-set bogon-bn-nonagg dst -j MARK --set-xmark 0x0/0xffffffff&lt;br /&gt;
&lt;br /&gt;
# Save MARK to CONNMARK (remember iproute can&#039;t see CONNMARKs)&lt;br /&gt;
-A PREROUTING -j CONNMARK --save-mark --nfmask 0xffffffff --ctmask 0xffffffff&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Filter Table&lt;br /&gt;
# This is where we decide to ACCEPT, DROP or REJECT things&lt;br /&gt;
#&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT DROP [0:0]&lt;br /&gt;
:FORWARD DROP [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create rule chain per input interface for forwarding packets&lt;br /&gt;
:FWD_ETH0 - [0:0]&lt;br /&gt;
:FWD_ETH1 - [0:0]&lt;br /&gt;
:FWD_PPP0 - [0:0]&lt;br /&gt;
:FWD_TUN0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create rule chain per input interface for input packets (for host itself)&lt;br /&gt;
:IN_ETH0 - [0:0]&lt;br /&gt;
:IN_ETH1 - [0:0]&lt;br /&gt;
:IN_PPP0 - [0:0]&lt;br /&gt;
:IN_TUN0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create a drop chain&lt;br /&gt;
:LOG_DROP - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create a reject chain&lt;br /&gt;
:LOG_REJECT - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Create an output chain&lt;br /&gt;
:OUT_PPP0 - [0:0]&lt;br /&gt;
:OUT_TUN0 - [0:0]&lt;br /&gt;
&lt;br /&gt;
# Pass input packet to corresponding rule chain&lt;br /&gt;
-A INPUT -i lo -j ACCEPT&lt;br /&gt;
-A INPUT -i eth0 -j IN_ETH0&lt;br /&gt;
-A INPUT -i eth1 -j IN_ETH1&lt;br /&gt;
-A INPUT -i ppp0 -j IN_PPP0&lt;br /&gt;
-A INPUT -i tun0 -j IN_TUN0&lt;br /&gt;
&lt;br /&gt;
# Track forwarded packets&lt;br /&gt;
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Pass forwarded packet to corresponding rule chain&lt;br /&gt;
-A FORWARD -i eth0 -j FWD_ETH0&lt;br /&gt;
-A FORWARD -i eth1 -j FWD_ETH1&lt;br /&gt;
-A FORWARD -i ppp0 -j FWD_PPP0&lt;br /&gt;
-A FORWARD -i tun0 -j FWD_TUN0&lt;br /&gt;
&lt;br /&gt;
# Pass output interface to corresponding chain&lt;br /&gt;
-A OUTPUT -o ppp0 -j OUT_PPP0&lt;br /&gt;
-A OUTPUT -o tun0 -j OUT_TUN0&lt;br /&gt;
&lt;br /&gt;
# Forward traffic to Modem&lt;br /&gt;
-A FWD_ETH0 -d 192.168.0.1/32 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Allow routing to remote address on VPN&lt;br /&gt;
-A FWD_ETH0 -s 192.168.1.0/24 -d 172.16.32.1/32 -o tun0 -j ACCEPT&lt;br /&gt;
-A FWD_ETH0 -s 192.168.2.0/24 -d 172.16.32.1/32 -o tun0 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Allow forwarding from LAN hosts to LAN ONLY subnet&lt;br /&gt;
-A FWD_ETH0 -s 192.168.1.0/24 -d 192.168.3.0/24 -j ACCEPT&lt;br /&gt;
-A FWD_ETH0 -s 192.168.2.0/24 -d 192.168.3.0/24 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Allow LAN ONLY subnet to contact other LAN hosts&lt;br /&gt;
-A FWD_ETH0 -s 192.168.3.0/24 -d 192.168.1.0/24 -j ACCEPT&lt;br /&gt;
-A FWD_ETH0 -s 192.168.3.0/24 -d 192.168.2.0/24 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Refuse to forward bogons to the internet! eg 192.168.9.0/24 or 10.0.0.0&lt;br /&gt;
# or any other range which we are not using on our LAN&lt;br /&gt;
-A FWD_ETH0 -m set --match-set bogon-bn-nonagg dst -j LOG_REJECT&lt;br /&gt;
&lt;br /&gt;
# Forward traffic to ISP&lt;br /&gt;
-A FWD_ETH0 -s 192.168.1.0/24 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward traffic to VPN&lt;br /&gt;
-A FWD_ETH0 -s 192.168.2.0/24 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Prevent 192.168.3.0/24 from accessing internet&lt;br /&gt;
-A FWD_ETH0 -s 192.168.3.0/24 -j LOG_REJECT&lt;br /&gt;
&lt;br /&gt;
# Allow excepted server to be FORWARD to ppp0&lt;br /&gt;
#-A FWD_ETH0 -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -o ppp0 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward SSH packets from network to modem&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.1.0/24 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.2.0/24 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward HTTP packets from network to mode&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.1.0/24 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A FWD_ETH1 -s 192.168.0.1/32 -d 192.168.2.0/24 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Forward Bittorrent Port to workstation&lt;br /&gt;
-A FWD_TUN0 -d 192.168.2.30/32 -p tcp -m tcp --dport 6881:6889 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A FWD_TUN0 -d 192.168.2.30/32 -p udp -m udp --dport 6881:6889 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# SSH to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# DNS to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -p udp -m udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# FreeRadius Client (eg a UniFi AP)&lt;br /&gt;
-A IN_ETH0 -s 192.168.3.10/32 -p tcp -m tcp --dport 1812 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.3.10/32 -p udp -m udp --dport 1812 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Ubiquiti UAP Device Discovery Broadcast&lt;br /&gt;
-A IN_ETH0 -s 192.168.3.10/32 -p udp -m udp --dport 10001 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# NTP to Router&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -p udp -m udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -p udp -m udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.3.0/24 -p udp -m udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Accept traffic to router on both subnets&lt;br /&gt;
-A IN_ETH0 -s 192.168.1.0/24 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
-A IN_ETH0 -s 192.168.2.0/24 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Allow excepted server to be INPUT to eth0 from LAN&lt;br /&gt;
#-A IN_ETH0 -s 192.168.2.0/24 -d &amp;lt;IP_OF_EXCEPTED_SERVER&amp;gt;/32 -o ppp0 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# SSH To Modem from Router&lt;br /&gt;
-A IN_ETH1 -s 192.168.0.1/32 -d 192.168.0.0/30 -p tcp -m tcp --sport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# HTTP To Modem from Router&lt;br /&gt;
-A IN_ETH1 -s 192.168.0.1/32 -d 192.168.0.0/30 -p tcp -m tcp --sport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Deny bogons from ISP&lt;br /&gt;
-A IN_PPP0 -m set --match-set bogon-bn-nonagg src -j LOG_REJECT&lt;br /&gt;
&lt;br /&gt;
# Accept incoming tracked PPP0 connection&lt;br /&gt;
-A IN_PPP0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Log dropped packets coming in on PPP0&lt;br /&gt;
-A IN_PPP0 -j LOG --log-prefix &amp;quot;DROP:INPUT &amp;quot; --log-level 6&lt;br /&gt;
-A IN_PPP0 -j LOG_DROP&lt;br /&gt;
&lt;br /&gt;
# Accept traffic from IP on VPN (exception not a bogon)&lt;br /&gt;
-A IN_TUN0 -d 172.16.32.0/20 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Accept incoming tracked TUN0 connection&lt;br /&gt;
-A IN_TUN0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Log dropped packets coming in on TUN0&lt;br /&gt;
-A IN_TUN0 -j LOG --log-prefix &amp;quot;DROP:INPUT &amp;quot; --log-level 6&lt;br /&gt;
-A IN_TUN0 -j LOG_DROP&lt;br /&gt;
&lt;br /&gt;
# Log rejected packets&lt;br /&gt;
-A LOG_REJECT -j LOG --log-prefix &amp;quot;Rejected Bogon: &amp;quot; --log-level 6&lt;br /&gt;
-A LOG_REJECT -j REJECT --reject-with icmp-port-unreachable&lt;br /&gt;
&lt;br /&gt;
# Deny bogons to ISP&lt;br /&gt;
-A OUT_PPP0 -m set --match-set bogon-bn-nonagg dst -j LOG_REJECT&lt;br /&gt;
&lt;br /&gt;
# Allow traffic to IP on VPN (exception not a bogon)&lt;br /&gt;
-A OUT_TUN0 -d 172.16.32.0/20 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Deny bogons to VPN&lt;br /&gt;
-A OUT_TUN0 -m set --match-set bogon-bn-nonagg dst -j LOG_REJECT&lt;br /&gt;
COMMIT&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# NAT Table&lt;br /&gt;
# This is where translation of packets happens and &amp;quot;forwarding&amp;quot; of ports&lt;br /&gt;
# to specific hosts.&lt;br /&gt;
#&lt;br /&gt;
*nat&lt;br /&gt;
:PREROUTING ACCEPT [0:0]&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:POSTROUTING ACCEPT [0:0]&lt;br /&gt;
&lt;br /&gt;
# Port forwarding for Bittorrent&lt;br /&gt;
-A PREROUTING -i tun0 -p tcp -m tcp --dport 6881:6889 -j DNAT --to-destination 192.168.2.20&lt;br /&gt;
-A PREROUTING -i tun0 -p udp -m udp --dport 6881:6889 -j DNAT --to-destination 192.168.2.20&lt;br /&gt;
&lt;br /&gt;
# Allows routing to our modem subnet so we can access the web interface&lt;br /&gt;
-A POSTROUTING -s 192.168.1.0/24 -d 192.168.0.1/32 -o eth1 -p tcp -m tcp --dport 80 -j MASQUERADE&lt;br /&gt;
-A POSTROUTING -s 192.168.2.0/24 -d 192.168.0.1/32 -o eth1 -p tcp -m tcp --dport 80 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
# Allows hosts of the network to use the VPN tunnel&lt;br /&gt;
-A POSTROUTING -o tun0 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
# Allows hosts of the network to use the PPP tunnel&lt;br /&gt;
-A POSTROUTING -o ppp0 -j MASQUERADE&lt;br /&gt;
COMMIT&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other Tips =&lt;br /&gt;
&lt;br /&gt;
== lbu cache ==&lt;br /&gt;
Configure lbu cache so that you don&#039;t need to download packages when you restart your router eg [[Local APK cache]]&lt;br /&gt;
&lt;br /&gt;
This is particularly important as some of the images do not contain ppp-pppoe. This might mean you&#039;re unable to get an internet connection to download the other packages on boot.&lt;br /&gt;
&lt;br /&gt;
== lbu encryption /etc/lbu/lbu.conf ==&lt;br /&gt;
In /etc/lbu/lbu.conf you might want to enable encryption to protect your VPN keys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# what cipher to use with -e option&lt;br /&gt;
DEFAULT_CIPHER=aes-256-cbc&lt;br /&gt;
&lt;br /&gt;
# Uncomment the row below to encrypt config by default&lt;br /&gt;
ENCRYPTION=$DEFAULT_CIPHER&lt;br /&gt;
&lt;br /&gt;
# Uncomment below to avoid &amp;lt;media&amp;gt; option to &#039;lbu commit&#039;&lt;br /&gt;
# Can also be set to &#039;floppy&#039;&lt;br /&gt;
LBU_MEDIA=mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
# Set the LBU_BACKUPDIR variable in case you prefer to save the apkovls&lt;br /&gt;
# in a normal directory instead of mounting an external media.&lt;br /&gt;
# LBU_BACKUPDIR=/root/config-backups&lt;br /&gt;
&lt;br /&gt;
# Uncomment below to let lbu make up to 3 backups&lt;br /&gt;
# BACKUP_LIMIT=3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to set a root password, by default Alpine Linux&#039;s root account is passwordless.&lt;br /&gt;
{{cmd|passwd root}}&lt;br /&gt;
&lt;br /&gt;
== Backup apkprov ==&lt;br /&gt;
It&#039;s a good idea to back up your apk provision file. You can pull it off your router to your local workstation with:&lt;br /&gt;
&lt;br /&gt;
{{cmd|scp -r root@192.168.2.1:/media/mmcblk0p1/&amp;lt;YOUR HOST NAME&amp;gt;.apkovl.tar.gz.aes-256-cbc ./}}&lt;br /&gt;
&lt;br /&gt;
And decrypt it with:&lt;br /&gt;
{{cmd|openssl enc -d -aes-256-cbc -in &amp;lt;YOUR HOST NAME&amp;gt;.apkovl.tar.gz.aes-256-cbc -out &amp;lt;YOUR HOST NAME&amp;gt;.apkovl.tar.gz}}&lt;br /&gt;
&lt;br /&gt;
It can be encrypted with:&lt;br /&gt;
{{cmd|openssl aes-256-cbc -salt -in &amp;lt;YOUR HOST NAME&amp;gt;.apkovl.tar.gz -out &amp;lt;YOUR HOST NAME&amp;gt;.apkovl.tar.gz.aes-256-cbc}}&lt;br /&gt;
&lt;br /&gt;
== Harden SSH ==&lt;br /&gt;
&lt;br /&gt;
=== Generate a SSH key ===&lt;br /&gt;
{{cmd|ssh-keygen -t rsa -b 4096}}&lt;br /&gt;
&lt;br /&gt;
You will want to put the contents of id_rsa.pub in /etc/ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
You can put multiple public keys on multiple lines if more than one person has access to the router.&lt;br /&gt;
&lt;br /&gt;
=== /etc/ssh/sshd_config ===&lt;br /&gt;
A couple of good options to set in here can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ListenAddress 192.168.1.1&lt;br /&gt;
ListenAddress 192.168.2.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While this isn&#039;t usually a good idea, a router doesn&#039;t need more than one user.&lt;br /&gt;
&amp;lt;pre&amp;gt;PermitRootLogin yes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most important options:&lt;br /&gt;
&amp;lt;pre&amp;gt;RSAAuthentication yes&lt;br /&gt;
PubkeyAuthentication yes&lt;br /&gt;
AuthorizedKeysFile  /etc/ssh/authorized_keys&lt;br /&gt;
PasswordAuthentication no&lt;br /&gt;
PermitEmptyPasswords no&lt;br /&gt;
AllowTcpForwarding no&lt;br /&gt;
X11Forwarding no&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== /etc/conf.d/sshd ===&lt;br /&gt;
You will want to add &amp;lt;pre&amp;gt;rc_need=&amp;quot;net&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This instructs OpenRC to make sure the network is up before starting ssh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally add sshd to the default run level&lt;br /&gt;
{{cmd|rc-update add sshd default}}&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* https://wiki.gentoo.org/wiki/Home_Router&lt;br /&gt;
* https://help.ubuntu.com/community/ADSLPPPoE&lt;br /&gt;
* https://wiki.archlinux.org/index.php/Router&lt;br /&gt;
* [https://vk5tu.livejournal.com/37206.html IPv6 at home, under the hood with Debian Wheezy and Internode]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=UFW&amp;diff=11244</id>
		<title>UFW</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=UFW&amp;diff=11244"/>
		<updated>2015-10-01T17:12:01Z</updated>

		<summary type="html">&lt;p&gt;Summer: Redirects to Uncomplicated Firewall&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT[[Uncomplicated Firewall]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11243</id>
		<title>Uncomplicated Firewall</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11243"/>
		<updated>2015-10-01T17:08:24Z</updated>

		<summary type="html">&lt;p&gt;Summer: Diskless mode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UFW stands for [https://launchpad.net/ufw Uncomplicated Firewall], and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
UFW can be found in the testing repository.  Read [[Alpine_Linux_package_management#Repository_pinning]] to enable the testing repository.&lt;br /&gt;
&lt;br /&gt;
Once the testing repository has been enabled, UFW can be installed by issuing the following command:&lt;br /&gt;
{{cmd| apk add ip6tables ufw@testing}}&lt;br /&gt;
&lt;br /&gt;
== Basic configuration ==&lt;br /&gt;
&lt;br /&gt;
The following is a simple configuration that will deny all incoming and outgoing data communication by default and allow incoming SSH, outgoing DNS and NTP traffic: &lt;br /&gt;
&lt;br /&gt;
{{cmd|ufw default deny incoming&lt;br /&gt;
ufw default deny outgoing&lt;br /&gt;
ufw limit SSH         # open SSH port and protect against brute-force login attacks&lt;br /&gt;
ufw allow out DNS     # allow outgoing DNS&lt;br /&gt;
ufw allout out 123    # allow outgoing NTP}}&lt;br /&gt;
&lt;br /&gt;
The following lines are only needed the first time you install the package:&lt;br /&gt;
{{cmd|ufw enable&lt;br /&gt;
rc-update add ufw    # add UFW init scripts}}&lt;br /&gt;
&lt;br /&gt;
Check the status of UFW:&lt;br /&gt;
{{cmd|ufw status}}&lt;br /&gt;
&lt;br /&gt;
== Diskless mode ==&lt;br /&gt;
&lt;br /&gt;
If you have installed Alpine Linux as [[Installation#Installation_Handbook|diskless]] then you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your UFW configuration.  UFW data is stored in &amp;lt;code&amp;gt;/usr/lib/ufw&amp;lt;/code&amp;gt;, therefore use the following commands to save the UFW configuration:&lt;br /&gt;
{{cmd|lbu add /usr/lib/ufw&lt;br /&gt;
lbu commit}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11242</id>
		<title>Uncomplicated Firewall</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11242"/>
		<updated>2015-10-01T16:58:23Z</updated>

		<summary type="html">&lt;p&gt;Summer: Basic configuration section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UFW stands for [https://launchpad.net/ufw Uncomplicated Firewall], and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
UFW can be found in the testing repository.  Read [[Alpine_Linux_package_management#Repository_pinning]] to enable the testing repository.&lt;br /&gt;
&lt;br /&gt;
Once the testing repository has been enabled, UFW can be installed by issuing the following command:&lt;br /&gt;
{{cmd| apk add ip6tables ufw@testing}}&lt;br /&gt;
&lt;br /&gt;
== Basic configuration ==&lt;br /&gt;
&lt;br /&gt;
The following is a simple configuration that will deny all incoming and outgoing data communication by default and allow incoming SSH, outgoing DNS and NTP traffic: &lt;br /&gt;
&lt;br /&gt;
{{cmd|ufw default deny incoming&lt;br /&gt;
ufw default deny outgoing&lt;br /&gt;
ufw limit SSH         # open SSH port and protect against brute-force login attacks&lt;br /&gt;
ufw allow out DNS     # allow outgoing DNS&lt;br /&gt;
ufw allout out 123    # allow outgoing NTP}}&lt;br /&gt;
&lt;br /&gt;
The following lines are only needed the first time you install the package:&lt;br /&gt;
{{cmd|ufw enable&lt;br /&gt;
rc-update add ufw    # add UFW init scripts}}&lt;br /&gt;
&lt;br /&gt;
Check the status of UFW:&lt;br /&gt;
{{cmd|ufw status}}&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11241</id>
		<title>Uncomplicated Firewall</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11241"/>
		<updated>2015-10-01T16:43:42Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added installation section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UFW stands for [https://launchpad.net/ufw Uncomplicated Firewall], and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
UFW can be found in the testing repository.  Read [[Alpine_Linux_package_management#Repository_pinning]] to enable the testing repository.&lt;br /&gt;
&lt;br /&gt;
Once the testing repository has been enabled, UFW can be installed by issuing the following command:&lt;br /&gt;
{{cmd| apk add ip6tables ufw@testing}}&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11240</id>
		<title>Uncomplicated Firewall</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Uncomplicated_Firewall&amp;diff=11240"/>
		<updated>2015-10-01T16:37:36Z</updated>

		<summary type="html">&lt;p&gt;Summer: Created UFW wiki page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UFW stands for [https://launchpad.net/ufw Uncomplicated Firewall], and is a program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11239</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11239"/>
		<updated>2015-10-01T16:14:03Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.  Follow these steps to install Alpine Linux:&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=11233</id>
		<title>Tutorials and Howtos</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=11233"/>
		<updated>2015-09-28T20:49:14Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added Raspberry Pi installation tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:package_edutainment.svg|right|link=]]&lt;br /&gt;
{{TOC left}}&lt;br /&gt;
&#039;&#039;&#039;Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The tutorials are hands-on and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.&lt;br /&gt;
&lt;br /&gt;
Howtos are smaller articles explaining how to perform a particular task with Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
We encourage people to send in both complete articles as well as requesting topics to be covered. If you think you have the skills and knowledge to write an Alpine Linux related article please do so on this Wiki. If you want to request a topic, please add your request in this page&#039;s [[Talk:Tutorials_and_Howtos|Discussion]].&lt;br /&gt;
&lt;br /&gt;
{{Clear}}&lt;br /&gt;
== Storage ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039; &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up disks manually]] &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
* [[Setting up a software RAID array]]&lt;br /&gt;
&amp;lt;!-- ** [[Setting up a /var partition on software IDE raid1]]  Obsolete, Installation and Storage --&amp;gt; &lt;br /&gt;
* [[Raid Administration]]&lt;br /&gt;
* [[Setting up encrypted volumes with LUKS]]&lt;br /&gt;
* [[Setting up LVM on LUKS]]&lt;br /&gt;
* [[Setting up Logical Volumes with LVM]]&lt;br /&gt;
** [[Setting up LVM on GPT-labeled disks]]&lt;br /&gt;
** [[Installing on GPT LVM]]&lt;br /&gt;
* [[Filesystems|Formatting HD/Floppy/Other]] &amp;lt;!-- just a stub --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up iSCSI]]&lt;br /&gt;
** [[iSCSI Raid and Clustered File Systems]]&lt;br /&gt;
* [[Setting up NBD]]&lt;br /&gt;
* [[High performance SCST iSCSI Target on Linux software Raid]] &#039;&#039;(deprecated)&#039;&#039; &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
* [[Linux iSCSI Target (TCM)]]&lt;br /&gt;
* [[Disk Replication with DRBD]] &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Burning ISOs]] &amp;lt;!-- just some links now --&amp;gt;&lt;br /&gt;
* [[Partitioning and Bootmanagers]]&lt;br /&gt;
* [[Migrating data]]&lt;br /&gt;
* [[Raspberry Pi|Raspberry Pi (Installation)]]&lt;br /&gt;
* [[Create a bootable Raspberry Pi SDHC from a Mac]]&lt;br /&gt;
&lt;br /&gt;
== Networking ==&lt;br /&gt;
&lt;br /&gt;
* [[Configure Networking]]&lt;br /&gt;
* [[Connecting to a wireless access point]]&lt;br /&gt;
* [[Bonding]]&lt;br /&gt;
* [[Vlan]]&lt;br /&gt;
* [[Bridge]]&lt;br /&gt;
* [[OpenVSwitch]]&lt;br /&gt;
* [[How to configure static routes]]&lt;br /&gt;
&lt;br /&gt;
* [[Alpine Wall]] - [[How-To Alpine Wall]] - [[Alpine Wall User&#039;s Guide]] &#039;&#039;(a new firewall management framework)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[PXE boot]]&lt;br /&gt;
&lt;br /&gt;
* [[Using serial modem]]&lt;br /&gt;
* [[Using HSDPA modem]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi]]&lt;br /&gt;
* [[Setting up Satellite Internet Connection]]&lt;br /&gt;
* [[Using Alpine on Windows domain with IPSEC isolation]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039; &amp;lt;!-- Server and Networking --&amp;gt;&lt;br /&gt;
* [[How to setup a wireless access point]] &#039;&#039;(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)&#039;&#039;&lt;br /&gt;
* [[Setting up a OpenVPN server with Alpine]] &#039;&#039;(Allowing single users or devices to remotely connect to your network)&#039;&#039;&lt;br /&gt;
&amp;lt;!-- [[Using Racoon for Remote Sites]] is a different VPN tunnelling method, but that article is just a stub --&amp;gt;&lt;br /&gt;
* [[Experiences with OpenVPN-client on ALIX.2D3]]  &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Generating SSL certs with ACF]] &amp;lt;!-- Generating SSL certs with ACF 1.9 --&amp;gt;&lt;br /&gt;
* [[Setting up unbound DNS server]]&lt;br /&gt;
* [[Setting up nsd DNS server]]&lt;br /&gt;
* [[TinyDNS Format]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]] &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
* [[Freeradius Active Directory Integration]]&lt;br /&gt;
* [[Multi_ISP]] &#039;&#039;(Dual-ISP setup with load-balancing and automatic failover)&#039;&#039;&lt;br /&gt;
* [[OwnCloud]] &#039;&#039;(Installing OwnCloud)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Apache with php-fpm]]&lt;br /&gt;
* [[Seafile: setting up your own private cloud]]&lt;br /&gt;
&lt;br /&gt;
== Post-Install ==&lt;br /&gt;
&amp;lt;!-- If you edit this, please coordinate with Installation#Post-Install and Developer_Documentation#Package_management.  Note that these three sections are not exact duplicates. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine Linux package management|Package Management (apk)]] &#039;&#039;(How to add/remove packages on your Alpine)&#039;&#039;&lt;br /&gt;
   &amp;lt;!-- [[Alpine Linux package management#Local_Cache|How to enable APK caching]] --&amp;gt;&lt;br /&gt;
** [[Comparison with other distros]]&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &amp;lt;!-- new --&amp;gt;&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
* [[Alpine Linux Init System|Init System (OpenRC)]] &#039;&#039;(Configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
   &amp;lt;!-- [[Writing Init Scripts]] --&amp;gt;&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|Setting up Xorg]]&lt;br /&gt;
* [[Upgrading Alpine]]&lt;br /&gt;
&amp;lt;!-- Obsolete&lt;br /&gt;
 [[Upgrading Alpine - v1.9.x]]&lt;br /&gt;
 [[Upgrading Alpine - CD v1.8.x]]&lt;br /&gt;
 [[Upgrading Alpine - HD v1.8.x]]&lt;br /&gt;
 [[Upgrade to repository main|Upgrading to signed repositories]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
* [[setup-acf]] &#039;&#039;(Configures ACF (webconfiguration) so you can manage your box through https)&#039;&#039;&lt;br /&gt;
* [[Changing passwords for ACF|Changing passwords]]&lt;br /&gt;
* [[Ansible]] &#039;&#039;(Configuration management)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
&amp;lt;!-- Obsolete?&lt;br /&gt;
* [[Error message on boot: Address space collision: host bridge window conflicts with Adaptor ROM]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Virtualization==&lt;br /&gt;
&lt;br /&gt;
* [[Xen Dom0]] &#039;&#039;(Setting up Alpine as a dom0 for Xen hypervisor)&#039;&#039;&lt;br /&gt;
* [[Xen Dom0 on USB or SD]]&lt;br /&gt;
* [[Create Alpine Linux PV DomU]]&lt;br /&gt;
* [[Xen PCI Passthrough]]&lt;br /&gt;
* [[Xen LiveCD]]&lt;br /&gt;
* [[qemu]]&lt;br /&gt;
* [[LXC]] &#039;&#039;(Setting up a Linux container in Alpine Linux)&#039;&#039;&lt;br /&gt;
* [[Docker]]&lt;br /&gt;
&lt;br /&gt;
== Desktop Environment ==&lt;br /&gt;
&lt;br /&gt;
* [[Awesome(wm) Setup]]&lt;br /&gt;
* [[EyeOS]] &#039;&#039;(Cloud Computing Desktop)&#039;&#039;&lt;br /&gt;
* [[Gnome Setup]]&lt;br /&gt;
* [[MATE|MATE Setup]]&lt;br /&gt;
* [[Oneye]] &#039;&#039;(Cloud Computing Desktop - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Owncloud]] &#039;&#039;(Cloud Computing Desktop - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
** (to be merged with [[OwnCloud]] &#039;&#039;(Your personal Cloud for storing and sharing your data on-line)&#039;&#039;)&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
* [[Suspend on LID close]]&lt;br /&gt;
* [[XFCE Setup]] and [[Xfce Desktop|Desktop Ideas]]&lt;br /&gt;
* [[Installing Adobe flash player for Firefox]]&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
=== Telephony ===&lt;br /&gt;
* [[Setting up Zaptel/Asterisk on Alpine]]&lt;br /&gt;
** [[Setting up Streaming an Asterisk Channel]]&lt;br /&gt;
* [[Freepbx on Alpine Linux]]&lt;br /&gt;
* [[FreePBX_V3]] &#039;&#039;(FreeSWITCH, Asterisk GUI web acces tool)&#039;&#039;&lt;br /&gt;
* [[2600hz]] &#039;&#039;(FreeSWITCH, Asterisk GUI web access tool)&#039;&#039;&lt;br /&gt;
* [[Kamailio]] &#039;&#039;(SIP Server, formerly OpenSER)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mail ===&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(Hosting mail, webservices and other services)&#039;&#039;&lt;br /&gt;
** [[Hosting Web/Email services on Alpine]]&lt;br /&gt;
* [[ISP Mail Server HowTo]] &amp;lt;!-- solution, Mail --&amp;gt;&lt;br /&gt;
** [[ISP Mail Server Upgrade 2.x]]&lt;br /&gt;
** [[ISP Mail Server 2.x HowTo]] &#039;&#039;(Beta, please test)&#039;&#039;&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Setting up postfix with virtual domains]]&lt;br /&gt;
* [[Protecting your email server with Alpine]]&lt;br /&gt;
* [[Setting up clamsmtp]]&lt;br /&gt;
* [[Setting up dovecot with imap and ssl]]&lt;br /&gt;
&lt;br /&gt;
=== HTTP ===&lt;br /&gt;
* [[Lighttpd]]&lt;br /&gt;
** [[Lighttpd Https access]]&lt;br /&gt;
** [[Setting Up Lighttpd with PHP]]&lt;br /&gt;
** [[Setting Up Lighttpd With FastCGI]]&lt;br /&gt;
* [[Cherokee]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
** [[Setting Up Apache with PHP]]&lt;br /&gt;
** [[Apache authentication: NTLM Single Signon]]&lt;br /&gt;
&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039; &amp;lt;!-- solution, Server --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up Transparent Squid Proxy]] &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
** [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[Setting up Explicit Squid Proxy]]&lt;br /&gt;
&lt;br /&gt;
* [[Drupal]] &#039;&#039;(Content Management System (CMS) written in PHP)&#039;&#039;&lt;br /&gt;
* [[WordPress]] &#039;&#039;(Web software to create website or blog)&#039;&#039;&lt;br /&gt;
* [[MediaWiki]] &#039;&#039;(Free web-based wiki software application)&#039;&#039;&lt;br /&gt;
* [[DokuWiki]]&lt;br /&gt;
* [[Darkhttpd]]&lt;br /&gt;
&lt;br /&gt;
=== Other Servers ===&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a nfs-server]]&lt;br /&gt;
* [[Phpizabi]] &#039;&#039;(Social Networking Platform)&#039;&#039;&lt;br /&gt;
* [[Statusnet]] &#039;&#039;(Microblogging Platform)&#039;&#039;&lt;br /&gt;
* [[Pastebin]] &#039;&#039;(Pastebin software application)&#039;&#039;&lt;br /&gt;
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]&lt;br /&gt;
&lt;br /&gt;
* [[Patchwork]] &#039;&#039;(Patch review management system)&#039;&#039;&lt;br /&gt;
* [[Redmine]] &#039;&#039;(Project management system)&#039;&#039;&lt;br /&gt;
* [[Request-Tracker]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[OsTicket]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Setting up trac wiki|Trac]] &#039;&#039;(Enhanced wiki and issue tracking system for software development projects)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Cgit]]&lt;br /&gt;
** [[Setting up a git repository server with gitolite and cgit]] &amp;lt;!-- doesn&#039;t exist yet --&amp;gt;&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Glpi]] &#039;&#039;(Manage inventory of technical resources)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[How to setup a Alpine Linux mirror]]&lt;br /&gt;
* [[Cups]]&lt;br /&gt;
* [[NgIRCd]] &#039;&#039;(Server for Internet Relay Chat/IRC)&#039;&#039;&lt;br /&gt;
* [[OpenVCP]] &#039;&#039;(VServer Control Panel)&#039;&#039;&lt;br /&gt;
* [[Mahara]] &#039;&#039;(E-portfolio and social networking system)&#039;&#039;&lt;br /&gt;
* [[Chrony and GPSD | Using chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]&lt;br /&gt;
* [[Sending SMS using gnokii]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring ===&lt;br /&gt;
* Setting up [[collectd]]&lt;br /&gt;
* [[Traffic monitoring]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up traffic monitoring using rrdtool (and snmp)]] &amp;lt;!-- Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up monitoring using rrdtool (and rrdcollect)]]&lt;br /&gt;
* [[Setting up Cacti|Cacti]] &#039;&#039;(Front-end for rrdtool networking monitor)&#039;&#039;&lt;br /&gt;
* [[Setting up Zabbix|Zabbix]] &#039;&#039;(Monitor and track the status of network services and hardware)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft, solution, Networking and Monitoring and Server --&amp;gt;&lt;br /&gt;
** [[Setting up NRPE daemon]] &#039;&#039;(Performs remote Nagios checks)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up Smokeping|Smokeping]] &#039;&#039;(Network latency monitoring)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
** [[Setting up MRTG and Smokeping to Monitor Bandwidth Usage and Network Latency]]&lt;br /&gt;
* [[Setting Up Fprobe And Ntop|Ntop]] &#039;&#039;(NetFlow collection and analysis using a remote fprobe instance)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Cvechecker]] &#039;&#039;(Compare installed packages for Common Vulnerabilities Exposure)&#039;&#039; &amp;lt;!-- Monitoring and Security --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[IP Accounting]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Piwik]] &#039;&#039;(A real time web analytics software program)&#039;&#039;&lt;br /&gt;
* [[Awstats]] &#039;&#039;(Free log file analyzer)&#039;&#039;&lt;br /&gt;
* [[Intrusion Detection using Snort]]&lt;br /&gt;
** [[Intrusion Detection using Snort, Sguil, Barnyard and more]]&lt;br /&gt;
* [[Dglog]] &#039;&#039;(Log analyzer for the web content filter DansGuardian)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Webmin]] &#039;&#039;(A web-based interface for Linux system)&#039;&#039;&lt;br /&gt;
* [[PhpPgAdmin]] &#039;&#039;(Web-based administration tool for PostgreSQL)&#039;&#039;&lt;br /&gt;
* [[PhpMyAdmin]] &#039;&#039;(Web-based administration tool for MYSQL)&#039;&#039;&lt;br /&gt;
* [[PhpSysInfo]] &#039;&#039;(A simple application that displays information about the host it&#039;s running on)&#039;&#039;&lt;br /&gt;
* [[Linfo]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up lm_sensors]]&lt;br /&gt;
&lt;br /&gt;
* [[ZoneMinder video camera security and surveillance]]&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Shell]]&lt;br /&gt;
* [[:Category:Programming]]&lt;br /&gt;
* [[Running glibc programs]]&lt;br /&gt;
* [[:Category:Drivers]]&lt;br /&gt;
* [[:Category:Multimedia]]&lt;br /&gt;
* [[Kernel Modesetting]]&lt;br /&gt;
&lt;br /&gt;
== Complete Solutions ==&lt;br /&gt;
* [[Replacing non-Alpine Linux with Alpine remotely]]&lt;br /&gt;
* [[High performance SCST iSCSI Target on Linux software Raid]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]]&lt;br /&gt;
* [[Experiences with OpenVPN-client on ALIX.2D3]]&lt;br /&gt;
* [[Building a cloud with Alpine Linux]]&lt;br /&gt;
&lt;br /&gt;
* [[ISP Mail Server HowTo]] &#039;&#039;(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-serivce ISP mail server)&#039;&#039;&lt;br /&gt;
** [[ISP Mail Server Upgrade 2.x]]&lt;br /&gt;
** [[ISP Mail Server 2.x HowTo]] &#039;&#039;(Beta, please test)&#039;&#039;&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
* [[Streaming Security Camera Video with VLC]]&lt;br /&gt;
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small_Office_Services]]&lt;br /&gt;
* [[RPI Video Receiver]] &#039;&#039;(network video decoder using Rasperry Pi and omxplayer)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
This does not attempt to be complete. Is it useful to have these listed here? I find them more accessible if grouped with their topics; also, an up-to-date list of all Draft or Obsolete pages can be found at [[Project:Wiki maintenance]].&lt;br /&gt;
&lt;br /&gt;
== Drafts ==&lt;br /&gt;
Currently unfinished/works-in-progress.&lt;br /&gt;
* [[Using Racoon for Remote Sites]]&lt;br /&gt;
* [[Setting up Transparent Squid Proxy]] &#039;&#039;(Covers Squid proxy and URL Filtering system)&#039;&#039;&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using the Squark Squid authentication helper)&#039;&#039; [!-- no longer a draft --]&lt;br /&gt;
* [[Setting up Streaming an Asterisk Channel]]&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039;&lt;br /&gt;
* [[Intrusion Detection using Snort]] &#039;&#039;(Installing and configuring Snort and related applications on Alpine 2.0.x)&#039;&#039;&lt;br /&gt;
* [[IP Accounting]] &#039;&#039;(Installing and configuring pmacct for IP Accounting, Netflow/sFlow collector)&#039;&#039;&lt;br /&gt;
* [[Disk Replication with DRBD]]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11232</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11232"/>
		<updated>2015-09-28T20:45:41Z</updated>

		<summary type="html">&lt;p&gt;Summer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11231</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11231"/>
		<updated>2015-09-28T20:44:18Z</updated>

		<summary type="html">&lt;p&gt;Summer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11230</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11230"/>
		<updated>2015-09-28T20:41:44Z</updated>

		<summary type="html">&lt;p&gt;Summer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
This section will help you format and partition your SD card:&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11229</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11229"/>
		<updated>2015-09-28T20:37:33Z</updated>

		<summary type="html">&lt;p&gt;Summer: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux will be installed as [[Installation#Installation_Handbook|diskless mode]], hence you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots.&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot to verify that the installation was indeed successful.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11228</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11228"/>
		<updated>2015-09-28T20:32:56Z</updated>

		<summary type="html">&lt;p&gt;Summer: Added installation section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
# Insert the SD Card into the Raspberry Pi and turn it on&lt;br /&gt;
# Login into the Alpine system&lt;br /&gt;
# Type &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once the installation is complete, commit the changes by typing &amp;lt;code&amp;gt;lbu commit&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11227</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11227"/>
		<updated>2015-09-28T20:27:23Z</updated>

		<summary type="html">&lt;p&gt;Summer: Preparation section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
=Preparation=&lt;br /&gt;
&lt;br /&gt;
# [http://alpinelinux.org/downloads/ Download] Alpine for Raspberry Pi tarball&lt;br /&gt;
# Mount your SD card to your workstation&lt;br /&gt;
# Use [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or fdisk to create a vfat partition (file system id=&#039;c&#039;)&lt;br /&gt;
# Mark the newly created partition as bootable and save&lt;br /&gt;
# Mount the previously created filesystem&lt;br /&gt;
# Extract the tarball contents to your SD Card&lt;br /&gt;
# Unmount the SD Card.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11226</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=11226"/>
		<updated>2015-09-28T20:13:35Z</updated>

		<summary type="html">&lt;p&gt;Summer: Created a tutorial for Raspberry Pi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will help you install Alpine Linux on your Raspberry Pi.&lt;/div&gt;</summary>
		<author><name>Summer</name></author>
	</entry>
</feed>