Community discussions

MikroTik App
 
Txipiron
just joined
Topic Author
Posts: 2
Joined: Mon May 09, 2022 8:21 pm

wireguard as VPN client

Mon May 09, 2022 8:29 pm

Hi,
I´m a new user with MKT and i´m starting with hAP Lite. Now it's working properly but i've got a problem setting up it as wireguard VPN client. I've got a wireguard server working correctly on a Debian 10 server. The clients can connect and works perfectly. Now, i'm trying to configure the Mikrotik as VPN client but i cann't find where i must to put the conf file to upload to Mikrotik. Also i've tried to add it manually on the Mikrotik but it asks for an interface. wht i'm doing wrong?

Mikrotik's OS version is 7.2.3

Regards from Spain.
 
User avatar
own3r1138
Long time Member
Long time Member
Posts: 680
Joined: Sun Feb 14, 2021 12:33 am
Location: Pleiades
Contact:

Re: wireguard as VPN client

Mon May 09, 2022 9:13 pm

 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18959
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: wireguard as VPN client

Mon May 09, 2022 9:36 pm

Hola txpiron!

Can you draw a network diagram, it is unclear the relationship of the debian server to the MT device.

Do you wish the clients on the MT device to be able to reach devices connected to the debian server?

Do you wish the clients on the MT device to be able to use the internet via the debian server.

IN terms of Wireguard settings.
The information you need from the debian server to put in Mikrotik settings.
a. public IP = endpoint IP (to put on peer settings)
b. listening port on the debian server (to put on peer settings)
c. public key from the debian server ( to put on peer settings)

The Debian Server device will need
a. public key generated by the MT wireguard settings
b. The IP address of the MT wireguard interface

What is the allowed IP or allowed IPs you have put on Debian Server Peer settings?
 
Txipiron
just joined
Topic Author
Posts: 2
Joined: Mon May 09, 2022 8:21 pm

Re: wireguard as VPN client

Tue May 10, 2022 9:37 am

Hola txpiron!

Can you draw a network diagram, it is unclear the relationship of the debian server to the MT device.

Do you wish the clients on the MT device to be able to reach devices connected to the debian server?

Do you wish the clients on the MT device to be able to use the internet via the debian server.

IN terms of Wireguard settings.
The information you need from the debian server to put in Mikrotik settings.
a. public IP = endpoint IP (to put on peer settings)
b. listening port on the debian server (to put on peer settings)
c. public key from the debian server ( to put on peer settings)

The Debian Server device will need
a. public key generated by the MT wireguard settings
b. The IP address of the MT wireguard interface

What is the allowed IP or allowed IPs you have put on Debian Server Peer settings?
Hello again,
The Debian server runs the wireguard server role. It's working fine because i can connect with it using mi laptop or mi mobile phone. I want that the role of wireguard client in order to establish a PTP connection. Y fill the Wireguard menu in the Mikrotik with the same data as i used in mi laptop connection:

[Interface]
PrivateKey = PrivateKey
ListenPort = 47968
Address = 10.8.8.3/24
DNS = 192.168.81.240, 192.168.81.241
MTU = 1280

[Peer]
PublicKey = PublicKey
PresharedKey = PresharedKey
AllowedIPs = 0.0.0.0/1, 128.0.0.0/1, ::/1, 8000::/1
Endpoint = domain:port
PersistentKeepalive = 25

Those data are in the wireguard.conf that i've imported in my laptop or my phone, but mikrotik can notconnect
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18959
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: wireguard as VPN client

Tue May 10, 2022 2:01 pm

A MT device is not a laptop so its not going to be exactly the same.
The links provided by the other poster are sufficient for a working config.

Suggest providing config of MT
/export file=anynameyouwish

Who is online

Users browsing this forum: Ahrefs [Bot] and 79 guests