No Internet Connection on QNAP

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
gourmet01
OpenVpn Newbie
Posts: 2
Joined: Mon Jan 16, 2012 1:00 am

No Internet Connection on QNAP

Post by gourmet01 » Mon Jan 16, 2012 1:16 am

Hello,

upfront a "sorry" if that has been discussed already, but I have not been able to find a solution so far.

Here my little problem.

I have installed OPENVPN on my QNAP NAS and it worked so far like a charm. I can connect to my local LAN (192.168.1.x) via the Tunnelblick SW on my Mac.
Then I decided that I want to use the VPN tunnel for ALL of my traffic and added a "redirect-gateway def1" command.
This does not work at all - I can not reach the internet and need some advise on the config of Server any Client.

I guess I have to add a route to the server config or tell the NAS to NAT the traffic - however I am not certain and need some advice on the "How To".

Thanks in advance for your help

Here the Server Config:

Code: Select all

# OpenVPN server Konfiguration QNAP NAS
# Basiseinstellungen
port 1194
proto udp
dev tun
#
# Legt die IP-Adressen der zugrundeliegenden VPN Verbindung fest 
server 10.8.0.0 255.255.255.0
#
; mtu-test  # mtu-Wert feststellen, falls die Übertragung sehr langsam ist.
; tun-mtu xyz  # mtu Wert festlegen, falls notwendig
#
# Route 
push "route 192.168.1.0 255.255.255.0"   #  <--- Hier die IP des Heimnetzwerks eintragen!
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.0"
push "route-gateway 192.168.1.1"

#
# Schlüssel und Zertifikate
dh /opt/etc/openvpn/keys/dh1024.pem
ca /opt/etc/openvpn/keys/ca.crt
cert /opt/etc/openvpn/keys/server.crt
key /opt/etc/openvpn/keys/server.key
#
# Datenkomprimierung
comp-lzo
#
# Erlaubt, dass sich mehrere clients mit dem selben common name anmelden
; duplicate-cn
#
# Verschiedene clients können sich gegenseitig sehen
; client-to-client
#
# Keepalive
keepalive 15 120
#
# Meldungen in der Konsole (1-9 möglich. Zur Fehlerbehebung aktivieren)
; verb 5
mute 30  # logging nach 30 gleichen Einträgen einstellen bis zu einer Änderung
#
# Log
; status /opt/etc/openvpn/log/status.log
; log-append /opt/etc/openvpn/log/openvpn.log
# 
# Run as daemon (Erst aktivieren, wenn alles eingerichtet ist und läuft)
;daemon
#
# Management Interface über "telnet localhost 7505" zu erreichen
management localhost 7505

Client Config:

Code: Select all

client
dev tun
proto udp
remote XXXXX.dyndns.org 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client2.crt
key client2.key
comp-lzo
verb 3

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: No Internet Connection on QNAP

Post by maikcat » Mon Jan 16, 2012 7:37 am

remove this from your server config

push "route-gateway 192.168.1.1"


Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

gourmet01
OpenVpn Newbie
Posts: 2
Joined: Mon Jan 16, 2012 1:00 am

Re: No Internet Connection on QNAP

Post by gourmet01 » Mon Jan 16, 2012 8:43 am

Hello,

thanks for this hint. I tied it without the command and it does not work either.

Any clue what el
se can help tonrech the 192.168.1.x Lan AND the external Internet via my gateway 192.168.1.1 ?

Thanks

Regards

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: No Internet Connection on QNAP

Post by maikcat » Mon Jan 16, 2012 9:06 am

what OS is your client?
which openvpn version are you using on your client?

can you post the output of netstat -nr command before and after openvpn starts?

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

Post Reply