Forwarding all incoming traffic to another host
Posted: Mon Jul 31, 2017 12:07 pm
Hi,
I have a client in a home network that I want to run a mail server on. Mail servers generally need non-dialup IP addresses so they are not blocked by RBLs.
So I want to use a VPS with OpenVPN to provide a public IP address (that of the VPS) to the box in the internal network.
All incoming traffic directed at the server should be redirected over the VPN (with the exception of 1 maintenance port).
Ideally I'd like to have the client have an interface (probably the tunnel interface) with the public IP address of the server, that way that's the only IP address that gets written to things such as mail headers. But that is not a hard requirement.
Is there a way to configure the routing on the server so it will send packets that are addressed to its public IP address to a OpenVPN tunnel instead?
Example with public IP 8.8.8.8:
8.8.8.8 (eth) openvpn_server 10.0.0.1 (tun) poinToPoint 8.8.8.8 (tun) openvpn_client
Is this possible? Is there a better way? Did I explain the problem in an understandable manner?
Your input is appreciated.
I have a client in a home network that I want to run a mail server on. Mail servers generally need non-dialup IP addresses so they are not blocked by RBLs.
So I want to use a VPS with OpenVPN to provide a public IP address (that of the VPS) to the box in the internal network.
All incoming traffic directed at the server should be redirected over the VPN (with the exception of 1 maintenance port).
Ideally I'd like to have the client have an interface (probably the tunnel interface) with the public IP address of the server, that way that's the only IP address that gets written to things such as mail headers. But that is not a hard requirement.
Is there a way to configure the routing on the server so it will send packets that are addressed to its public IP address to a OpenVPN tunnel instead?
Example with public IP 8.8.8.8:
8.8.8.8 (eth) openvpn_server 10.0.0.1 (tun) poinToPoint 8.8.8.8 (tun) openvpn_client
Is this possible? Is there a better way? Did I explain the problem in an understandable manner?
Your input is appreciated.