i have a modem that connect to my mikrotik wireless and it connect to my firewall .
i have a vpn server in my firewall .
i want to connect my internal network by vpn from out .
i bridge my modem to mikrotik .
but how can i pass through my vpn port and protocol from mikrotik ?
in below picture my vpn connection can not pass mikrotik firewall .
Adjust firewall settings
Do not forget to allow UDP 500 (Dst.Port), UDP 1701, UDP 4500 (Nat-Traversal) and Protocol 50 (ESP) in the firewall filter settings. (Input chain, accept).
also i add ipsec peer and it changed to this :
how you look tje row 3 that is 500 nat-traversal is working .
what can i do that 2 other port and protocol works correct?
With port 500 and 4500 it should work. In the case of NAT-T, ESP is not used on the
network but is encapsulated in UDP port 4500. L2TP is again encapsulated inside ESP
so it does not appear on the network either.
That probably means your IPsec router is not correctly configured and never passes Phase1.
And again, there is no port 1701 traffic to match and probably no ESP either, depending on your config.
The documentation you used probably was for another scenario.
Also, you probably need to draw a picture that shows what your exact setup is and what you want to connect to what.
A picture that shows how the components are interconnected and what communicates with what.
For example, where is your firewall in that picture and which side of the MikroTik is connected to it.
this is my scenario .
clients in external via internet wants to connect to server network . the modem is bridge in mikrotik A .
Mikrotik A is connected to Mikrotik B by wireless Antenna .
Mikrotik B is behind Firewall server .
there is vpn server in firewall server .
Ah ok that is much clearer!
May I ask why you don’t operate the two MikroTik AP’s in bridge mode?
And when you use routing mode, why do you use NAT?
There should be no reason to use NAT inside your internal network (the two MikroTik routers and the firewall).
I give up. You keep coming with new information that is crucial to your network design.
I would have to re-think the entire design every time, I leave that to you.
l2tp uses random free UDP port at both sides
see RFC 2662, section 8.1:
L2TP uses the registered UDP port 1701 [RFC1700]. The entire L2TP
packet, including payload and L2TP header, is sent within a UDP
datagram. The initiator of an L2TP tunnel picks an available source
UDP port (which may or may not be 1701), and sends to the desired
destination address at port 1701. The recipient picks a free port on
its own system (which may or may not be 1701), and sends its reply to
the initiator’s UDP port and address, setting its own source port to
the free port it found.