How to bridge interfaces via wireguard

I have two router,routerA and routerB.They all run openwrt.The wan of routerB is connected to the lan of routerA,using DHCP.I run a wiregaurd interface on routerA to connect it to my server.The allowed ip includes the lan of routerB.I have set up static route so that I can reach the lan of routerB from routerA.I run the tcpdump on the server,then I ping from routerB to the server.From the tcpdump,I noticed the source is the address of the wan of routerB in the lan of routerA.I have set up some firewall rules,but it does not work.
I want to that the source ip to be the ture ip of routerB in its lan.I have tried to set the firewall zone of the wan interface of the routerB to "lan" then reboot,but it does not work.
So how I can set it?

Then add that LAN IP to the list of allowed IPs.

I done it,but it does not work

Where is the server? It is connected to router a? Router b? Or somewhere on the internet?

Let’s see the configs from both router a and b

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/firewall
2 Likes