Skip to content

SchroederChris/TunlrLikeDnsProxyRaspberryPi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Setting up a tunlr-like DNS Proxy on the Raspberry Pi

t3slider shows how to set up a tunlr clone here.

This tutorial describes the specifics when using a Raspberry Pi for the local proxy server.

###Basic Setup Download arch linux for the pi

Put it on an SD card, boot the pi and log in as root.

Update arch:

pacman -Syu

Install sudo:

pacman -S sudo

Install adduser:

pacman -S adduser

Add a user:

adduser

Enable sudo for the new user:

EDITOR=nano visudo
add the following line: YOUR_USER_NAME ALL=(ALL) ALL

###17 IP adresses Create an rc.local file:

nano /etc/rc.local

Insert the script from the original tutorial.

Make the file executable:

chmod a+x /etc/rc.local

Create a service for that file:

nano /etc/systemd/system/rc-local.service

Insert the following content:

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=oneshot
ExecStart=/etc/rc.local start
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

Enable the service:

systemctl enable rc-local.service

Reboot and log in with the new user account.

###Install haproxy haproxy is not available from pacman, so we need to install it from aur.

First, install the base-devel package:

sudo pacman -S base-devel

Create a directory for aur builds:

mkdir aur
cd aur

Download the archive from aur and unzip it:

wget https://aur.archlinux.org/packages/ha/haproxy-devel/haproxy-devel.tar.gz
tar xvzf haproxy-devel.tar.gz
cd haproxy-devel

The pi's armv6h architecture is not officially supported, but it will build, so we simply add it:

nano PKGBUILD
add 'armv6h' to the arch list

Build haproxy:

makepkg -sic

Modify haproxy.cfg as described in the original tutorial.

Test haproxy by starting it manually:

haproxy -f /etc/haproxy/haproxy.cfg -d

If it works, enable and start the service:

sudo systemctl enable haproxy
sudo systemctl start haproxy

Make haproxy service depend on rc.local:

sudo nano /lib/systemd/system/haproxy.service
add 'rc-local.servcice' in the After-section

###Remote proxy and DNSmasq See the original tutorial

About

How to setup the local side of a tunlr clone on a Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published