From: "Klemen Kecman" <klemen@sting.si>
To: netfilter@lists.netfilter.org
Subject: Re: IPTABLES + IPROUTE2
Date: Mon, 26 Jan 2004 08:53:59 +0100 [thread overview]
Message-ID: <008601c3e3e1$94d6aeb0$6a02a8c0@klemen> (raw)
In-Reply-To: EHENIKBEJAMHPLPJOJBPCEDKDIAA.lucho@galix.com
$IPT -t nat -A PREROUTING -p tcp -d xxx.xxx.xxx.xxx --dport 53 -j
DNAT --to-destination xxx.xxx.xxx.xxx:53
It will forward the packet as it is to the destination ip and port. If u
have to change the packet what so ever then mangle it.
Klemen Kecman
----- Original Message -----
From: "L.Malinov" <lucho@galix.com>
To: <netfilter@lists.netfilter.org>
Sent: Friday, January 23, 2004 12:44 PM
Subject: IPTABLES + IPROUTE2
> Hi there,
>
> I have the following configuration: Local Net with Linux RedHat 9.0 Squid
> proxy server (with one net card) and 2 gateways - router1 and router2. The
> default gateway for everyone including the proxy is router1. I'd like, the
> http request from the local net sent to the proxy to be forwarded to the
> Internet via router2. I'm trying the following configuration:
>
> iptables -A OUTPUT -o eth0 -t mangle -p tcp --dport 80 -j MARK --set-mark
2
> echo 202 www.out >> /etc/iproute2/rt_tables
> ip rule add fwmark 2 table www.out
> ip route add default via router2 dev eth0 table www.out
>
> It looks like the packets go through the right chain under iptables and
get
> marked, however after that they still don't get forwarded via router2 but
> router1. What could be wrong in this config and is this possible to
achieve
> at all with the above configuration?
>
> Regards
>
> L.Malinov
>
>
next prev parent reply other threads:[~2004-01-26 7:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-23 11:44 IPTABLES + IPROUTE2 L.Malinov
2004-01-23 23:51 ` Antony Stone
2004-01-24 1:04 ` Ramin Dousti
2004-01-24 12:05 ` L.Malinov
2004-01-26 7:53 ` Klemen Kecman [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-24 12:57 L.Malinov
2004-01-24 14:54 ` Antony Stone
2004-01-30 9:39 L.Malinov
2004-01-30 10:50 ` Ray Leach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='008601c3e3e1$94d6aeb0$6a02a8c0@klemen' \
--to=klemen@sting.si \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.