DEV Community

Yuniel
Yuniel

Posted on • Updated on

How do I redirect a service outgoing traffic to another local SOCKS5 service running on port 1080?

Hello,

I need to redirect a service outgoing traffic to another local socks5 service running on port 1080

OS: Ubuntu 20.04

This is what I currently have.

  • SSC -> shadowsocks client service (running in docker containers)
  • SSS -> shadowsocks server service (running in docker containers)
  • Surrounded number in dot lines -> service port

See this picture

And this is what I really want.
See this picture

This is where I need a solution.
The solution could be with iptables
See this picture

I tried these solutions adjusted to my case but they did not work for me:

How to send all internet traffic to a SOCKS5 proxy server in local network?

How to force all Linux apps to use SOCKS proxy

Top comments (0)