Re: Port-Redirection mit natd

From: Gordon Bergling <gordon(at)bsd-network.org>
Date: Tue, 14 Jan 2003 14:41:05 +0100

Hallo Oscar!

On Tue Jan 14, 2003 at 01:10PM +0100, Oskar Eyb wrote:
> ich habe auf Port 8080 einen Webserver mit non-root-Rechten laufen und
> würde den gerne über Port 80 erreichbar machen. Nach googlen /
> List-Archiv suchen und manpage lesen (twa nicht gründlich genug?!)
> müsste das wie folgt funktionieren:
>
> natd -n xl0 -redirect_port tcp 10.0.1.3:80 10.0.1.3:8080
>
> # lsof -i -n|grep natd
> natd 73561 root 3u IPv4 0xc5e69e00 0t0 DIVERT *:8668
> natd 73561 root 5u IPv4 0xc5e9be00 0t0 ICMP *:*
>
> Natürlich gehts so nicht. Nur warum?

Du musst noch per ipfw folgende Regel hinzufügen:

% ifpw add divert 8668 ip from any to any via xl0

Dann sollte es funktionieren.

Mich wundert nur warum Du innerhalb einer Maschine den Port 8080 -> 80
umleitest. Du kannst doch den Webserver doch gleich auf Port 80 legen.
Oder hat es einen Vorteil den ich bis jetzt noch nicht verstanden habe?

Gruss,

Gordon

-- 
"This room is air conditioned and the SUN is shining
 for the NEXT days. So don't open WINDOWS"
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 14 Jan 2003 - 14:41:20 CET

search this site