Fürs Archiv:

$IPTABLES -t mangle -A PREROUTING -p tcp -m tcp –dport 2222 -j MARK –set-mark 0x8ae
$IPTABLES -t nat -A PREROUTING -d 1.2.3.4 -p tcp -m tcp –dport 2222 -j DNAT –to-destination 1.2.3.4:22
$IPTABLES -A INPUT -d 1.2.3.4-p tcp -m tcp –dport 22 -m mark –mark 0x8ae -j ACCEPT
$IPTABLES -A INPUT -d 1.2.3.4 -p tcp -m tcp –dport 22 -j DROP
$IPTABLES -A INPUT -d 1.2.3.4 -p tcp -m tcp –dport 2222 -j ACCEPT

Was denkst du?