S
S
Seva2012-08-26 19:23:46
linux
Seva, 2012-08-26 19:23:46

One server, two providers

Gentlemen, good afternoon.

The situation is this - I connected to an ethernet provider that does not issue white addresses to users, solid NAT.
Also available is an ADSL provider with a static address. A Debian 5.0 server that distributes torrents, DCs and other things.

Task: to make it so that I can reach the server via SSH and enter the web face of the rocking chair using an ADSL provider, but so that all other traffic goes through the ethernet.

Prompt literature.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
amario, 2012-08-26
@amario

If you go to the server from a fixed white address to, it will be enough to register a route on debian

ip route add -host 200.10.0.1 via 100.10.1.254 dev eth1

where
200.10.0.1 is the address from where you will get to the server
100.10.1.254 - the provider's default gateway via an adsl modem.
eth1 is the interface where the xDSL modem is plugged in. The modem
must be in bridge mode, otherwise... make the modem a bridge. This will unload it!
If you have a dynamic address? from where you will go, then PBR will help you,
the default gateway on the system in both cases must be from the provider that is served via ethernet

M
Melkij, 2012-08-26
@melkij

habrahabr.ru/post/138705/
habrahabr.ru/post/100919/
?

A
alz, 2012-08-27
@alz

In /etc/iproute2/rt_tables create a table, for example ppp
Add a default route to it: ip route add default via 1.2.3.4 dev ppp0 table ppp
And finally a rule: ip rule add from 1.2.3.4 table ppp

A
admin4eg, 2012-08-27
@admin4eg

Here is my note www.odmin4eg.ru/tag/2-provajdera/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question