linux-l: Firewall und SSH Forwarding

Duncan Rubinger duncan.rubinger at semanticedge.com
Di Nov 6 11:46:29 CET 2001


Hi,

>>folgendes Problem, ich würde gerne eine Firewall so konfigurieren (mit
>>iptables), dass trotzdem Portforwarding unter SSH möglich ist. Der
>>User soll sich per SSH einloggen mit dem Forwarding
>>
>>-L 8002:192.168.0.29:80

Also, der User soll sich von irgendwo in er Welt auf der firewall
einloggen mit obigem Forwarding mit SSH.

TK> Wenn ssh möglich ist, ist das Portforwarding auch möglich, schließlich
TK> läuft das durch den ssh Tunnel (man ssh).

Will aber nicht, mit den vorher geschriebenen Regeln komme ich nicht
durch, d.h. wenn ich die iptables abschalte, respektive flushe mit
accept als default policy funzt wunderbar.
Der User soll dann bei sich lokal auf port 8002 port 80 des internen
durchgeforwardeten Rechners sehen.

Mit

# SSH/D allowed
echo SSH allowed
    $FW -A INPUT  -j ACCEPT -p tcp -d $MYIP --destination-port ssh 
    $FW -A OUTPUT -j ACCEPT -p tcp -s $MYIP --source-port ssh
    $FW -A OUTPUT -j ACCEPT -p tcp --destination-port ssh

# Portforwarding ?
    $FW -A INPUT -j ACCEPT -p tcp -d 192.168.0.29 -s 0/0 --destination-port http
    $FW -A OUTPUT -j ACCEPT -p tcp -d 192.168.0.29 -s 0/0 --destination-port http

    $FW -A INPUT -j ACCEPT -p udp -d 192.168.0.29 -s 0/0 --destination-port http
    $FW -A OUTPUT -j ACCEPT -p udp -d 192.168.0.29 -s 0/0 --destination-port http

will nicht ...


Best regards, Duncan                          




Mehr Informationen über die Mailingliste linux-l