pashaxp
There is a VPS server (server1) (Debian 6 x64) running under ESXi 5.5 hypervisor, placed in Data Center, which gave a small block of white IPs. Let it be 12.34.56.78/29.
The only network adapter (eth0) on Debian has settings: ip-address 12.34.56.74, netmask - 255.255.255.248, gw - 12.34.56.73, ns1 - 8.8.8.8, ns2 - 8.8.4.4. So, we have 4 free ip-addresses - 12.34.56.7[5-8] left.
And there is another Debian 6 server (server2), a standalone desktop server, not virtualized with any hypervisor. Just an old desktop hardware used as a local gateway in a small office.
Server2 has its own network settings to access the Internet. 44.55.66.77/30 subnet (eth0 with ip-address 44.55.66.78, nm - 255.255.255.252, gw - 44.55.66.77, ns1 - 8.8.8.8, ns2 - 8.8.4.4). This server has clients behind itself, NAT is used to provide the Internet to them. Grey network is 192.168.1.0/24, eth1 interface with ip-address 192.168.1.1 is used on server2.
The aim is to set up an OpenVPN tunnel (possibly bridged) between server1 and server2 and provide a possibility to use white ip-addresses 12.34.56.7[5-8] on clients behind server2. And the access from all over the world to clients with white IPs behind server2 must work.
How? Can anyone share a working manual? Or help with making this scheme real and working?
My guesses:
1) We need a bridged OpenVPN tunnel between server1 and server2. Setup of OpenVPN will use a tap interface on server1 and maybe on server2 too, I don`t really sure. Do I have to manually prepare this bridged interface (br0 with member of eth0)? Or some script in directive "up" in server.conf can do this as well?
2) Some iptables rules will be necessary on server1 and/or server2 to make all this work, will they? What are those rules?
3) One of the free white ip-addresses I will need to set up as gateway interface on server2, so clients behind this server will use it as default gw. Is it right?
Thanks in advance.