Hogyan tudnám engedélyezni a távoli ssh-t? a luci-t sikerült a 443-as porton távolról működésre bírni (átmásoltam egy vargalex buildből a tűzfal szabályokat és feltelepítettem egy cuccot ami a https-hez kellett), az SSH viszont nem akar menni a 2222-es porton
Van egy ilyenem:
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
BRUTEFORCE_PROTECTION_START=3
BRUTEFORCE_DROPPORT=55555
PROTO=tcp
ROUTERIP=$(uci get network.lan.ipaddr)
########################################
#SSH Brute Force protection on port 2222
PROTECTEDPORT=2222
SERVICEPORT=22
SERVICE=SSH
echo Enabling Brute Force protection for $SERVICE on port $PROTECTEDPORT
iptables --table nat -I zone_wan_prerouting -p $PROTO --dport $PROTECTEDPORT -m state --state NEW -m recent --set --name $SERVICE -j DNAT --to-destination $ROUTERIP:$SERVICEPORT
iptables --table nat -I zone_wan_prerouting -p $PROTO --dport $PROTECTEDPORT -m state --state NEW -m recent --update --seconds 60 --hitcount $BRUTEFORCE_PROTECTION_START --name $SERVICE -j DNAT --to-destination $ROUTERIP:$BRUTEFORCE_DROPPORT
iptables --table nat -I zone_wan_prerouting -p $PROTO --dport $PROTECTEDPORT -m state --state NEW -m recent --rcheck --seconds 60 --hitcount $BRUTEFORCE_PROTECTION_START --name $SERVICE -j LOG --log-prefix "BruteForce-${SERVICE} "
########################################
És a tűzfal szabály: [link]
Valamint: [link] itt próbáltam bepipálni az "Allow remote hosts to connect to local SSH forwarded ports" opciót, de nem segített, hogyan tovább?
[ Szerkesztve ]