Benutzerinformationen überspringen
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Benutzerinformationen überspringen
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Benutzerinformationen überspringen
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Die Regel könnte z.B. so aussehen:
iptables -t nat --dport 33422 -p tcp -i eth0 -j DNAT --to-destination 192.168.1.5:22
Ich bin jetzt davon ausgegangen, dass die Anfragen von außen am Host auf eth0 ankommen, ansonsten muss das Device geändert werden. Diese Regel schickt die Anfragen am Host auf Port 33422 an die IP 192.168.1.5 auf Port 22.
![]() |
Quellcode |
1 2 |
iptables -t nat --dport 33422 -p tcp -i eth0 -j DNAT --to-destination 192.168.1.5:22 iptables v1.4.4 unknown option --dport' |
Benutzerinformationen überspringen
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
ja, die regel ist nicht vollständig.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 33422 -j DNAT --to-destination 192.168.1.5:22
du solltest in den firewallregeln auf jeden fall die DROPs loggen.
![]() |
Quellcode |
1 |
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 33422 -j LOG --log-level 7 --log-prefix "Dropped by firewall: " DNAT --to-destination 192.168.1.5:22 |