From: tengaman@wolke7.net
To: netfilter@vger.kernel.org
Subject: Re: NAT not for filtering - problem
Date: Wed, 18 Feb 2009 00:27:44 +0100 [thread overview]
Message-ID: <20090217232744.GA5471@localhost> (raw)
In-Reply-To: <20090217152840.GA3683@localhost>
[-- Attachment #1: mail.1 --]
[-- Type: text/plain, Size: 1708 bytes --]
Hello again,
being more graphic this time:
>--uid-owner debian-tor does not match the redirected traffic.
>Meaning although the traffic is processed by a process owned by a
>different user --uid-owner still maches the orignal user of the data.
I figured out myself, that can't be, because:
After redirecting the traffic the packages are used by the
tor-programm not 'piped through'!
tor generates completely new packages that should be matched by
"--uid-owner 'user of the daemon process'" - am I right?
Original Setup: all tables empty with POLICY ACCEPT
>iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner tor-user -j \
>REDIRECT --to-ports 9040
>iptables -t nat -A OUTPUT -p udp -m owner \
>--uid-owner tor-user -m udp --dport 53 -j REDIRECT --to-ports 53
>iptables -t nat -A OUTPUT -m owner --uid-owner \
>tor-user -j DROP
The funny thing is, it isn't working: I'm able to ping a remote host
although ICMP should be dropped, why is that?
But the transparent-proxy does work!
By the way, the hole concept comes from:
https://wiki.torproject.org/noreply/TheOnionRouter/TransparentProxy?highlight=%2528transparent%2529
Ok, new idea: again all tables empty with POLICY ACCEPT
>iptables -t nat -A OUTPUT -p tcp -m owner \
>--uid-owner tor-user -j REDIRECT --to-ports 9040
>iptables -t nat -A OUTPUT -p udp -m owner \
>--uid-owner tor-user -m udp --dport 53 -j REDIRECT --to-ports 53
>iptables -t filter -A OUTPUT -m owner --uid-owner \
>debian-tor -j ACCEPT
>iptables -t filter -A OUTPUT -m owner --uid-owner \
>debian-tor -j DROP
I don't get any connection with this setup.
I also tried to mark the traffic but - yeah - I don't understand whats
happening - any idea?
regards
Sebastian R.
next prev parent reply other threads:[~2009-02-17 23:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 15:28 NAT not for filtering - problem tengaman
2009-02-17 23:27 ` tengaman [this message]
2009-02-18 2:58 ` tengaman
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=20090217232744.GA5471@localhost \
--to=tengaman@wolke7.net \
--cc=netfilter@vger.kernel.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