Running OpenVPN server and client concurrently in one DDWRT

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
kknd007
DD-WRT Novice


Joined: 17 Mar 2019
Posts: 13

PostPosted: Sun Mar 17, 2019 11:27    Post subject: Running OpenVPN server and client concurrently in one DDWRT Reply with quote
Hi,
I've got the DDWRT router up running as OpenVPN client to a commercial vpn.
All is working.
Then I enabled the OpenVPN Server and set it up accordingly with all the cert and keys.
After I hit save and reboot, in the status menu I get only the OpenVPN Server up and running status and logs. There is no status nor log for the OpenVPN client connection.

After checking my IP, it's obvious the OpenVPN client isn't working...

I read around and people say you can run server and client in one DDWRT router. Yet my experience doesn't seem so.

Any tips?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12908
Location: Netherlands

PostPosted: Sun Mar 17, 2019 11:38    Post subject: Reply with quote
You can not connect to your OVPN server if you have a OVPN client on the same router without using Policy Based Routing but at least both should start.

So you must have made a major configuration error in setting up.

This forum is full with threads about this subject Smile

_________________
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
kknd007
DD-WRT Novice


Joined: 17 Mar 2019
Posts: 13

PostPosted: Sun Mar 17, 2019 12:20    Post subject: Reply with quote
Embarassed didn't put in any firewall scripts for my vpn server, everything else I followed your post at https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795

thought i'd get away without those firewall scripts... will experiment a bit more then.

Thanks!
kknd007
DD-WRT Novice


Joined: 17 Mar 2019
Posts: 13

PostPosted: Sun Mar 17, 2019 12:59    Post subject: Reply with quote
egc wrote:
You can not connect to your OVPN server if you have a OVPN client on the same router without using Policy Based Routing but at least both should start.

So you must have made a major configuration error in setting up.

This forum is full with threads about this subject Smile


Turns out, after I put in all the cert and key for OpenVPN Server, the bottom half of the OpenVPN client settings e.g. Public Client Cert and Private Client Cert got truncated... And even if I repaste the full string into the windows and hit save, they are still truncated...

I'm using a Netgear R7000 with Firmware: DD-WRT v3.0-r37015M kongac (09/23/1Cool

Gob Smack! Shocked Shocked Shocked
kknd007
DD-WRT Novice


Joined: 17 Mar 2019
Posts: 13

PostPosted: Sun Mar 17, 2019 13:21    Post subject: Reply with quote
found a ticket from 10 years ago...
https://svn.dd-wrt.com/ticket/657

looks like an old issue resurfacing?

the keys and cert of the server setup may be too long? Shocked

i'll try to regenerate a smaller key for server...
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12908
Location: Netherlands

PostPosted: Sun Mar 17, 2019 13:24    Post subject: Reply with quote
Hhmm that is really odd.

Things I can come up with:
Check NVRAM (on status/info page or Status router, maybe it is filled up (unlikely but you never know)

Use another editor to copy and paste (I use Notepad++ and use unix style line endings (under Edit/EOL conversion), but I do not think that this is important.

Maybe DDWRT does not like large (4096) keysize certificates, all settings are retained n an NVRAM variable: openvpn_key, openvpn_ca, openvpn_crt, openvpn_dh
You can check by telnetting into your router and do i.e.:
nvram get openvpn_crt

If everything else fails telnet to your router and reset to defaults by doing: nvram erase && reboot

Put settings in manually do not restore from backup

_________________
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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12908
Location: Netherlands

PostPosted: Sun Mar 17, 2019 13:31    Post subject: Reply with quote
Our previous posts crossed each other, I am curious if it is the keysize, although I recommend using keysize 2048, that is more because 1024 is not safe and deprecated in OVPN 2.4 and thus it will not run with keysize of 1024
_________________
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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12908
Location: Netherlands

PostPosted: Sun Mar 17, 2019 21:50    Post subject: Reply with quote
@eibgrad so glad seeing you back.

I was worried that you were not well.

We really missed your expertise

_________________
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
kknd007
DD-WRT Novice


Joined: 17 Mar 2019
Posts: 13

PostPosted: Mon Mar 18, 2019 14:02    Post subject: Reply with quote
Thanks guys egc, eibgrad, D0ug
Indeed once i regen the server cert n keys to be 2048 bits (was 4096), the keys and cert combined are 4k bytes smaller. And this way the OpenVPN client cert keys are not truncated anymore. Both client and server are now running concurrently.

I'll try PBR with ipv4 to cidr tools online.


Very Happy Very Happy Very Happy
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking 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 cannot attach files in this forum
You cannot download files in this forum