Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Philip Craig <philipc@snapgear.com>
To: ptb@inv.it.uc3m.es
Cc: netfilter@vger.kernel.org
Subject: Re: [help] modern iptables rule for transproxy
Date: Mon, 21 Jan 2008 10:48:10 +1000	[thread overview]
Message-ID: <4793EBCA.5090401@snapgear.com> (raw)
In-Reply-To: <200801181807.m0II78NV022087@betty.it.uc3m.es>

Peter T. Breuer wrote:
> So PREROUTING = forwarding!  I seeeeee.  Not "before any routing takes
> place", as one might naively have supposed from the name :).

Actually, forwarded was the wrong term.  PREROUTING only sees externally
originated packets (which includes both forwarded and packets destined for
the local machine).  It is before any routing.  OUTPUT only sees locally
originated packets, and is also before any routing too (in theory,
implementation differs ;-).  External and local packets have different
entry points into the stack, so no routing is needed to distinguish
between them.

>> Because the '-s ! $PROXY_BOX' means the rule will not match packets
>> that have proxyhost as the source IP address.
> 
> So telnet's packets would not be redirected as desired. But then there
> is no reason why telnet should choose to set src address on outgoing
> packets to some machine that it doesn't even know about, is there?

Hrmm, I thought this talking about when you were running telnet on the
same host as the proxy, so its quite likely it will use the same address
as the proxy.

>> Use 'iptables -t nat -L -n' and look at the packet counters to see which
> 
> It seems I don't have any. I guess that has to be compiled into the
> kernel or modules somewhere.

Sorry, typo there.. it was meant to be 'iptables -t nat -L -v'

> (I have no idea what number to put for loglevel) without seeing anything

You can use the level names instead of numbers (eg info, err)


  parent reply	other threads:[~2008-01-21  0:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 18:07 [help] modern iptables rule for transproxy Peter T. Breuer
2008-01-18 18:59 ` Antonio Augusto (Mancha)
2008-01-21  0:48 ` Philip Craig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-15 19:33 Peter T. Breuer
2008-01-15 23:55 ` Philip Craig
2008-01-12 10:59 Peter T. Breuer
2008-01-12 14:38 ` Gonzalo Arana
2008-01-12 14:58 ` James Lay
2008-01-10 16:02 Peter T. Breuer
2008-01-11  3:30 ` Amos Jeffries

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=4793EBCA.5090401@snapgear.com \
    --to=philipc@snapgear.com \
    --cc=netfilter@vger.kernel.org \
    --cc=ptb@inv.it.uc3m.es \
    /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