How do I disable Wireguard on OpenWrt?

I installed Wireguard on openwrt and now it works, but I'm wondering how to disable it? Configured according to all instructions on the internet https://mullvad.net/fr/help/running-wireguard-router/
Can someone popularly explain how to do this?

LuCI > Network > Interfaces > wg0 > Stop + Edit > General Settings > Bring up on boot > Disable + Save

ifdown wg0
uci set network.wg0.auto="0"
uci commit network
/etc/init.d/network restart
1 Like

We turn off the wg interface, but the Internet is lost. The server diagnostics menu does not ping.
Do I need to correct the rules in the firewall section?

Happened. The router had to be rebooted.

You need to add forwarding from lan > wan

2 Likes

Change the metric of the WAN and WAN6 interfaces, so they can restore the default route when you disconnect the WG:
https://openwrt.org/docs/guide-user/services/vpn/wireguard/extras#dynamic_connection

And restore the LAN to WAN forwarding:

uci -q delete firewall.lan_wan
uci set firewall.lan_wan="forwarding"
uci set firewall.lan_wan.src="lan"
uci set firewall.lan_wan.dest="wan"
uci commit firewall
/etc/init.d/firewall restart
1 Like

Thanks to everyone who responded to help! Disabling protection was not difficult.

  1. Turn off the WG interface.
  2. Reboot the WAN interface to avoid restarting the router.

I am not very good at firewall settings. But after typing for 24 hours, I ended up with such a workable configuration. Wireguard and WiFi-WiFi (or LAN-WiFi) bridge works.

You can avoid this step by changing MTU for the WAN and WAN6 interfaces as mentioned above.

2 Likes

What can you tell me about my firewall configuration, is that correct? It's just that I still don't understand very well how this is done and what each parameter is for. There are practically no instructions on how to work with a firewall on the Internet and on YouTube.
Unfortunately, I can't switch the interface language back to English (don't know how) to take a screenshot in English. Auto language and Russian are available. In automatic language mode, the language does not switch even when the router is rebooted. You can compare the screenshot above with your interface and see what settings I have.

It looks fine assuming that you want to use the WG dynamically.

No problem, check my profile. :smiley:

This is a sort of advanced level documentation which is not typically posted on YouTube. :sweat_smile:
https://openwrt.org/docs/guide-user/firewall/start

Thanks! The second option solve my problem!

1 Like

There's currently a better solution that works seamlessly for both IPv4 and IPv6:
https://openwrt.org/docs/guide-user/services/vpn/wireguard/extras#dynamic_connection

It does not work for me. When I stop WG interface, access to internet disappears.
OpenWrt 19.07.4 r11208

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.