[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] Öpp sockets port < 1024 som !root



In <sslug@sslug> Troels Arvin <sslug@sslug> writes:

>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


En enklere måde at gøre det samme:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 80


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

Nej, du udelader bare "-i eth0" - så gælder det for alle interfaces.


Henrik



 
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] *