openvpn-as-dhcp
Hi
I have installed an openvpn-as server. The server has two network interfaces , one with a valid ip address and the other is the local invalid ip address.
apparently, vpn must be configured on the valid ip address, so remote clients could connect to it publicly.
But the problem is that when remote clients connect to the vpn server, they are NATed behind the first interface which has the valid IP address, however I want to them to be NATed behind the seccond interface which has the local IP. The reason is that, according the policy of the organization, only local IP addresses can use the internal network. So, NATed client behind the interface with valid IP address will have the valid IP as the source of their outgoing packets which is not what we want.
Is there any possibility to make users to connect to the valid IP, but the NAT happens behind the local IP interface?
Alternative Solution:
As an alternative solution, I tried bridging with the local IP address, and used the built-in dhcp server in the openvpn to give local ip addresses to the clients. I used server-bridge directive to give lease ip addresses, but the problem was that, its counter is so buggy! It gives all the clients the first IP address in the pool. Sometimes it increment the counter, but sometimes not!
Alternative Alternative Solution:
Since the previous solution had problems, I tried to setup my own dhcp server in the network , but another problem comes up that only windows clients after connection request for an IP address, however Linux/Mac clients need to manually send a DHCP request so that they could get an IP address.
I would appreciate if you could help me.
Thnx in advacne.