All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric <eric@cisu.net>
To: linux-kernel@vger.kernel.org
Subject: Re: allow process or user to listen on priviledged ports?
Date: Wed, 24 Dec 2003 16:00:16 -0600	[thread overview]
Message-ID: <200312241600.16035.eric@cisu.net> (raw)
In-Reply-To: <y2allp1c32o.fsf@cartman.at.fivegeeks.net>

On Wednesday 24 December 2003 03:34 pm, Adam Sampson wrote:
> Sven Köhler <skoehler@upb.de> writes:
> > So is there any machanism to bind that permission (to listen on a
> > priviledged tcp-port) to a specific user or a specific process?
>
> Even if you can't find a way to do this, you can cheat: use an
> iptables DNAT rule to translate connections to the desired port into
> connections to a non-privileged port upon which your daemon is
> actually listening. Something like:
>
> iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 1.2.3.4:8080
 Not to be too picky, but I think the redirect target is better suited for 
this. I haven't seen the source, but I assume it will be more efficient 
because it knows the destination is the local machine. 
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 22
-------------------------
Eric Bambach
Eric at cisu dot net
-------------------------

  parent reply	other threads:[~2003-12-24 22:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-24 16:43 allow process or user to listen on priviledged ports? Sven Köhler
2003-12-24 17:02 ` Michael Buesch
2003-12-24 17:23 ` Olaf Dietsche
2003-12-24 21:34 ` Adam Sampson
2003-12-24 21:59   ` Thomas Zehetbauer
2003-12-24 22:00   ` Eric [this message]
2003-12-25 10:45 ` Nick Craig-Wood
2003-12-25 12:18   ` Sven Köhler
2003-12-25 17:46     ` Sven Köhler

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=200312241600.16035.eric@cisu.net \
    --to=eric@cisu.net \
    --cc=linux-kernel@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 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.