[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:

>On Mon, 05 Dec 2005 06:26:19 +0000, Henrik Storner wrote:

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

>Ja, sådan troede jeg også, man kunne gøre, på baggrund af manualen.
>Men i praksis kunne jeg ikke få det til at spille og måtte benytte
>førnævnte, mere udpenslede metode.

>Har du en REDIRECT-løsning som ovenfor kørende i praksis et sted?

Jeg har ikke haft brug for det, men som forsøg har jeg da lige prøvet 
med at gøre min SMTP server tilgængelig på port 8125. Jeg tilføjede 
to regler til min firewall opsætning - den ene for at lukke op for 
indgående forbindelser til port 8125, den anden for at viderestille dem
til port 25, hvor mail serveren kører:

iptables -A INPUT -m state --protocol tcp --destination-port 8125 --state NEW -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 8125 -j REDIRECT --to-ports 25

Virker OK, du kan jo prøve det på www.storner.dk port 8125.


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