Gentoo Archives: gentoo-user

From: Alarig Le Lay <alarig@××××××××××.fr>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Redirecting traffic for a TCP port to another gateway
Date: Tue, 28 Mar 2017 19:31:27
Message-Id: 20170328193112.gzltgonm3np2k743@mew.swordarmor.fr
In Reply to: [gentoo-user] [OT] Redirecting traffic for a TCP port to another gateway by Dan Johansson
1 On mar. 28 mars 21:26:05 2017, Dan Johansson wrote:
2 > Slight Off-topic, but at least the host are Gentoo.
3 >
4 > Is it possible, using iptables or something equivalent, to redirect traffic
5 > to some specific TCP ports to another gateway than the default-gateway?
6 >
7 > Eg.
8 >
9 > Host 192.168.1.100/24 has a default-gateway of 192.168.1.1
10 > Now I want to send all traffic from this host to destination-tcp-port 80 to
11 > gateway 192.168.2.1 instead (the host has a second interface with the
12 > address 192.168.2.100/24 as well).
13 > I only want the traffic to port 80 to go thru this GW (and then to its final
14 > destination).
15 > And port 80 is just an example, it could be port 12345 as well.
16 >
17 > Is this possible? If yes, any suggestion on how to do it?
18 >
19 > Regards,
20
21 Hi,
22
23 Why do you don’t put another server on the desired network?
24
25 --
26 alarig

Attachments

File name MIME type
signature.asc application/pgp-signature