R
R
renniqs2017-08-23 11:33:36
Domain Name System
renniqs, 2017-08-23 11:33:36

ubuntu routing?

Is it possible to configure routing to an external IP address in ubuntu. You need to set up the following rule:
9c8e979c193342b79086216cda627e42.jpg
Is this possible in ubuntu? Or maybe there are some other solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
cssman, 2017-08-23
@cssman

In general, there is a static marushtization for this.
If the problem is to use ip dst and you need to make a choice exactly by ip src - as an option, you can make src nat for the ip you need. This is from simple solutions.
More complex - Load balancer.

V
Viktor Belsky, 2017-08-23
@Belyj

As I understand it, your Ubuntu is a gateway to the Internet with two channels and you want to send certain hosts from your network through the first channel, and the rest through the second?

# ip route add default via 28.54.68.54 table 501
# ip route add default via 94.51.58.42 table 502
# ip rule add from 192.168.1.101 table 501
# ip rule add from 192.168.1.202 table 502

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question