I have set up an openvpn server on my LAN and opened port 1194 in firewall for a selected sources of IP ranges, and redirected that port to the openvpn server with dst-nat. But I am seeing attempts in dst-nat logs to connect to the server from IP-s not allowed in the firewall Address List. The question is why do these connections reach dst-nat (forward) if I am filtering them in firewall (input) ?
THe only rule required in the forward chain is to allow port forwarding in general. add chain=forward action=accept comment=“allow port forwarding” connection-nat-stat=dstnat
Then in your dst-nat rules
(dynamic wanip) add chain=dstnat action=masquerade protocol=??? dst-port=xxxxx in-interface-list=WAN
to-address=serverIP src-address=authorized_users
In general, if one is connecting TO THE ROUTER, as in a VPN service offered by the router say something like wireguard, the remote user has to initiate a connection to the router and this is accomplished via the INPUT CHAIN!! (WAN to Router)
If you are connecting to a SERVER behind the router ( nothing to do with a router service ) that is WAN to LAN and is handled
a. firewall forward chain to allow dstnat traffic.
b. dst chain to stipulate what ports the traffic is coming in on and where on the LAN (usually) the incoming traffic should be directed.