No internet access on VPN

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
d0mini
DD-WRT Novice


Joined: 10 Oct 2015
Posts: 21

PostPosted: Mon Nov 05, 2018 11:09    Post subject: No internet access on VPN Reply with quote
Hi,

I'm trying to set up a VPN server on my router at home. The client and server connect successfully, but there is no internet access with the client-side error

Quote:
"Could not determine this computer's apparent public IP address before the connection was completed"


I'm pretty sure this is something to do with Additional Config in DD-WRT's OpenVPN settings. My configs are below, if anyone has advice on solving this problem, I would be very grateful.

Router: R7000
Version: v3.0-r36070M kongac (05/31/18)

Client config:

remote my-ddns-address.net 1194
client
dev tun
proto udp
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-256-cbc
float
tun-mtu 1500
ca ca.crt
cert client1.crt
key client1.key

remote-cert-tls server
comp-lzo
verb 3
auth-nocache

server config:

Open VPN: Enable
Start Type: WAN Up
Config As: Server
Server mode: Router(TUN)
Network: 11.8.0.0
Netmask: 255.255.255.0
Port: 1194
Tunnel Protocol: UDP
Encryption Cipher: AES-256 CBC
Hash Algorithm: SHA256
Advanced Options: Enable
TLS Cipher: None
LZO Compression: Yes
Redirect default Gateway: Disabled
Allow Client to Client: Enabled
Allow duplicate cn: Disabled
Tunnel MTU setting: 1500
Tunnel UDP Fragment: Disabled
Additional Config: push "route 192.168.1.0 255.255.255.0"
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12881
Location: Netherlands

PostPosted: Mon Nov 05, 2018 11:56    Post subject: Reply with quote
See my attached note for setup, maybe they are helpfull

Some remarks:
Network is 11.8.0.0, is this a typo? It should be 10.8.0.0

If you do want internet access through the VPN server you have to set a NAT rule and enable "redirect default gateway"

Be sure that the routers subnet, the VPN's subnet and the client are all different, furthermore you can only test from outside e.g via cellular.

These kind of problems can better be posted in the advanced networking forum



DDWRT OpenVPN Server Setup Public.doc
 Description:

Download
 Filename:  DDWRT OpenVPN Server Setup Public.doc
 Filesize:  470.5 KB
 Downloaded:  150 Time(s)


_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
d0mini
DD-WRT Novice


Joined: 10 Oct 2015
Posts: 21

PostPosted: Mon Nov 05, 2018 12:18    Post subject: Reply with quote
Hi egc, thanks for the quick reply!

I set the network to be 11.8.0.0 as I could successfully ping 10.8.0.0 before I had even connected with my VPN. Pinging 11.8.0.0 didn't have that problem, so I chose that instead. Should I set it back to be 10.8.0.0 anyway?

My Router's subnet is 192.168.1.0, the VPN's is 11.8.0.0 right now, and my client subnet is 192.168.1.0 as well.

I did what your notes said for adding the NAT rule to my router's firewall, changed the VPN subnet to 10.8.0.0 and enabled "redirect default gateway" – it finally works!!




My home internet is 70/20 and my client speeds are 100/100, is this speed normal for a VPN setup like this?

Thank you so much for your help!


EDIT

Apologies for the inevitably stupid questions, but can I view other connected devices on my home network including a samba file system with my setup, and if so how? Laughing
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12881
Location: Netherlands

PostPosted: Mon Nov 05, 2018 12:41    Post subject: Reply with quote
Your VPN should be on a private subnet (192.168.x.x., 172.16.x.x or 10.x.x.x) so choose something beginning with 10 i.e. 10.9.0.0 is fine.

It will not work reliably if your Routers subnet and the Clients subnet are the same.
As 192.168.1.0 is often used, you should set your routers IP at something else i.e. 192.168.33.1 /255.255.255.0

When that is set you can access every client on your routers subnet by their IP addresses.
If the SAMBA share is on your router you can open explorer and type \\192.16.33.1 to access your SAMBA share (if router is set on 192.168.33.1)

Edit: you should push the route to the router:
push "route 192.168.33.1 255.255.255.0"

(although when using redirect default gateway this is not strictly necessary, but do it any way)

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
d0mini
DD-WRT Novice


Joined: 10 Oct 2015
Posts: 21

PostPosted: Mon Nov 05, 2018 16:16    Post subject: Reply with quote
Again, doing as you said worked as you said it would. Thank you so much!

Everything is now configured as I would like it to be, the only thing that's a little annoying is the network speed. If you had any thoughts on that, I'd be an extremely lucky internetter. Otherwise, thank you for all the help, I got more done on this today than I thought I would..!


Last edited by d0mini on Mon Nov 05, 2018 16:29; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12881
Location: Netherlands

PostPosted: Mon Nov 05, 2018 16:28    Post subject: Reply with quote
The R7000 with Kong's build is a good combination so you should be able to get more.

The maximum you could get is 20 (the upload speed of your home), but you should be able to get that normally.

You could try to set the cipher to AES 128 (on server and client), but I doubt that is the real problem.

Maybe one of our other forum members has an idea

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
d0mini
DD-WRT Novice


Joined: 10 Oct 2015
Posts: 21

PostPosted: Mon Nov 05, 2018 16:32    Post subject: Reply with quote
Yeah, I had a go at changing the encryption to be AES128 and SHA1, but the performance was still the same.

I'm thinking it's either something to do with my specific version of DD-WRT, or (complete guess) something to do with my current network. That would be in spite of my current network having better internet than my home one. :/
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6866
Location: Romerike, Norway

PostPosted: Mon Nov 05, 2018 17:33    Post subject: Reply with quote
Tunnel MTU setting: 1500

This is to big. Try with 1492


https://forums.openvpn.net/viewtopic.php?t=25039
d0mini
DD-WRT Novice


Joined: 10 Oct 2015
Posts: 21

PostPosted: Tue Nov 06, 2018 8:46    Post subject: Reply with quote
Hey,

Are you saying I should change the tunnel MTU setting just for the server, and not for the client config?

The server has the setting you suggested, "Tunnel MTU setting". The client config has one too, called "tun-mtu", both of which are currently 1500.

Either way, trying with just the server setting changed and then both changed led to no difference in VPN speeds.

EDIT


I also tried the VPN at home (server location) as well as at work:

VPN at home: 30/2.8
VPN at work: 2.7/2.7
Home network speed: 70/20
Work network speed: 100/100

No idea what's going on here, the only thing changing is location.
d0mini
DD-WRT Novice


Joined: 10 Oct 2015
Posts: 21

PostPosted: Wed Nov 07, 2018 16:51    Post subject: Reply with quote
It took me a little while, but after much reading my highly developed brain finally realised that client download speed is entirely dependent on server upload speed (I'm very smart by the way), and seeing as I'd limited uploads to 3mbit/s, it makes sense my VPN download speed was 2.7mbit/s.

What I don't really understand is why this behaviour wasn't consistent, as I got ~30mbit/s download when at home (where the server is) and on VPN. Aside from that, mystery solved, thank you everyone for your time.

I feel dumb but it was worth it..!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum