A
A
Anton2017-04-03 15:49:01
Mikrotik
Anton, 2017-04-03 15:49:01

How to wrap a request from the external interface in a tunnel to the internal Web server?

From the host 192.168.0.8 we make a request to 41.42.42.42:80 which should arrive at the Web server 10.10.0.7:80 through the L2tp tunnel between Mikrotiks. Can you tell me what to write on the micrometers?d633db608cd547c9b06e546b3a330e9e.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2017-04-18
@tosick4

It looks like the web server, when receiving a request, responds to an external client through the default gateway and not through a tunnel. How to make microt 10.255.4.2 web server responses wrap back where they came from, i.e. in the tunnel at the same time that the server would be able to access the Internet not through the tunnel but through 89.99.99.99?
Answer add rule:

/ip firewall mangle
add action=route chain=prerouting dst-address-list=clients in-interface=bridge1 passthrough=yes protocol=tcp route-dst=10.255.4.1 src-address=10.10.0.248

O
Obsession, 2017-04-04
@Obsession

first you need to register a route, so that the first mikrotik finds out that there are some addresses behind the L2TP interface, and the second rule in the firewall is to redirect the request to the final host.
something like this will come out:

ip route add dst-address=10.10.0.7 gateway=10.255.4.2
ip firewall nat add chain=dstnat action=dst-nat protocol=tcp port=80 to-addresses=10.10.0.7 to-ports=80

and may happiness be with you
ZY .
if specific, then in the nat rule, also specify the interface from which everything comes and the address, the calls to which to natate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question