Page 1 of 1

Forwarding all incoming traffic to another host

Posted: Mon Jul 31, 2017 12:07 pm
by meta24
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.

Re: Forwarding all traffic to another host

Posted: Mon Jul 31, 2017 12:21 pm
by TinCanTech
meta24 wrote:Did I explain the problem in an understandable manner?
No.

Re: Forwarding all incoming traffic to another host

Posted: Tue Aug 01, 2017 6:56 am
by meta24
OK, let me try that again by explaning the problem:

I want to run a mail server at home. At home I only have a dynamic address that belongs to a dialup pool. To run a mailserver, you need a non-dialup-IP.
So I rent a VPS to use its IP.

I want to forward/redirect/tunnel all traffic sent to the VPS to my server at home.

With email servers you can see their IP addresses in the "Received" mail headers. For that reason I'd like that the machine at home has an interface with the IP address of the VPS so that IP will be written to the Received header.

Oh and I may want to run other services besides email. So I'd like to forward a port range.

Re: Forwarding all incoming traffic to another host

Posted: Tue Aug 01, 2017 10:11 am
by TinCanTech

Re: Forwarding all incoming traffic to another host

Posted: Tue Aug 01, 2017 5:40 pm
by meta24
I don't see how that applies to my problem.

Re: Forwarding all incoming traffic to another host

Posted: Fri Aug 04, 2017 8:05 am
by AveryTeb
What about a 301?

Re: Forwarding all incoming traffic to another host

Posted: Fri Feb 01, 2019 5:37 pm
by mar565
Hello meta24,
did you find a solution to the problem?
Im facing the same issue right now.