ngoduykhanh / wireguard-ui

Wireguard web interface
MIT License
4.26k stars 524 forks source link

Mikrotik as a client #620

Closed netandreus closed 2 months ago

netandreus commented 2 months ago

Maybe somebody knows, how can I configure Mikrotik as a client for this WireGuard server installation?

dossec commented 2 months ago

Configure in ROS and fill in the configuration generated by the webui

cristina-defran commented 2 months ago

If you have RouterOS >= 7.12, you can upload the .conf file to the Mikrotik and configure the Wireguard interface and peers using this command:

/interface/wireguard/wg-import file=<uploaded-file-name>

Before uploading the .conf file downloaded from the Wireguard UI, the Address, DNS and MTU lines must be removed. Otherwise, Mikrotik will not be able to parse the file correctly. Also, make sure the file's format is Unix (LF). I've add some problems when the file is Windows-formatted and the Mikrotik not creating the peer.

If you have RouterOS < 7.12, you would need to configure the interface and peer manually, as described in the Wireguard section of the Mikrotik documentation.

netandreus commented 2 months ago

Hi @cristina-defran ! I can't understand, why Mikrotik can't parse my conf file. Thank you for this information!

netandreus commented 2 months ago

Also you need to add peer IP address to Mikroitk wg0 interface (in IP -> Addresses).