From: Ruslan Spivak <alienoid@is.lg.ua>
To: Chris Wilson <chris@netservers.co.uk>
Cc: netfilter@lists.netfilter.org
Subject: Re: REDIRECT question
Date: Wed, 02 Jul 2003 16:13:09 +0300 [thread overview]
Message-ID: <3F02DA65.60904@is.lg.ua> (raw)
In-Reply-To: <Pine.LNX.4.44.0307021216100.16552-100000@localhost>
Chris Wilson wrote:
>Hi Ruslan,
>
>
>
>>I just want to be sure that after redirecting, the packet is going to
>>input chain where i can filter it. (am i right?)
>>
>>
>
>As far as I know, that's right.
>
>Cheers, Chris.
>
>
One more question, please.
I have three nets that located in our city and i treat them as local,
cause we have direct connection with that networks.
i need to redirect traffic that is going to outside world to port
3128(squid) and traffic to local nets leave alone.
Following your previous advices, i have made suggestions about how it
should look:
LOCAL_NET_1=193.108.240.0/22
LOCAL_NET_2=193.220.70.32/27
LOCAL_NET_3=193.220.70.64/27
iptables -t nat -N REDIRECT_CHAIN
iptables -t nat -A REDIRECT_CHAIN -p tcp -d $LOCAL_NET_1 --dport 80 -j
RETURN
iptables -t nat -A REDIRECT_CHAIN -p tcp -d $LOCAL_NET_2 --dport 80 -j
RETURN
iptables -t nat -A REDIRECT_CHAIN -p tcp -d $LOCAL_NET_3 --dport 80 -j
RETURN
iptables -t nat -A REDIRECT_CHAIN -p tcp --dport 80 -j REDIRECT
--to-port 3128
iptables -t nat -A PREROUTING -j REDIRECT_CHAIN
Can you tell me if i'm on on a right way?
Again, thanks in advance.
Best regards,
Ruslan
next parent reply other threads:[~2003-07-02 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0307021216100.16552-100000@localhost>
2003-07-02 13:13 ` Ruslan Spivak [this message]
2014-03-22 13:38 Redirect question Danny
2014-03-22 22:32 ` Nikolai Lusan
-- strict thread matches above, loose matches on Subject: below --
2005-03-04 22:59 Redirect Question Gary W. Smith
2005-03-04 23:05 ` Gavin Hamill
2003-07-13 21:55 REDIRECT question George Vieira
2003-07-11 11:09 Ruslan Spivak
2003-07-02 10:56 Ruslan Spivak
2003-07-02 11:01 ` Chris Wilson
2003-07-02 11:14 ` Ruslan Spivak
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=3F02DA65.60904@is.lg.ua \
--to=alienoid@is.lg.ua \
--cc=chris@netservers.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).