New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to assign static IPs to OpenVPN users?
Hi friends,
Recently I got a VPS from XVMLabs. It's a 512MB RAM VPS with 7 IP addresses. So what I was planning to was to use it as a VPN. I have installed OpenVPN on CentOS 6 (x64) using @Nyr script. As far as I know there is no way to assign static IP to each user using this script. I just want to know, how can I assign static IPs to different users? Any tutorial for that? (Actually, I'm a noob, so please help me )
Thanks!
Script URL: https://github.com/Nyr/openvpn-install
Comments
Check,
http://safesrv.net/simple-guide-to-assign-openvpn-users-static-ips/
I've tried it. But it is not working. And one more thing, that guy is using two IPs: (ifconfig-push 10.8.0.100 10.8.0.101). I know the first one is the IP we want to assign to the OpenVPN user but I'm not sure why he using another? Can you please explain me?
try the following config hope it will work.
touch username in ccd directory.
vim username
ifconfig-push 10.8.0.10
save and quit.
If you like to provide the public ip replace the above with a public ip.
by default openvpn does assign the same ips to the same users. The ipps text file in /etc/openvpn is created for that very purpose.
If you have windows clients, their driver requires you to assign a /30 to each user - the two ips in the above examples are the two usable ips in the middle of the /30. If you only have mac/Linux clients you can add ifconfig-pool-linear to the main server config and then you can assign single ips in the cd files by giving the ip.