Forwarding tcp traffic with iptables and ufw
I've recently had two situations where I needed to forward all traffic on certain ports from one server to another. In one case I did this using only iptables, and in another using iptables commands in the context of ufw. So I'm going to archive my learning here for future reference.