I've been following this guide by BBC: http://www.bbc.co.uk/news/technology-33548728 I've been trying to get this VPN running for a while now so have tried a lot of different things. I believe the error is something to do with the firewall of the raspberry pi since I have enabled port forwarding on my router for port 22 (SSH) and 1194 (VPN) and the SSH works fine using my public ip address.
The guide is outdated now because it uses /etc/network/interfaces to create a static ip address whereas for me, I had to edit /etc/dhcpcd.conf to something along the lines of:
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
Later on in the guide I create a firewall rule:
#!/bin/sh
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source 192.168.0.10
# SWAP THE IP NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
and am told to do the following:
begin quote: " Type:
nano /etc/network/interfaces
Find the line that says: "iface eth0 inet static." We want to add a line below the list of numbers that follow it. This line needs to be added at an indent so hit TAB first:
pre-up /etc/firewall-openvpn-rules.sh
" end quote
But am I supposed to put this line somewhere in the dhcpcd.conf file instead?
Also, I tried flushing the iptable and then doing this
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
from here: https://superuser.com/questions/634469/need-iptables-rule-to-accept-all-incoming-traffic
That last step of flushing and accepting everything managed to get me past error code 111 (connection refused) but instead I get error 113 (host unreachable).
Thank you for any help.
In addition, typing
nmap -sU localhost
does not show port 1194 (only 68, 123, and 5353. nmap localhost shows just 22)