I have OpenWRT 19.07.3 and just want to temporary use remote SSH access to the router. I've added firewall traffic rule to allow it. But I cannot connect and only receive connection refused. I can login via LAN.
This is the uci show firewall
I've added a rule to allow connection to Luci on port 80 just to try if it works. I cannot connect to web interface either. If I stop the firewall I can connect to router via SSH remotely.
Can you help me.
Since SSH uses TCP it means the source port will be ephemeral. For this reason you usually shouldn't specify "src_port" in TCP rules.
And if you want to configure an input rule, i.e. it allows traffic to the device itself, then you don't specify "dest" either.
If I want to use different port 5555 for example (not 22) then should I put it (5555) in source port field.
I've added the rule trough Luci interface and destination was set by default as 'lan'. I didn't choose it.
Actually I've tried to set it to Device Input but that didn't work either.
Obviously I was doing anything wrong because now I have this and it works.