I have a Linux server A with a block of 5 public IP addresses, 8.8.8.122/29
.
Currently, 8.8.8.122
is assigned to eth0
, and 8.8.8.123
is assigned to eth0:1
.
I have another Linux machine B in a remote location, behind NAT. I would like to set up an tunnel between the two so that B can use the IP address 8.8.8.123
as its primary IP address.
OpenVPN is probably the answer, but I can't quite figure out how to set things up (topology subnet
or topology p2p
might be appropriate. Or should I be using Ethernet bridging?). Security and encryption is not a big concern at this point, so GRE would be fine too -- machine B will be coming from a known IP address and can be authenticated based on that.
How can I do this? Can anyone suggest an OpenVPN config, or some other approach, that could work in this situation? Ideally, it would also be able to handle multiple clients (e.g. share all four of spare IPs with other machines), without letting those clients use IPs to which they are not entitled.