[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] How to assign random external IPs to OpenVPN users?


  • Subject: Re: [Openvpn-users] How to assign random external IPs to OpenVPN users?
  • From: Leonardo Rodrigues Magalhães <leolistas@xxxxxxxxxxxxxx>
  • Date: Sun, 10 Feb 2008 15:36:54 -0200



Perfect Privacy escreveu:
But let's come to the basics first: How would I change the IP that is assigned to the Primary Interface, or NIC address on CentOS? This should, as a result mean, that every client who connects to my OpenVPN gets assigned a different external IP, e.g. 216.xx.xx.170, instead of the current one, e.g. 216.xx.xx.164?


You dont need to change the 'main IP' of your interface. If your system is using the main IP, it's probably because you're doing nat POSTROUTING with MASQUERADE target. If you change MASQUERADE and use SNAT, you can specify which would be the translated address.

change
iptables -t nat -A POSTROUTING [your options here]  -j MASQUERADE
by
iptables -t nat -A POSTROUTING [your options here] -j SNAT --to-source 216.xx.xx.YYY


   But this is a iptables problem, not related to OpenVPN at all !

--


	Atenciosamente / Sincerily,
	Leonardo Rodrigues
	Solutti Tecnologia
	http://www.solutti.com.br

	Minha armadilha de SPAM, NÃO mandem email
	gertrudes@xxxxxxxxxxxxxx
	My SPAMTRAP, do not email it




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature