D
D
Dmitry Bannik2016-04-15 06:49:09
linux
Dmitry Bannik, 2016-04-15 06:49:09

How to forward ip addresses?

How to forward an ip address to another machine
The scheme is as follows: 2 servers in different Data Centers are connected by a gre tunnel to the
server ( DC1 server # 1 ) given addresses 8.8.8.8 and 8.8.4.4 It is
necessary to raise the interface with the address 8.8.4.4 on the machine ( DC2 server # 2 )
71e376ada2cd4e27b4d9229c9aba0fe6.png
I suspect that you need to drop in the direction of ebtables and forward the mac address (NAT)

ebtables -t nat -A POSTROUTING -s $MAC_SERVER2 -j snat --to-source $MAC_SERVER1
ebtables -t nat -A PREROUTING -d $MAC_SERVER1 -j dnat --to-destination $MAC_SERVER2

but there is no success in this direction.
Tell me how to cope with such a task?
thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
res2001, 2016-04-15
@res2001

Lived up. Google consults on toaster :)

A
Andrey Mikhalev, 2016-04-15
@Endru9

I think that it is worth forwarding all traffic in general bypassing 1 server, so as not to write a bunch of rules for Iptables.
try to use VLAN. so you get rid of mixing packages inside GRE.

V
Vladimir, 2016-04-15
@rostel

something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question