[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Öppna sockets på port < 1024 som !root



On Wed, 30 Nov 2005 11:30:58 +0100, Håkan Kvist wrote:

> Kan jag i en applikation på något sätt öppna en socket på en port <
> 1024 som en annan användare än root?

Nej, desværre. Det kunne være rigtig rart, om man måske havde noget i
stil med /dev/ports/80 hvortil man fx. kunne sætte "apache" brugeren som
ejer.

Anyways:

Et hack kan være at udføre noget port-redirigering på pågældende
maskine. Hvis vi siger, at relevante interface er eth0 og dets
IP-adresse er 1.2.3.4, så kan vi sørge for, at requests til fx. port
80/tcp videresendes til port 8080/tcp (én lang kommando):

iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT
--to-destination 1.2.3.4:8080

Så vidt jeg ved, er man nødt til at gøre det for alle lyttende
interfaces, inkl. localhost.

-- 
Greetings from Troels Arvin, Copenhagen, Denmark



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-01-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *