No internet wireless&lan

Hello friends, good time. I have a 941 router and I did the basic option of accessing the internet and set openvpn on it. The problem I have is that after a while, whether through lan or wireless, my internet becomes no internet in the networks and I have to router I will turn it off and on so that it will be ok. Thank you for your guidance

First step is to export your configuration here, go to winbox, then terminal, and there input export file=anynameyouwant, remove sensitive information such as software ID, serial number, public IP if you have, etc. and post it here.

Also do you have anything in logs when this happens ? Don’t reboot, check logs before.

sep/19/2023 11:49:11 by RouterOS 6.49.10

software id = ELIDED

model = RB941-2nD

serial number = ELIDED

/interface bridge
add admin-mac=ELIDED auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX
disabled=no distance=indoors frequency=auto installation=indoor mode=
ap-bridge ssid=MikroTik-03F540 wireless-protocol=802.11
/interface l2tp-client
add connect-to=ELIDED disabled=no ipsec-secret=amir
keepalive-timeout=60 name=l2tp-out1 password=****** use-ipsec=yes
user=amir
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=
dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=ELIDED
wpa2-pre-shared-key=ELIDED
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.5.2-192.168.5.254
add name=dhcp_pool2 ranges=192.168.5.2-192.168.5.254
add name=dhcp_pool3 ranges=192.168.5.2-192.168.5.254
add name=dhcp ranges=192.168.5.2-192.168.5.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge lease-time=4d10m name=
dhcp1
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=pwr-line1
add bridge=bridge comment=defconf interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.5.1/24 interface=bridge network=192.168.5.0
/ip dhcp-client
add disabled=no interface=ether1 use-peer-dns=no
/ip dhcp-server network
add address=192.168.5.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=192.168.5.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,1.1.1.1
/ip dns static
add address=192.168.5.1 comment=defconf name=router.lan
/ip firewall mangle
add action=mark-routing chain=prerouting dst-address=!192.168.5.0/24
dst-address-list="" new-routing-mark=vpn passthrough=yes src-address=
192.168.5.0/24
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade"
ipsec-policy=out,none
/ip route
add distance=1 gateway=l2tp-out1 routing-mark=vpn
add distance=2 gateway=195.168.100.1
/system clock
set time-zone-name=Asia/Tehran
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN