I have a very basic understanding of iptables from reading about 30 different similar questions people have asked and some tutorials. What I am trying to do is forward all of my outgoing traffic through SSH, to have it function as a sort of universal socks proxy. I don't have a way to test this right now, but this is what I've come up with on my own:
iptables -A OUTPUT -i eth0 -p tcp --destination-port 22 -j ACCEPT iptables -A OUTPUT -i eth0 -p tcp -j REDIRECT --to-port 22
The first rule should automatically accept anything already destined for port 22, while the second rule should redirect any remaining outgoing packets to port 22.
My main issue is that I don't have a complete understanding on the differences between PREROUTING and OUTPUT, because I've seen them both be used in different ways to forward ports like this.