Gentoo Archives: gentoo-user

From: Dan Johansson <Dan.Johansson@×××.nu>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: [gentoo-user] [OT] Redirecting traffic for a TCP port to another gateway
Date: Tue, 28 Mar 2017 19:26:18
Message-Id: a28d57b0-8a63-793f-055b-ada96d142fc8@dmj.nu
1 Slight Off-topic, but at least the host are Gentoo.
2
3 Is it possible, using iptables or something equivalent, to redirect
4 traffic to some specific TCP ports to another gateway than the
5 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
11 to 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
14 final 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 Dan Johansson,
22 ***************************************************
23 This message is printed on 100% recycled electrons!
24 ***************************************************

Attachments

File name MIME type
smime.p7s application/pkcs7-signature

Replies