1 |
On March 28, 2017 9:26:05 PM GMT+02:00, Dan Johansson <Dan.Johansson@×××.nu> wrote: |
2 |
>Slight Off-topic, but at least the host are Gentoo. |
3 |
> |
4 |
>Is it possible, using iptables or something equivalent, to redirect |
5 |
>traffic to some specific TCP ports to another gateway than the |
6 |
>default-gateway? |
7 |
> |
8 |
>Eg. |
9 |
> |
10 |
>Host 192.168.1.100/24 has a default-gateway of 192.168.1.1 |
11 |
>Now I want to send all traffic from this host to destination-tcp-port |
12 |
>80 |
13 |
>to gateway 192.168.2.1 instead (the host has a second interface with |
14 |
>the |
15 |
>address 192.168.2.100/24 as well). |
16 |
>I only want the traffic to port 80 to go thru this GW (and then to its |
17 |
>final destination). |
18 |
>And port 80 is just an example, it could be port 12345 as well. |
19 |
> |
20 |
>Is this possible? If yes, any suggestion on how to do it? |
21 |
> |
22 |
>Regards, |
23 |
|
24 |
A quick google led to: |
25 |
|
26 |
http://unix.stackexchange.com/questions/85932/how-can-i-redirect-outbound-traffic-to-port-80-using-iptables-locally |
27 |
|
28 |
I am not certain this will correctly work or not. If the other server has a proxy server running, you might need to change its configuration accordingly. |
29 |
|
30 |
-- |
31 |
Joost |
32 |
-- |
33 |
Sent from my Android device with K-9 Mail. Please excuse my brevity. |