Servers
In WinBox you can configure OpenVPN servers in Interfaces -> OpenVPN Server, there you can click to + to create new server or you can use terminal with command /interface ovpn-server server
Basic server configuration
Creating server interface
Click on + to add new OpenVPN server
You will need to fill out:
Name - Your server interface name (e.g. "ovpn-server1")
Port - OpenVPN port (default is 1194, consider using custom port like 35324 for security)
Protocol - Choose "tcp" or "udp" (udp is recommended for better performance)
Certificate - Select your server certificate created earlier
Require Client Certificate - Enable this for certificate-based authentication
Auth - Authentication method (sha256, sha512 recommended)
Cipher - Encryption cipher (aes256 recommended)
TLS Version - Set to "only-1.2" or higher for security
User Auth Method - Authentication method for users (mschap2, eap-mschap2)
Default Profile - Select your custom VPN profile
Netmask - Network prefix length (usually 20 or 24)
Advanced server settings
For enhanced security and performance, you can configure additional parameters:
Max MTU - Maximum transmission unit (usually 1500)
Keepalive Timeout - Connection keepalive in seconds
Push Routes - Routes to push to clients (leave empty for default)
Redirect Gateway - Force all client traffic through VPN
MAC Address - Custom MAC address for the interface
Firewall configuration
Allow OpenVPN through firewall
You need to create firewall rules to allow OpenVPN traffic.
In WinBox go to IP -> Firewall -> Filter Rules and add new rule:
Chain - input
Protocol - udp (or tcp if using TCP)
Dst. Port - 1194 (or your custom port)
Action - accept
NAT configuration (if needed)
If your RouterOS is behind NAT, you need to forward the OpenVPN port:
Multiple server instances
You can create multiple OpenVPN server instances for different purposes:
Server for different user groups
Create additional server instances with different profiles:
Different protocols
You can run both TCP and UDP servers simultaneously:
Troubleshooting
Common issues
Server not starting:
Check if certificate is properly signed and trusted
Verify firewall rules allow the configured port
Ensure profile is correctly configured with IP pools
Clients cannot connect:
Verify client certificates are signed by the same CA
Check if server is listening on correct interface
Test connectivity to the OpenVPN port from external network
Performance issues:
Use UDP protocol instead of TCP when possible
Adjust MTU size if experiencing packet fragmentation
Consider using hardware with AES acceleration
Monitoring connections
Check active OpenVPN connections:
Last updated
Was this helpful?