Community discussions

MikroTik App
 
sankdroid
just joined
Topic Author
Posts: 1
Joined: Tue Sep 27, 2022 5:08 pm

Router as VPN Client (WireGuard)

Tue Sep 27, 2022 5:17 pm

hi,
i want to configure Router as VPN Client. attached my config file
-----------------------------------

# sep/27/2022 17:56:44 by RouterOS 7.5
# software id = HH3R-CFND
#
# model = 951G-2HnD
# serial number = 96**********
/interface ethernet
set [ find default-name=ether1 ] name=WAN_1
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
/interface wireguard
add listen-port=13231 mtu=1420 name=WG_in
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=10.10.10.2-10.10.10.254
/ip dhcp-server
add address-pool=dhcp_pool0 interface=ether5 name=dhcp1
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=9*.6*.1**.1** endpoint-port=\
51820 interface=WG_in public-key=\
"AvyHy**/P4****/****************/**********"
/ip address
add address=10.14.0.2/16 interface=WG_in network=10.14.0.0
add address=10.10.10.1/24 interface=ether5 network=10.10.10.0
/ip dhcp-client
add interface=WAN_1
/ip dhcp-server network
add address=10.10.10.0/24 gateway=10.10.10.1
/ip dns
set servers=162.252.172.57,149.154.159.92
/system clock
set time-zone-name=Asia/Dubai

-----------------------------------
and
configuration scenario.
Screenshot 2022-09-27 at 5.54.58 PM.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19101
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Router as VPN Client (WireGuard)

Thu Sep 29, 2022 4:54 pm

I would say off the cuff is that you are missing two things.

1. source nat rule for the third party VPN

2. Ip route with a table entry and a routing rule entry to ensure users go out wireguard for entry.

read - viewtopic.php?t=182340

Who is online

Users browsing this forum: jfox, mszru, tesme33 and 36 guests