Hello, I’m impressed and very excited about the container release in RouterOS 7.5. For a long time I dream transfer my openvpn clients to the wifi-router. Enjoy simple guide if you want
Hi service. home. internal. net is just an example of an intranet resource. If it ceases to be available, then the openvpn connection is re-created. When configuring, you must specify your resource
However I recommend you to use wireguard which is natively supported
If the remote server I’m connecting to had used Wireguard, I would surely use it. But it is about MT connecting as a client to a remote OpenVPN server, and I do not have any alternative methods available.
Replace config.ovpn and config.pass with your own files. Or configure client like you want
Replace service. home. internal .net in entry.sh for some host in your home network (for connectivity check). This used for restart connection if it’s down.
Hello, my friend. Thank you so much for the tutorial you provided; I really appreciate it. I have a few questions I hope you can help me with. I was able to run the container successfully, but it seems that my service provider does not support TAP mode, so I have to use TUN mode instead. While the connection is established in TUN mode, there is no network connectivity outside the container.
My question is: is it possible to set the dst field to 0.0.0.0/0 in the routing settings you mentioned, so that we can use mangle to specify that all devices should use this gateway?
Hello, if I check the container settings on regular linux (mint 22), everything is fine, the route is created, everything works.
When the same container is sent to microtik, I get an error from iptables
/sbin/iptables -A FORWARD -i tap0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
. that failed to apply filters module.
I am using hap ac^2, RouterOS version 7.15stable.
Different versions of alpine linux did not help to fix the situation.
P.S. now it is not tap0 but tun0.
I'm not sure if this is still relevant, but for my needs I created a small OpenVPN client container:
Features
Multi‑architecture – Supports linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6 – works on MikroTik ARM, ARM64, and x86 devices. Tested on hap be3 media, hap ac2, CHR.
Automatic updates – Weekly GitHub Actions workflow checks for new Alpine and OpenVPN releases.
Flexible authentication – Use environment variables (OVPN_USER/OVPN_PASS) or an auth.txt file (path configurable via OVPN_AUTH_FILE).
DNS control – Set custom DNS servers via OVPN_DNS_SERVERS (space, comma, or semicolon separated). The container overwrites /etc/resolv.conf and DNATs DNS requests to the first DNS server.
Healthcheck watchdog – Pings a host through tun0 and reboots the container on consecutive failures.