Need iptables script to route shared interface through redsocks proxy

Job ID: 32444732

Budget: $10 – $50 USD

I have a linux system running with the following setup.

Server:
- Lan Interface
-Wan Interface
-Socks5 Proxy server

Network works something like this:

Clients <-> Server <-> Internet

Right now I have no problem with this setup but I can not figure out how to pass all the clients data through the redsocks proxy server which I would like to do.

I am looking for a bash script to accomplish this with iptables or something else agreed upon.

I can share my current script if you would like.

Thanks