Ports on red don't work

Hello, I’m trying to install rustdesk on my linux server. When I open the required port on source red-it doesn’t work, when I do source-any-it works. Why?

red is only from the WAN.

so if you trying to connect from your internet (green/blue) you will need to use Source any.

I want to access it from the outside - how else can I access it if not through wan. That’s why I specify source red. I think that if I do it through any, it will affect security. So in which case should I use red and which any? Thanks.

Source Red means that the IP the packet is coming from is the Red IP which is wrong. It is coming from anywhere in the Red zone and, for this, you should use Source ANY if you want it to be open to anywhere, or Source Some_Internet_IP if you want to open it to one explicit internet IP.

No it means that the traffic is coming from the red zone.

If the destination is an IP on Green then a source of Any means that traffic from systems on Red (Internet) or Blue or Orange can access the system on Green.

I have a rule for http (80) with the source as Red and that allows Lets Encrypt to access my certs for renewal.

So Red as a source should allow access from all systems on the internet to access the rustdesk server.

Do you have the Port Forward traffic showing in your firewall logs for when you try and access the system?

You should see something like

10:32:44  FORWARDFW  IN=red0 OUT=green0 MAC=xx:xx SRC=Public-IP-you-are-accessing-from DST=IP-of-rustdesk-server LEN=44 TOS=0x00 PREC=0x00 TTL=247 ID=40060 PROTO=TCP SPT=44773 DPT=80 WINDOW=1024 RES=0x00 SYN URGP=0 
10:32:44  DNAT  IN=red0 OUT= MAC=xx:xx SRC=Public-IP-you-are-accessing-from DST=Your-Public-IP LEN=40 TOS=0x00 PREC=0x00 TTL=248 ID=40060 PROTO=TCP SPT=44773 DPT=80 WINDOW=1024 RES=0x00 SYN URGP=0 

The DNAT is the first line where the FW is recognising that this matches the port forward rule and therefore allows the traffic to the FORWARDFW chain and allows the traffic to be forwarded from the Public IP you are accessing from on the internet to the rustdesk server.

If you can find in your logs these DNAT/FORWARDFW pairs of log entries for the correct IP’s then it means that the traffic is being forwarded to your Rustdesk server.

In that case I would look at the logs of your Rustdesk server to see what it is doing with the traffic. Is it accepting it or rejecting it or is it totally ignoring it.

If you cannot find the DNAT/FORWARDFW pairs of log entries then we need to see the Firewall Rule details for the rule you have set up.