No internet

Ask questions about your Access Server configuration here.
OpenVpn Newbie
Posts: 1
Joined: Sat Dec 31, 2016 1:43 pm

No internet

Postby freggeln » Sat Dec 31, 2016 1:48 pm

I'm trying to setup an OpenVPN server on my raspberry pi. Everything seems to be working except the fact that no internet is available as soon as the openvpn service is started.

I do have the following configuration:

Code: Select all

dev tun
proto udp
port 1194
status /var/log/openvpn-status.log
log /var/log/openvpn.log
verb 3
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/raspberrypi.crt
key /etc/openvpn/easy-rsa/keys/raspberrypi.key
dh /etc/openvpn/easy-rsa/keys/dh4096.pem
tls-auth /etc/openvpn/easy-rsa/keys/tlsauth.key 0
cipher AES-256-CBC
auth SHA512
keepalive 10 120
tls-version-min 1.2
push "redirect-gateway def1"
push "dhcp-option DNS"
push "block-outside-dns"

Moreover I added the following iptables rules.

Code: Select all

iptables -t filter -F
iptables -t nat -F
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s '' -o eth0 -j MASQUERADE
iptables-save > /etc/iptables/rules.v4

As I said internet is available on the server but only if the openvpn service is stopped. As soon as it's started no internet. The client can connect as well to the server but has no internet as well but can access other systems inside the network. So my only issue is that I don't have any internet.

Thanks in advance.

Return to “Configuration”

Who is online

Users browsing this forum: No registered users and 1 guest