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 forwardning so I'm very confused why those ports wont work. I started using iptables yesterday so it might be something very obvious however I don't know how to google this.
My setup:
- Code: Select all
$ 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? and how do I solve so I use the DROP policy and still forward the 11111 traffic to 3389 at my local RDP server?