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

yunielrc

Yuniel

Posted on January 29, 2021

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

Hello,

I want 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

💖 💪 🙅 🚩
yunielrc
Yuniel

Posted on January 29, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024