V
V
Vyacheslav Kravtsov2022-03-25 13:36:24
linux
Vyacheslav Kravtsov, 2022-03-25 13:36:24

How to direct a certain application through a certain ip using iptables?

Input:
Ubuntu
Network interface facing the Internet, configured to several ip addresses issued by the provider, configured via natplan addresses: [xx.xxx.xx.2/24, xx.xxx.xx.3/24, xx.xxx.xx. 4/24, xx.xxx.xx.5/24] (for example).
There is a proxy, for example redsocks, which wraps all TCP connections to a proxy. The problem is that the provider's proxy accepts a small number of simultaneous connections from one ip address, and the proxy does not have the ability to specify which route to drive traffic, and the proxy server has one IP, so the routing table cannot be configured either.
It is possible to run several proxifiers, but is it possible through iptables to send a specific application to the network through a specific ip address?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexVWill, 2022-03-25
@NarkoHeal

this cannot be done through iptables, because it is not intended for that, but through ip netns it is possible, if I correctly caught the essence of the task,
look at this article, maybe it will lead you to the right thoughts? https://habr.com/ru/post/310646/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question