lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 09 Apr 2007 18:13:50 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Lennart Sorensen <lsorense@...lub.uwaterloo.ca>
CC:	W Agtail <wagtail@....ie>, netdev@...r.kernel.org
Subject: Re: two gateways with one NIC

Lennart Sorensen wrote:
> On Mon, Apr 09, 2007 at 04:56:20PM +0100, W Agtail wrote:
> 
>>Hi there, and thanks v. much for getting back to me on this one.
>>I now have changed iptables on the web servers to the following:
>>
>>iptables -t mangle -A POSTROUTING -p tcp --sport 8088 -o eth0 -j MARK
>>--set-mark 1
>>iptables -t mangle -A POSTROUTING -p tcp --sport 8089 -o eth0 -j MARK
>>--set-mark 2
>>
>>But I'm still seeing traffic being returned via gw2 for port 8088 :(
>>Any ideas? Thanks.
> 
> 
> Hmm, I know I have done something like this before (I made all port 80
> traffic return through another host rather than the default gateway, but
> it was about 3 years ago and I don't remember the exact syntax).


As the name suggests, POSTROUTING comes after routing, so marking
packets there doesn't affect routing. Use PREROUTING for forwarded
traffic and OUTPUT for locally generated traffic.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ