I'm currently trying to set up IPsec tunnels from 2 remote sites that are using a FritzBox, to a MikroTik RB3011. The goal is to allow machines connected to those access to a server on the MikroTik side.
I have the IPsec tunnels connected and I can see the packets arrive from a machine on the remote site. With Torch as well as the firewall rule 'action=log chain=forward ipsec-policy=in,ipsec log=yes log-prefix=IPSEC'. I do not see any arrive at the target server though.
I don't see any log entries appear for the rule 'action=log chain=forward ipsec-policy=out,ipsec log=yes log-prefix=IPSEC' either. This rule also doesn't trigger if I ping from the server to the remote.
Now what I think is relevant here is that on the RB3011 side, all connected machines are in a VLAN with an isolated subnet. There is no '0' VLAN or untagged VLAN active.
This means that the packet coming from the remote system basically has the following route to take:
Remote PC <-----> Remote Router (IPsec tunnel) <-----> RB3011 (IPsec tunnel) <-----> VLAN <-----> Server
I've tried with the FritzBox set up as s2s (where the FritzBox remote network value == server VLAN's subnet) and as a rw (mode-config with IPsec dedicated pool). The behaviour did not change.
How it looks to me is that the line 'RB3011 (IPsec tunnel) <-----> VLAN' is the problem point in the connection from/to the remote and the server.
I have no background in networking though so this is where I've reached the limits of my IPsec and/or MikroTik understanding so here we are.
Does anyone here have experience with such a config or know how to set this up?
I've also tried to take the following actions in an attempt to fix this:
- Add/Remove notrack prerouting raw rule for the remote IPsec addresses (both a src and/or dst one)
- Add/Remove NAT accept rule for the remote IPsec addresses (both a src and/or dst one)
- Add/Remove firewall allow rules for the remote IPsec addresses (both a src and/or dst one)
- Disable fasttrack rules
- Pretty much all combinations of the above.
As an extra FYI; an IPsec+L2TP setup works perfectly fine (I use this for another rw setup) but from what I can tell that is solely because the L2TP connections are using routing instead of policy matching.
Using L2TP (or any other tunneling over IPsec) is not an option for the FritzBox connections though as these router only support IPsec in either s2s or as rw (client mode)...