A
A
Alexander Chernykh2018-09-05 14:05:02
linux
Alexander Chernykh, 2018-09-05 14:05:02

How to send traffic to a specific address through a different interface?

There is eth0 with an external address 91.х.х.10 through which all traffic goes.
Created an eth0:0 interface with an external address 91.х.х.5
What settings should be made in order to exchange traffic with 195.х.х.10 only through eth0:0 ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Chernykh, 2018-09-06
@sashkets

Thanks Pavel for the tip, but the issue was resolved by adding the rule
iptables -t nat -I POSTROUTING -d 195.xx10 -j SNAT --to 91.xx5

R
Radjah, 2018-09-05
@Radjah

Register a route to the necessary address through the necessary interface.
ip routeto help. Man .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question