Hi everyone, I am a bit new to this but I just finally got my first VPN server built off a raspberry pi. I am now able to connect with the client, SSH to the server but cannot access the Internet. I dug through the forums here and could not find a good resolution. Here's my details
server.conf
/etc/openvpn/server.conf
[oconf=]
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/raspberrypi_e8c4d39b-ddc8-4642-81c8-4ce83e0cc0a3.crt
key /etc/openvpn/easy-rsa/pki/private/raspberrypi_e8c4d39b-ddc8-4642-81c8-4ce83e0cc0a3.key
dh none
ecdh-curve prime256v1
topology subnet
server 10.8.0.0 255.255.255.0
# Set your primary domain name server address for clients
push "dhcp-option DOMAIN radx.mywire.org"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
# Prevent DNS leaks on Windows
push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
#DuplicateCNs allow access control on a less-granular, per user servebasis.
#Remove # if you will manage access by user instead of device.
#duplicate-cn
# Generated for use by PiVPN.io
[/oconf]
Following this
https://openvpn.net/community-resources/how-to/#redirect, I am unable to run successfully:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
I get this output:
iptables v1.8.2 (nf_tables): Chain 'MASQUERADE' does not exist
I have a hunch that iptables has to do with it here but a bit clueless on how to tag that. Some other info:
from iptable -vnL:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
from iptables -vnL -t nat:
iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING
Not sure where to head next. Any help would greatly appreciated.
Thanks in advance.