I recently got a client-VPN at one of my Debian servers in my home network. I want to use it as another gateway in my network for certain devices. This is something I have succeeded with so that is all fine, just want to give you the backstory.
Now, I have an RDP server (WS 2019) that I'm able to connect to through WAN on my VPN as long as I don't use iptables -P INPUT DROP. However, I'm using port forwarding, so I'm very confused why those ports won't work. I started using iptables yesterday, so it might be something very obvious however I don't know how to google this.
My setup:
$ iptables -L -n
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- 192.168.0.0/24 0.0.0.0/0 tcp dpt:22
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:11111
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
$ iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:11111 to:192.168.0.50:3389 <-(RDP server)
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT all -- 192.168.0.0/24 0.0.0.0/0 to:[my public VPN IP]
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
To be clear, the only thing I have to do to make everything work again is set policy for INPUT to ACCEPT, but I don't want to do that since it's a router to WAN.
So, do the policy for INPUT also define the traffic for forward chain? How do I solve this so I use the DROP policy and still forward the 11111 traffic to 3389 at my local RDP server?