# Route Internet traffic MT via WireGuard tunnel through MT WG peer

**URL:** <https://forum.mikrotik.com/t/route-internet-traffic-mt-via-wireguard-tunnel-through-mt-wg-peer/154825>\
**Category:** General\
**Created:** [January 9, 2022, 7:07am UTC](https://forum.mikrotik.com/t/route-internet-traffic-mt-via-wireguard-tunnel-through-mt-wg-peer/154825 "2022-01-09T07:07:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![own3r1138](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/own3r1138/32/2754_2.png) [@own3r1138](https://forum.mikrotik.com/u/own3r1138)\
**Post date:** [January 10, 2022, 6:54am UTC](https://forum.mikrotik.com/t/route-internet-traffic-mt-via-wireguard-tunnel-through-mt-wg-peer/154825/4 "2022-01-10T06:54:04Z")

</div>

![Untitled Workspace.png](https://data-discourse.cdn.mikrotik.com/original/3X/8/1/81c99a94c2cc4034a6159fd6d6966e5d7acac5e3.png)  
So this is an update.  
As I was Missed the PMTUD I also Needed to use DOH to bypass the DNS filtering and as CF does not have any AS in this region the latency was F up. so I decided to not use the DOH in the Client MT and move the DNS queries to the WG peer.  
**mangle**

```plaintext
/ip firewall mangle
add action=mark-connection chain=prerouting comment="VIA WG DNS" dst-port=53 new-connection-mark=via-wg-dns passthrough=yes protocol=tcp src-address-list=VPN
add action=mark-connection chain=prerouting dst-port=53 new-connection-mark=via-wg-dns passthrough=yes protocol=udp src-address-list=VPN
add action=mark-routing chain=prerouting connection-mark=via-wg-dns new-routing-mark=via-wg passthrough=no
add action=mark-connection chain=prerouting comment="VIA WG Route" dst-address-list=!LOCO new-connection-mark=via-wg passthrough=yes src-address-list=VPN
add action=mark-routing chain=prerouting connection-mark=via-wg new-routing-mark=via-wg passthrough=no src-address-list=VPN
add action=change-mss chain=forward connection-mark=via-wg new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn

```

**NAT**

```plaintext
/ip firewall nat
add action=masquerade chain=srcnat comment="M VIA WAN" ipsec-policy=out,none out-interface-list=WAN
add action=src-nat chain=srcnat comment="SRC-NAT Modem" dst-address=192.168.1.1 out-interface-list=DSL to-addresses=192.168.1.2
add action=src-nat chain=srcnat comment="SRC-NAT VPN - VIA WG" out-interface-list=WG to-addresses=10.10.12.240
add action=dst-nat chain=dstnat comment="DST-NAT VIA WG" connection-mark=via-wg-dns src-address-list=VPN to-addresses=10.10.12.1

```

**address-list**

```plaintext
/ip firewall address-list
add address=192.168.88.3 list=VPN
add address=192.168.88.2 disabled=yes list=VPN
add address=192.168.88.0/24 list=LOCO

```

![2022-01-12_09-31-46.png](https://data-discourse.cdn.mikrotik.com/original/3X/a/8/a8fc53ba9024b3d56e5b61868a7bae4f1f841bc8.png)  
[export.txt](https://forum.mikrotik.com/uploads/short-url/gRI8upFnaoIWw7IKjvJEVuh1cpH.txt) (17.8 KB)

---

_[View the full topic](https://forum.mikrotik.com/t/route-internet-traffic-mt-via-wireguard-tunnel-through-mt-wg-peer/154825)._
