Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/components/com_k2/models/item.php on line 763

给openvpn客户分配固定ip

ifconfig-pool-persist ipp.txt

ipp.txt 内 就是固定 ip

 

 

 

在/etc/openvpn/server.conf中增加\
client-config-dir /etc/openvpn/ccd

然后在 /etc/openvpn/ccd目录中放针对每个客户端的个性化配置文件。
文件名就用客户端名 生成key的时候输入的 "Common Name" 名字

比如要设置客户端 liushiwei为 192.168.2.24 
只要在 /etc/openvpn/ccd/liushiwei文件中包含一行:

ifconfig-push 192.168.2.24 255.255.255.0


就可以了

 

sudochown-R nobody:nogroup /etc/openvpn/ccd

Last modified onWednesday, 07 August 2013 18:16

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
  • Published in Openvpn
  • Read 2986 times

Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
back to top