Community discussions

MikroTik App
 
dogmaod
just joined
Topic Author
Posts: 2
Joined: Mon Feb 26, 2024 11:43 am

Wireguard ip routing int VPN

Fri Mar 01, 2024 11:52 am

Hello People. I need help.
I have:

1. Site A - Mikrotik Wireguard server 10.20.0.1/24 – WAN IP 214.5.4.5
2. Stie B - Linux server Wrieguard client ip 10.20.0.2/32 - WAN IP 62.244.2.3
3. Site C - OpenWRT Router Wrieguard client ip 10.20.0.3/32 - WAN 213.0.23.3

Site B route default gw 10.20.0.1 wan IP 214.5.4.5

I would like to route all traffic form Site B 10.20.0.2 to 10.20.0.3. via gw 10.20.0.1

WG tunnel is up ping 10.20.0.2 <---> 10.20.0.3 is ok

On Site A Mikrotik: I
ADD routing table rtab-1

/routing rule
add action=lookup disabled=no dst-address= interface=wireguard1_test src-address=\
10.20.0.2/32 table=rtab-1

ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.20.0.3 pref-src="" routing-table=\
rtab-1 scope=30 suppress-hw-offload=no target-scope=10

Traffic not route from 10.20.0.2 to 10.20.0.3 via gw 10.20.0.3 ?
 
Mesquite
Member
Member
Posts: 420
Joined: Tue Jan 23, 2024 9:16 pm

Re: Wireguard ip routing int VPN

Fri Mar 01, 2024 2:00 pm

Draw a diagram the explanation is lacking
 
dogmaod
just joined
Topic Author
Posts: 2
Joined: Mon Feb 26, 2024 11:43 am

Re: Wireguard ip routing int VPN

Fri Mar 01, 2024 2:27 pm

/routing rule
add action=lookup disabled=no dst-address=0.0.0.0/0 interface=wireguard1_test \
src-address=10.20.0.2/32 table=rtab-1

/ip route

add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.20.0.3 pref-src="" \
routing-table=rtab-1 scope=30 suppress-hw-offload=no target-scope=10


traceroute from 10.20.0.2:
root@localhost ~]# tracepath 8.8.8.8
1?: [LOCALHOST] pmtu 1400
1: 10.20.0 .1 45.790ms
1: 10.20.0 .1 46.293ms
2: 10.20.0 .1 45.923ms !H

Resume: pmtu 1400
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 32 guests