[Solved] OpenVPN Server installation

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
jason_a69
Posts: 11
Joined: Thu Apr 05, 2018 7:30 am

[Solved] OpenVPN Server installation

Post by jason_a69 »

My setup v6.12 | RPi B (armv6l)

I can connect to the server but I can not ping anything on the the server network. If I ping an external address the packet will go out but I will not get a response back.
I checked /etc/sysctl.conf

Code: Select all

net.ipv4.up_forward=1
/etc/openvpn/server.conf

Code: Select all

port 1194
proto udp
dev tun

ca ca.crt
cert DietPi_OpenVPN_Server.crt
key DietPi_OpenVPN_Server.key
dh dh1024.pem

server 10.8.0.0 255.255.255.0

client-to-client
keepalive 10 60
comp-lzo
max-clients 10

user nobody
group nogroup

persist-key
persist-tun
verb 3

#Web Forwarding (uncomment to enable)
push "redirect-gateway"
push "dhcp-option DNS 10.8.0.1"
My remote gateway on the server is 192.168.1.254, does this need to be set anywhere?
jason_a69
Posts: 11
Joined: Thu Apr 05, 2018 7:30 am

Re: OpenVPN Server installation

Post by jason_a69 »

Turned out the openvpn server is ok, just needed a few tweaks to iptables to get it going

Code: Select all

iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.8.0.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADE
This is now solved.
Post Reply