# Net\_gateway routes are ignored in WG mode

**URL:** https://forum.pritunl.com/t/net-gateway-routes-are-ignored-in-wg-mode/2268
**Category:** Pritunl VPN
**Tags:** pritunl-client
**Created:** [August 9, 2024, 8:23am UTC](https://forum.pritunl.com/t/net-gateway-routes-are-ignored-in-wg-mode/2268 "2024-08-09T08:23:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tmshlvck](https://forum.pritunl.com/user_avatar/forum.pritunl.com/tmshlvck/32/48_2.png) [@tmshlvck](https://forum.pritunl.com/u/tmshlvck)
#### Post date: [August 9, 2024, 8:23am UTC](https://forum.pritunl.com/t/net-gateway-routes-are-ignored-in-wg-mode/2268/1 "2024-08-09T08:23:44Z")

</div>

Hi!

I have a WG server that announces both default GW routes for both AFIs (IPv4 0.0.0.0/0 + IPv6 ::/0) and it also sends a few routes. IPv4 is fine because we push only RFC1918 routes. But for IPv6 I need to push route that contains the VPN server IP.

I.e. I am pushing 2001:db8::/32 and the VPN server is 2001:db8::1. I also added route 2001:db8::1/128 with “Block Route and Net Gateway” in GUI, which generates net\_gateway OpenVPN routes.

When the clients accept the default GW from the server everything works fine. When the client has “Disable Default Gateway” option enabled the WG mode does not work over IPv6 and it simply fails with Handshake Timeout.

Apparently the 2001:db8::1/128 with “Block Route and Net Gateway” is ignored in WG mode. I guess it is in fact ignored here: [https://github.com/pritunl/pritunl-client-electron/blob/master/service/profile/profile.go#L753](https://github.com/pritunl/pritunl-client-electron/blob/master/service/profile/profile.go#L753)

Is there any way to work this around or are there any plans to implement net\_gateway functionality in WG mode?

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [August 10, 2024, 10:20pm UTC](https://forum.pritunl.com/t/net-gateway-routes-are-ignored-in-wg-mode/2268/2 "2024-08-10T22:20:03Z")

</div>

From what I understand it should put `!` in front of the subnets that are net gateway. I have added this to the code but it may also require modifying the routing table.

---

<div class="post-metadata">

### Author: ![tmshlvck](https://forum.pritunl.com/user_avatar/forum.pritunl.com/tmshlvck/32/48_2.png) [@tmshlvck](https://forum.pritunl.com/u/tmshlvck)
#### Post date: [August 11, 2024, 8:25am UTC](https://forum.pritunl.com/t/net-gateway-routes-are-ignored-in-wg-mode/2268/3 "2024-08-11T08:25:42Z")

</div>

Yes, I think we need PriTunl client should create routes “ via \<original\_host\_default\_gw\>”, which is what OpenVPN does for the “net\_gateway” routes in fact.

I guess you already have some code for that, because you inject the route for the tunnel endpoint via host’s original default GW when the new default GW over the tunnel is injected (and it works in WG mode).
