Setting up Raspberry Pi as an OpenVPN Server (Step by Step Tutorial)

Published: 11 October 2013
on channel: Manthan
142,393
934

In this video, I will conduct a step by step tutorial on how to configure OpenVPN service on the Raspberry Pi, a $25 credit card sized computer. Using the Raspberry Pi as a low powered OpenVPN Server is a great way to access your network resources from an external location. Additionally, VPN services provide a layer of security that makes them ideal when browsing the internet from a public setting. All packets transmitted are encrypted as they are sent and received.

Timeline of the Video:

0:00 - 2:17 - Initial Configuration of Raspberry Pi
2:18 - 11:24 - Installation and Configuration of OpenVPN
11:25 - 16:33 - Demonstration of OpenVPN client connection with Raspberry Pi

PPTP VPN Video:    • Raspberry Pi - Setting up PPTP VPN + ...  

-------------------------------------------------------------------------------------------------------------------------
Lengthy Pieces of Code:

Openvpn.conf code:
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
user nobody
group nogroup
server 10.8.0.0 255.255.255.0
persist-key
persist-tun
status /var/log/openvpn-status.log
verb 3
client-to-client
push "redirect-gateway def1"
#set the dns servers
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
log-append /var/log/openvpn
comp-lzo

newvpn.ovpn Code:
dev tun
client
proto udp
remote YOUR.RASPBERRYPI.IPADRESS 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 3

Routing Code:

iptables -t nat -A INPUT -i eth0 -p udp -m udp --dport 1194 -j ACCEPT

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source RASPBERRY.PI.IP.ADRESS (Replace with Raspberry Pi internal IP Address)

------------------------------------------------------------------------------------------------------------------------
Supplementary Content to this tutorial: http://goo.gl/iRi7Ih

Cheers! If you enjoyed this video, please consider subscribing to the channel and hitting the like button! Additionally, feel free to leave feedback discussing your experiences with OpenVPN on the Raspberry Pi!


Watch video Setting up Raspberry Pi as an OpenVPN Server (Step by Step Tutorial) online without registration, duration hours minute second in high quality. This video was added by user Manthan 11 October 2013, don't forget to share it with your friends and acquaintances, it has been viewed on our site 142,39 once and liked it 93 people.