OpenWrt Port forward SRC Address?

Hello,
I have a question. Can I enter an external IP address to access the internal network.
For example: IP address 95.46.46.3 on port 3389 to access internal computer 192.168.0.251 on port 3389?
My idea is that only this external IP address can access via port 3389.
Tomato has this option. I don't see how I can do it here.
If possible, a little help.
Best regards,

config redirect
	option target 'DNAT'
	option src 'wan'
	option proto 'tcp'
	option src_ip '95.46.46.3' #<---this is src_address
	option src_dport '3389' #<---ext_port
	option dest_ip '192.168.0.251' #<---int_adddress
	option dest_port '3389' #<---int_port
	option name 'RDP_to_LAN' #<---same as "description" in your screenshot

I drafted the rule assuming you meant only the DST port was 3389 and not the SRC port used by the SRC IP:

  • e.g. 95.46.46.3:xxxxx -> <WAN_IP>:3389
  • not 95.46.46.3:3389 -> <WAN_IP>:3389 - this likely won't work unless other port manipulation takes place at the SRC
3 Likes

Thanks, I'll test it.

1 Like