erg_samowzbudnik wrote:Yes, that is the correct address.
That is disappointing. That was my only lead for what would be wrong with it, so I am happy to see your follow-up post that you found a solution of sorts.
erg_samowzbudnik wrote:Apart from cruft (should I consider those open UDP ports a vulnerability?)
Technically, maybe a small denial-of-service risk, since you will be dropping those on your OpenWrt if they make it that far. Dropping them on the ISP router would save the bandwidth/CPU cost of sending them to you. Realistically, the link between ISP and OpenWrt is probably not your bottleneck, so dropping unwanted traffic at the ISP layer won't help you much, if at all, if you come under a flood of unsolicited UDP traffic.
erg_samowzbudnik wrote:But the problem is, this rule looks exactly like the one for ports 80 or 443 and packets are arriving on those ports. So my thinking goes, there's some superseding setting somewhere in the guts of that router/antenna we're not seeing that is keeping port 22 as filtered. Or is it possible that, even though the rule is there and syntax is ok, that port is being used for something else by the antenna itself and that is why forwarding rule doesn't do it's job?
All those are reasonable possibilities that I cannot rule out from the information available. I am curious to know what IP/port pair your ISP's technician uses to access the device, since that could fit into your theory that the port is busy elsewhere. Hypothetically, the device could have a rule that directs traffic from the ISP's Windows system to the local sshd process, and drops other traffic. I would have expected to see that in the rules you posted though.
erg_samowzbudnik wrote:And yes, I do intend to run a http(s) server so those are needed.
If that's intended, then that is fine.
erg_samowzbudnik wrote:Forwarded traffic from port 333 on the router to port 22 on Pi and - blam! - it works.
Nicely done.
erg_samowzbudnik wrote:For some curious reason adding rules via /etc/firewall.user on OpenWrt didn't do it but adding it through routers web interface did.
The file may not be watched for modification, so you might need to restart the firewall script, or even the entire system, to make those changes live. If you are unlucky, that file might also be where OpenWrt saves the rules it has loaded, in which case an orderly shutdown might overwrite your changes.
erg_samowzbudnik wrote:Should I mark it as solved? I mean, it is a workaround, that bloody port 22 on the antenna still doesn't do what it's supposed to do but the workaround works.
Up to you. Without the ability to do more analysis directly on the antenna, I don't have any suggestions for how to pursue this further. We know:
- The device can forward TCP traffic on port 333.
- The device claims it forwards TCP traffic on port 22.
- TCP/22 traffic does not work end-to-end.
We think we know:
- If TCP/22 made it from the antenna to OpenWrt, then OpenWrt would do the right thing.
You could use a packet capture done on the OpenWrt to confirm that TCP/22 from the Internet, addressed to the antenna's public address, does not result in any observable traffic on the WAN side of the OpenWrt. If no traffic is observed, then we would need to start collecting packet captures on the antenna, both upstream and downstream interfaces - which as you stated above, you don't have permission to do. Whether your ISP would cooperate on that (there is no security reason not to, but they may not want to bother), and whether you want to spend the time trying to get them to do it, is not something I can answer. Alternatively, if the packet capture on the OpenWrt shows that the antenna is forwarding you port 22 traffic, then we need to revisit the OpenWrt to find why the traffic got lost. If you want to pursue this further, I'm happy to continue providing what advice I can.
As a funny aside, being forced to use an unusual port may have some minor security benefit to you. Botnets routinely scan for an open port 22 and attack it. Some botnets scan for ssh on other ports, but the attack volume seems to be lower. For this purpose, the public IP/port pair is what counts, so the bots would need to attack antenna/333, even though internally you have the port mapped back to 22 on the Pi.