D
D
duffre2021-04-05 22:06:43
linux
duffre, 2021-04-05 22:06:43

L2tp client as a gateway?

Guys, help out pliz advice. There is an l2tp server on Mikrotik, an instance on aws is connected to it by the l2tp client. Is it possible to implement a route to the Internet for a machine from the local network of Mikrotik, so that the aws instance acts as a gateway?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2021-04-05
@duffre

Mark traffic from this machine and, based on the marking, wrap it in an L2TP tunnel.

/ip firewall mangle add action=mark-routing chain=prerouting comment="To AWS" src-address=<Mashine IP> new-routing-mark=aws_route passthrough=no

/ip route add comment="To AWS" distance=5 gateway=<L2TP_AWS_IP> routing-mark=aws_route
I'm writing from memory - the syntax may not be correct...
On the AWS instance, you need to enable IP packet forwarding and configure src-nat.

D
duffre, 2021-04-06
@duffre

ATP is great, it worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question