the default settings you mentioned for the firewall are maintained in a post [1] within this forum
@rextended is indeed doing a good job there.
Does anyone happen to know any guides about using the algorithm of WireGuard with IPsec? Would it be recommended? Would it change its behaviour and require setting up auth codes to each client instead of setting it up once at the router?
It is enough to add/enable the
chacha20poly1305 as
enc-algorithms of the
default row of
/ip/ipsec/proposal on both the L2TP server/IPsec responder side and at the L2TP client/IPsec initiator side. When L2TP is asked to generate the IPsec configuration, it uses a policy template from group
default to dynamically create the necessary
/ip/ipsec/policy item, and that template uses the
default item from
/ip/ipsec/proposal unless you change that.
Be careful - the actual algorithms to be used for Phase 1 (IKE) and Phase 2 (data SAs) are chosen among those that both the initiator and the responder support, so if you permit only
chacha20poly1305 as
enc-algorithms at one device and the other device does not support that encryption algorithm at all, Phase 2 will not establish between them. You have to think about this when you plan to use the L2TP server both to set up a site-to-site tunnel and to allow PCs and phones to connect.
Also, if all the encryption algorithms in a profile provide also the message authentication (in addition to
chacha20poly1305, also
aes-gcm behaves that way), the
auth-algorithm list must be empty (
"") - setting it to
none throws an error.
But bear in mind that it only makes sense to use
chacha20poly1305 for IPsec Phase 2 if one of the devices does not support any of the AES algorithms in hardware, because even though
chacha20poly1305 is optimized for implementation in software with a minimum CPU use, it still uses the CPU quite a lot so its use has an impact on the overall throughput of the device. It just takes less CPU as compared to AES running also in software.
Regarding the initial issue:
The routes on the router seem fine to me, and the firewall is still unusual but shoud not interfere.
What is definitely wrong is that the LAN IP addresses are attached to a member port of bridge1 (ether2) rather than bridge1 itself; it semi-works but it causes surprises. I don't think it is related to your issue but nevertheless fix it to prevent future headaches.
There is also another potential issue - even the best intentions can turn into PITAs. Traditionally (as in "in all the examples and in common communication"), the name LAN is used for lists of IP interfaces that are considered LAN ones. An interface that is member port of a bridge is not an IP interface any more, the IP configuration should be attached to the bridge (as in "the virtual interface of the router to which the virtual switch is connected") instead, so if you use an
interface list to add its member interfaces as member ports of a bridge, that list should bear some other name than LAN - the bridge itself cannot be a member of it (otherwise you get an error for adding a bridge as a member port of itself) but should a rule your IP firewall refer to interface list LAN whilst bridge1 would not be a member of that list, the rule would behave differently from what you'd expect it to. In your simple configuration, I would make
ether2 a member port of the bridge directly, not via an interface list, and keep the name LAN for the usual purpose.
There is one catch - Windows computers by default ignore ping requests that come from outside their connected subnets. So when you say that you cannot ping via the tunnel, what kind of device is the target of the ping?
To see what is going on, the best approach is to use
/tool/sniffer. Let's say you are going to ping a device with address 192.168.0.222 on the L2TP client site from a device with address 192.168.15.111 on the L2TP server site. Before starting the ping, run
/interface/bridge/port/set [find] hw=no on both devices to avoid some packets from not being shown during sniffing, open a command line (terminal) window on each router, make it as wide as your screen allows, and in those wide windows, run
/tool/sniffer/quick ip-address=192.168.0.222 ip-protocol=icmp on the server site and
/tool/sniffer/quick ip-address=192.168.15.111 ip-protocol=icmp on the client site. Then start pinging .0.222 from .15.111. If everything is configured correctly, you should see the ping request to get in via
ether2 and
bridge1 and leave through
<l2tp-X> on the server, arrive through
"VPN tunnel site to site" to the client site, and leave through
bridge1 and
ether2 to the connected device in LAN. The response of the .0.222, if any, should take the same path in reverse order. The root cause of the issue is located where the actual results of the sniffing differ from the expected ones.
One more remark that again has nothing to do with the issue itself - the
use-encryption item on the
/ppp/profile row has nothing to do with IPsec. It enables or disables the use fo MPPE encryption on PPP level which only increases CPU load, not the level of security, if the PPP transport packets are encrypted (using IPsec in your case or using TLS for the SSTP tunnels).