OpenVPN server setup guide by egc -> CCD files

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


Joined: 04 Dec 2020
Posts: 1
Location: Germany

PostPosted: Thu Feb 18, 2021 3:56    Post subject: OpenVPN server setup guide by egc -> CCD files Reply with quote
Thanks for this excelent guide at first.

Just a question about the setup with CCD files. The guide says:
"...if you do not have permanent storage, just use the default directory (/tmp/openvpn/ccd)..."
and recommend to add "echo "ifconfig-push 10.8.0.4 255.255.255.0" > /jffs/etc/openvpn/ccd/client1" to "Administration/Commands".
Is this correct? This do not look to me like it would add a file to "/tmp/openvpn/ccd"
Shouldn't it be "echo "ifconfig-push 10.8.0.4 255.255.255.0" > /tmp/openvpn/ccd/client1"???
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Thu Feb 18, 2021 4:18    Post subject: Reply with quote
It will do the deed. However, it requires that you create the subdirectory structure first (not sure if the guide mentions this).

Code:
mkdir -p /jffs/etc/openvpn/ccd
echo "ifconfig-push 10.8.0.4 255.255.255.0" > /jffs/etc/openvpn/ccd/client1


Once done, it's simple enough to verify. Go to a shell (telnet/ssh) and paste the following command in the window, which dumps the contents of the file.

Code:
cat /jffs/etc/openvpn/ccd/client1


P.S. If you don't have JFFS, and you need to use the ramdrive instead (/tmp), then you need to add the following to the startup script.

Code:
mkdir -p /tmp/openvpn/ccd
echo "ifconfig-push 10.8.0.4 255.255.255.0" > /tmp/openvpn/ccd/client1


IOW, same issue. You need to create the subdirectory structure first.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Thu Feb 18, 2021 8:32    Post subject: Reply with quote
Thanks @eibgrad and @fb, new guide is up:
https://forum.dd-wrt.com/phpBB2/download.php?id=44043

_________________
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
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