I've previously installed openvpn about 3 times before when my PC was also the router and firewall for my home LAN (internet connection was into this PC directly) and I've never had any problems.
But now I have a different setup with a dd-wrt router, and my PC is connected to that router only with 1 cable. OpenVPN is on the PC not on the router, but the internet connection for that PC goes through the router and the router does NAT.
I added a route in dd-wrt and the VPN now works but it is reaaaaaaaaly slow. I tried copying 8KB over a samba network share and it took over 5 minutes! It's the same for anything else too, like HTTP traffic to my LAN etc (when accessing it from outside through OpenVPN). Funny enough it seems that forwarding of traffic to my home internet seems to work a little better, but access to my home LAN is just terribly slow.
The route I am using in dd-wrt is: 10.8.0.0 (destination LAN NET) 255.255.255.0 (subnet mask) 192.168.1.3 (gateway) LAN & WLAN (interface). 10.8.0.0 is my VPN subnet, 192.168.1.3 is the IP of the PC running OpenVPN and 192.168.1.1 is the IP of the dd-wrt router. The router is also set up as a dhcp server for my LAN, but that's probably irrelevant.
Pinging also results in timeouts in more than 50% cases. I'm using TUN mode through UDP, just like I always did it. I used Webmin to set it up, following this guide: http://www.frontiernet.net/~beakmyn/vpn ... Guide.html
I used this 2 times before, when my PC was directly connected to the internet, and it worked flawlessly.
This time I basically followed that guide again, but I had to also add the extra route in my dd-wrt at the end to make it work.
Incredibly slow connection <1KB/s
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Sun Oct 02, 2011 8:10 pm
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Incredibly slow connection <1KB/s
this could very well an ISP issue; try adding
to both client and server configs to see if it helps;
if UDP packets are dropped randomly (as the dropped PINGs suggest) then your ISP might be at fault as well. Try switching to 'mode tcp' to see if that helps.
Code: Select all
fragment 1200
if UDP packets are dropped randomly (as the dropped PINGs suggest) then your ISP might be at fault as well. Try switching to 'mode tcp' to see if that helps.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Sun Oct 02, 2011 8:10 pm
Re: Incredibly slow connection <1KB/s
janjust: I'm pretty sure it's not the ISP, because before I left home (I am abroad now), I tried connecting from my home connection (I have multiple IPs so I can do that), and it was also very bad. It was not as bad as this, but I thought it was very weird at the time. I thought it will do, but now that I am connecting from a little away it's even more terrible.
When connecting from home it was already very laggy even in SSH, and I tried RDC to a Windows machine and it seemed to be very unstable (just disconnected a lot).
Like I said I've set up OpenVPN like this many times before, never any problems, the only difference now is that this PC is behind a dd-wrt router now, whereas before it was connected directly to the internet. Somehow I feel the problem is related to this.
When connecting from home it was already very laggy even in SSH, and I tried RDC to a Windows machine and it seemed to be very unstable (just disconnected a lot).
Like I said I've set up OpenVPN like this many times before, never any problems, the only difference now is that this PC is behind a dd-wrt router now, whereas before it was connected directly to the internet. Somehow I feel the problem is related to this.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Incredibly slow connection <1KB/s
check the cables at home between the cable/ADSL modem and the dd-wrt, and between the dd-wrt box and the VPN server; also, run an ssh daemon on the dd-wrt box and/or the vpn server and connect to that - what kind of reliability/performance do you get out of that?
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: Incredibly slow connection <1KB/s
If adding dd-wrt router dropped the performance - it's obvious. Try check and update the dd-wrt. Also look in dd-wrt if none instances of OpenVPN is running.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Sun Oct 02, 2011 8:10 pm
Re: Incredibly slow connection <1KB/s
janjust: The cables are fine. I connect to both the PC and the router at my home (from inside the LAN) all the time with no problems. If I connect to the router via telnet there is no problems. I can even connect to my PC from the router via SSH (so telnet router then ssh PC), and that works great. So the problem is in the OpenVPN configuration, I am pretty sure.
Mimiko: It's the newest version of dd-wrt. There is no indication that something would be wrong with the router. I am pretty sure it has something to do with the configuration of OpenVPN or with NAT/routing table on the router.
And by the way, no it's not obvious... Previously the router was the same PC that is running OpenVPN. So there is a big chance the fact the router is running dd-wrt has nothing to do with it.
Mimiko: It's the newest version of dd-wrt. There is no indication that something would be wrong with the router. I am pretty sure it has something to do with the configuration of OpenVPN or with NAT/routing table on the router.
And by the way, no it's not obvious... Previously the router was the same PC that is running OpenVPN. So there is a big chance the fact the router is running dd-wrt has nothing to do with it.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Incredibly slow connection <1KB/s
good, so it's not the cables; did you try adding
(udp mode only)
can you try switching to tcp mode (without the fragment option) ?
Code: Select all
fragment 1200
can you try switching to tcp mode (without the fragment option) ?