How can I assign OpenVPN clients static IPs

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


Joined: 26 Oct 2014
Posts: 42

PostPosted: Mon Jun 20, 2016 14:41    Post subject: How can I assign OpenVPN clients static IPs Reply with quote
Hi there,

I am trying to work out how to assign my various OpenVPN clients static IPs every time they connect.

I have found multiple posts explaining how to do it when OpenVPN is on a PC, but not when it is on a DD-WRT based router.

I understand it will involve adding information to my server config and also to my start up commands. I just don't know what I should be adding.

Any advice would be greatly received
Sponsor
Mike42Smith
DD-WRT User


Joined: 14 Feb 2016
Posts: 146
Location: Germany

PostPosted: Sun Jun 26, 2016 12:00    Post subject: Reply with quote
I added the following to my VPN server additional config:

client-config-dir /tmp/openvpn/ccd

and these lines to the start-up script to generate the client specific config files:

echo 'ifconfig-push 192.168.1.100 255.255.255.0
iroute 192.168.1.100 255.255.255.255
push "route 192.168.0.0 255.255.255.0 192.168.1.1"' > /tmp/openvpn/ccd/clientABC

Please be aware that the config file has to named like the comman name of the certifiacte of the client.

_________________
Ongoing experiences with:
Linksys E3000 and WRT610N v2
TP-Link Archer C9
Raspberry Pi and TP-Link TL-WR710N with OpenWRT
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