Forwarding all incoming traffic to another host

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
meta24
OpenVpn Newbie
Posts: 6
Joined: Sat Jul 29, 2017 12:21 pm

Forwarding all incoming traffic to another host

Post by meta24 » 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.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Forwarding all traffic to another host

Post by TinCanTech » Mon Jul 31, 2017 12:21 pm

meta24 wrote:Did I explain the problem in an understandable manner?
No.

meta24
OpenVpn Newbie
Posts: 6
Joined: Sat Jul 29, 2017 12:21 pm

Re: Forwarding all incoming traffic to another host

Post by meta24 » Tue Aug 01, 2017 6:56 am

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.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Forwarding all incoming traffic to another host

Post by TinCanTech » Tue Aug 01, 2017 10:11 am


meta24
OpenVpn Newbie
Posts: 6
Joined: Sat Jul 29, 2017 12:21 pm

Re: Forwarding all incoming traffic to another host

Post by meta24 » Tue Aug 01, 2017 5:40 pm

I don't see how that applies to my problem.

AveryTeb
OpenVpn Newbie
Posts: 1
Joined: Fri Jul 28, 2017 12:54 pm

Re: Forwarding all incoming traffic to another host

Post by AveryTeb » Fri Aug 04, 2017 8:05 am

What about a 301?

mar565
OpenVpn Newbie
Posts: 1
Joined: Fri Feb 01, 2019 5:35 pm

Re: Forwarding all incoming traffic to another host

Post by mar565 » Fri Feb 01, 2019 5:37 pm

Hello meta24,
did you find a solution to the problem?
Im facing the same issue right now.

Post Reply