Machine A has two network interfaces:Network eth0: 10.10.20.0/24Network wlan0: 192.168.1.145/24Machine A has 192.168.1.145 as Default Gateway, and also a route to pass 172.16.0.0/16 to 10.10.20.1.I want allow access from wlan0 192.168.1.145:3389 to 172.16.1.14:3389 using UFW, so I did:/etc/default/ufw:DEFAULT_FORWARD_POLICY=ACCEPT/etc/ufw/sysctl.conf:net/ipv4/ip_forward=1/etc/ufw/before.rules:*nat:PREROUTING ACCEPT [0:0]-A PREROUTING -i wlan0 -p tcp -m tcp -d 192.168.1.145 --dport 3389 -j DNAT --to-destination 172.16.1.14-A PREROUTING -i wlan0 -p udp -m udp -d 192.168.1.145 --dport 3389 -j DNAT --to-destination 172.16.1.14COMMITAdd port 3389 to allow in UFW:ufw allow from any to any port 3389But it's not working!
How to forward Remote-Desktop Port across interfaces using ufw?
debian;networking;port forwarding;remote desktop;ufw
I used the command sudo ufw allow 3389/tcp and then restarted using sudo /etc/init.d/xrdp restart to solve this same issue on a pi. However my /etc/ufw/before.rules file looked like this:# START OPENVPN RULES# NAT table rules*nat:POSTROUTING ACCEPT [0:0]# Allow traffic from OpenVPN client to eth0-A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADECOMMIT# END OPENVPN RULES