Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Ted Kaczmarek <tedkaz@optonline.net>
To: "Попов Игорь Николаевич" <igorpopov@newmail.ru>
Cc: netfilter@lists.netfilter.org
Subject: Re: REDIRECT to localhost
Date: Mon, 16 Aug 2004 07:15:50 -0400	[thread overview]
Message-ID: <1092654950.27598.13.camel@tarkus> (raw)
In-Reply-To: <20040816082400.5165.qmail@flock1.newmail.ru>

On Mon, 2004-08-16 at 12:24 +0400, Попов Игорь Николаевич wrote:
> Hi All,
> I have server, that connects my localnet to inet, clients connects to me via PPPoE (ppp[1-9]). I want to run squid on localhost and I want my clients to connect to it.
> 
> Can somebody help me with redirect rules?
> 
> 
> 
> Igor Popov <igorpopov@newmail.ru>
> icq 241601876
> __________
> www.newmail.ru -- бесплатная почта, бесплатный хостинг.
> 

iptables -t nat -A PREROUTING -i "name of interface" -p tcp -m tcp --
dport 80 -j REDIRECT --to-ports 3129

If your default policy is to DROP all INPUT/FORWARD as is it should be.


iptables -A INPUT -i "name of interface" -p tcp -m tcp --dport 80 -j
ACCEPT


You can also use -s "ip address" instead of -i  "name of interface".

Also, you must put the rules in the proper order in the chain, so -A or
-I depends on you.


Ted





  reply	other threads:[~2004-08-16 11:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16  8:24 REDIRECT to localhost Попов Игорь Николаевич 
2004-08-16 11:15 ` Ted Kaczmarek [this message]
2004-08-17 11:02   ` Igor Popov
2004-08-18  1:21     ` Cedric Blancher
2004-08-18 12:22       ` Ted Kaczmarek
  -- strict thread matches above, loose matches on Subject: below --
2004-08-16 11:23 igorpopov
2004-08-16 14:17 Jason Opperisano
2004-08-18 12:37 Jason Opperisano
2004-08-18 13:41 ` Cedric Blancher
2004-08-18 13:47   ` Cedric Blancher

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=1092654950.27598.13.camel@tarkus \
    --to=tedkaz@optonline.net \
    --cc=igorpopov@newmail.ru \
    --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