It is currently 21.08.2017 14:05


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Assign static ip for vpn client [RESOLVED]
PostPosted: 05.10.2010 10:21 
DES
DES

Joined: 05.10.2010 09:57
Posts: 3
Hello Everybody,

I apologize beforehand for my English.

I use OpenVPN V1.15 + Zerina 0.94i for few years and all works great but i've one problem to solve :

When users are connected to my openvpn server they received dynamic ip with that form 10.0.10.X

I've made some research and find that is possible to have openvpn client connected with static ip adress but i don't know how to do it...

I know that i must add a line "client-config-dir ccd" in the file /var/ipcop/ovpn/server.conf

I know too that i have to create a directory ccd on "/var/ipcop/ovpn" and create a file into but i don't know how to name this file and his content

If Someone could help me...it could be great


Last edited by eagle81 on 06.10.2010 14:21, edited 1 time in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Assign static ip for vpn client
PostPosted: 05.10.2010 15:23 
Profi
Profi

Joined: 23.10.2007 12:10
Posts: 2185
eagle81 wrote:
Hello Everybody,

I use OpenVPN V1.15 + Zerina 0.94i for few years and all works great but i've one problem to solve :

I know that i must add a line "client-config-dir ccd" in the file /var/ipcop/ovpn/server.conf
yes
Quote:
I know too that i have to create a directory ccd on "/var/ipcop/ovpn" and create a file into but i don't know how to name this file and his content

the file has to be named same as the cn (commin name) of certificate.
Wrong name is not too bad ... look at log /var/log/messages) and you will find the "missed name"
replace white spaces by an underline ...
content of that file correct given at doc's -> openvpn.net

F.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Assign static ip for vpn client
PostPosted: 05.10.2010 21:11 
DES
DES

Joined: 05.10.2010 09:57
Posts: 3
Thank you for your answer dl5ym,

For the name of the file that's what i have ever done...

in that file i've defined

ifconfig-push 10.0.10.106 10.0.10.105
iroute 10.0.10.0 255.255.255.255

for Information i post you the server.conf too and the configuration file for the client if you find some errors...
---------------------------------------
server.conf
---------------------------------------
daemon openvpnserver
writepid /var/run/openvpn.pid
#DAN prepare ZERINA for listening on blue and orange
;local X.X.92.95
dev tun
tun-mtu 1400
proto tcp
port 353
tls-server
ca /var/ipcop/ovpn/ca/cacert.pem
cert /var/ipcop/ovpn/certs/servercert.pem
key /var/ipcop/ovpn/certs/serverkey.pem
dh /var/ipcop/ovpn/ca/dh1024.pem
server 10.0.10.0 255.255.255.0
push "route 200.8.85.0 255.255.255.0"
keepalive 10 60
status-version 1
status /var/ipcop/ovpn/server.log 30
cipher BF-CBC
push "dhcp-option DNS 200.8.85.14"
max-clients 100
client-config-dir ccd
tls-verify /var/ipcop/ovpn/verify
crl-verify /var/ipcop/ovpn/crls/cacrl.pem
user nobody
group nobody
persist-key
persist-tun
verb 3
-----------------------------------------
configuration file for client
-----------------------------------------
#tls-client
client
dev tun
proto tcp
tun-mtu 1400
remote X.X.92.95 353
pkcs12 john.p12
cipher BF-CBC
verb 3
ns-cert-type server


Just one another question...Is it necessary to restart a service or the modification of the server.conf file is sufficient?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Assign static ip for vpn client
PostPosted: 06.10.2010 05:42 
Profi
Profi

Joined: 23.10.2007 12:10
Posts: 2185
hello,

hmm missing entry ?
Code:
client-config-dir /var/ipcop/ovpn/ccd

for example ... again to find messages in the IPCops kernel log :)
and you should (always) better define directories with full path.

if there are problems, look at vpn-server log!
it is important in ccd-dir's to use the common name of certificate as filename

(puhhh a part of internet (200.x.x.x) as local net ..)
F.
ps: could you use code-Tags for listings ?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Assign static ip for vpn client
PostPosted: 06.10.2010 09:19 
DES
DES

Joined: 05.10.2010 09:57
Posts: 3
I've follow your advises and change the line "client-config-dir ccd" for "client-config-dir /var/ipcop/ovpn/ccd"

Thank you for all,it works, thanks to you I've earned a lot of time!!!


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ]  Moderator: Moderators

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net