How to access internet through WireGuard server?

Hello everyone!

I have configured a WireGuard server on my router and it seems to work fine (mostly through this guide). I can connect and am able to access LuCI interface from my phone with it.

One other thing I would like to achieve - is to be able to surf internet from under my routers' internet connection.

I assume it has to do with firewall configuration, but can't really figure out what should be changed. Can you help me?

Here is my config:

config zone 'lan'
	option name 'lan'
	list network 'lan'
	list network 'vpn'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule 'wg'
	option name 'Allow-WireGuard'
	option src 'wan'
	option dest_port '51820'
	option proto 'udp'
	option target 'ACCEPT'

Your firewall is fine...

Let's see your /etc/config/network file and the WG config for the 'client' peer.

@psherman thank you for helping!

Is this what you are asking for?

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option ip6assign '60'

config interface 'wan'
	option device 'wan'
	option proto 'pppoe'
	option ipv6 'auto'
	option username '***'
	option password '***'

config interface 'vpn'
	option proto 'wireguard'
	option private_key '***'
	option listen_port '51820'
	list addresses ''
	list addresses 'fdf1:e8a1:8d3f:9::1/64'

config wireguard_vpn 'wgclient'
	option preshared_key '***'
	option description 'Fedor'
	option public_key '***'
	option private_key '***'
	option endpoint_host '***'
	option endpoint_port '51820'
	list allowed_ips ''
	option route_allowed_ips '1'

This doesn't quite look right, but before I make any recommendations, I need to see both peers in the WG connection.

Which one did you post here -- is this the 'server' or the 'client'?
Can you please post the other, as well?

I want my router to act as a server and my phone to be a client. So I guess that means the peer on OpenWRT is a server peer?

On my phone setup is as follows

I've realized that there might be another thing related to the problem - I am using dnscrypt-proxy for DOH.

Here is my config

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/'
	option localservice '1'
	option ednspacket_max '1232'
 	option noresolv '1'
 	option localuse '1'
 	option boguspriv '0'
 	option cachesize '0'
 	list server ''

It looks like DNS was indeed the problem here.

The following snippet solved it for me

config dhcp 'vpn'
	option interface 'vpn'
	option ignore '1'

Apparently it was not it. What fixed it was supplying DNS servers in the config of iOS client. I am wondering how can I configure it to use routers DNS server.

Edit 2:
For some reason initially giving as the DNS server on the client didn't work. But then it started working. So now everything is as I expect it.