Answer the question
In order to leave comments, you need to log in
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?
Answer the question
In order to leave comments, you need to log in
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question