Gli-net-MT300N GL-V2 as access point with OpenVPN client, no internet

Good morning all,

First of all, sorry for my english, i'm french.

Well, I acquired a Gli-net Travel Router GL-MT300N-V2:
https://www.amazon.com/dp/B073TSK26W/ref=psdc_300189_t2_B07712LKJM

This Gli-net router is installed behind my box and is connected to the box via an RJ45 cable plugged into the LAN port.

It is configured as a wireless access point by following to the letter the instructions found on this page:
https://openwrt.org/docs/guide-user/network/wifi/dumbap

Until here all goes well, all clients can connect by wifi to the Gli-net router and surf the Internet.

Traceroute openwrt.org from a client with the ovpn interface disabled:

192.168.0.254 : Gli-net router
192.168.0.1 : ISP modem

With VPN it thickens.

I have multiple subscriptions to different business VPN services.
On the router, I can install the configuration files for OpenVPN to connect to a VPN service.

By cons, once the Gli-net router connected to the VPN service, I do not have Internet access from computers on my LAN!
The tracert command reaches the router Gli-net, then nothing!

192.168.0.254 : Gli-net router

On the Gli-net router, all diagnostic utilities (ping, traceroute and nslookup) are positive with the default test address (openwrt.org) and others chosen at random.

10.9.0.1: VPN gateway

Here is the list of roads when the ovpn interface is enabled:

192.168.0.0 : my network
192.168.0.1 : ISP modem
10.9.0.1 : VPN gateway
46.246.31.49 : VPN DNS ?
16.246.31.50 : VPN DNS ?

Here are the contents of the firewall, network and OpenVPN configuration files:

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'

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

config zone
	option name 'wan'
	option output 'ACCEPT'
	option masq '1'
	option mtu_fix '1'
	option input 'REJECT'
	option forward 'REJECT'
	option network 'wan wan6'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config include
	option path '/etc/firewall.user'
	option reload '1'

config include 'glfw'
	option type 'script'
	option path '/usr/bin/glfw.sh'
	option reload '1'

config include 'glqos'
	option type 'script'
	option path '/usr/sbin/glqos.sh'
	option reload '1'

config include 'mwan3'
	option type 'script'
	option path '/var/etc/mwan3.include'
	option reload '1'

config zone 'guestzone'
	option name 'guestzone'
	option network 'guest'
	option output 'ACCEPT'
	option input 'REJECT'
	option forward 'REJECT'

config rule 'guestzone_dhcp'
	option name 'guestzone_DHCP'
	option src 'guestzone'
	option target 'ACCEPT'
	option proto 'udp'
	option dest_port '67-68'

config rule 'guestzone_dns'
	option name 'guestzone_DNS'
	option src 'guestzone'
	option target 'ACCEPT'
	option proto 'tcp udp'
	option dest_port '53'

config rule 'glservice_rule'
	option name 'glservice'
	option dest_port '83'
	option proto 'tcp udp'
	option src 'wan'
	option target 'ACCEPT'
	option enabled '0'

config forwarding
	option dest 'wan'
	option src 'guestzone'
	option enabled '0'

config zone 'vpn_zone'
	option name 'ovpn'
	option output 'ACCEPT'
	option network 'ovpn'
	option masq '1'
	option mtu_fix '1'
	option input 'ACCEPT'
	option forward 'REJECT'

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

config forwarding
	option dest 'ovpn'
	option src 'guestzone'

config forwarding
	option dest 'ovpn'
	option src 'lan'


config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdb1:5fb9:b350::/48'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-MT300N-V2-fa9'
	option ifname 'eth0.1'
	option ipaddr '192.168.0.254'
	option gateway '192.168.0.1'
	option dns '89.2.0.1 89.2.0.2'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr 'e4:95:6e:43:6f:a9'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0 6t'

config interface 'guest'
	option ifname 'guest'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.9.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'ovpn'
	option ifname 'tun0'
	option proto 'none'

package openvpn

#################################################
# Sample to include a custom config file.       #
#################################################

config openvpn custom_config

	# Set to 1 to enable this instance:
	option enabled 0

	# Include OpenVPN configuration
	option config /etc/openvpn/my-vpn.conf


#################################################
# Sample OpenVPN 2.0 uci config for             #
# multi-client server.                          #
#################################################

config openvpn sample_server

	# Set to 1 to enable this instance:
	option enabled 0

	# Which local IP address should OpenVPN
	# listen on? (optional)
#	option local 0.0.0.0

	# Which TCP/UDP port should OpenVPN listen on?
	# If you want to run multiple OpenVPN instances
	# on the same machine, use a different port
	# number for each one.  You will need to
	# open up this port on your firewall.
	option port 1194

	# TCP or UDP server?
#	option proto tcp
	option proto udp

	# "dev tun" will create a routed IP tunnel,
	# "dev tap" will create an ethernet tunnel.
	# Use "dev tap0" if you are ethernet bridging
	# and have precreated a tap0 virtual interface
	# and bridged it with your ethernet interface.
	# If you want to control access policies
	# over the VPN, you must create firewall
	# rules for the the TUN/TAP interface.
	# On non-Windows systems, you can give
	# an explicit unit number, such as tun0.
	# On Windows, use "dev-node" for this.
	# On most systems, the VPN will not function
	# unless you partially or fully disable
	# the firewall for the TUN/TAP interface.
#	option dev tap
	option dev tun

	# SSL/TLS root certificate (ca), certificate
	# (cert), and private key (key).  Each client
	# and the server must have their own cert and
	# key file.  The server and all clients will
	# use the same ca file.
	#
	# See the "easy-rsa" directory for a series
	# of scripts for generating RSA certificates
	# and private keys.  Remember to use
	# a unique Common Name for the server
	# and each of the client certificates.
	#
	# Any X509 key management system can be used.
	# OpenVPN can also use a PKCS #12 formatted key file
	# (see "pkcs12" directive in man page).
	option ca /etc/openvpn/ca.crt
	option cert /etc/openvpn/server.crt
	# This file should be kept secret:
	option key /etc/openvpn/server.key

	# Diffie hellman parameters.
	# Generate your own with:
	#   openssl dhparam -out dh1024.pem 1024
	# Substitute 2048 for 1024 if you are using
	# 2048 bit keys.
	option dh /etc/openvpn/dh1024.pem

	# Configure server mode and supply a VPN subnet
	# for OpenVPN to draw client addresses from.
	# The server will take 10.8.0.1 for itself,
	# the rest will be made available to clients.
	# Each client will be able to reach the server
	# on 10.8.0.1. Comment this line out if you are
	# ethernet bridging. See the man page for more info.
	option server "10.8.0.0 255.255.255.0"

	# Maintain a record of client <-> virtual IP address
	# associations in this file.  If OpenVPN goes down or
	# is restarted, reconnecting clients can be assigned
	# the same virtual IP address from the pool that was
	# previously assigned.
	option ifconfig_pool_persist /tmp/ipp.txt

	# Configure server mode for ethernet bridging.
	# You must first use your OS's bridging capability
	# to bridge the TAP interface with the ethernet
	# NIC interface.  Then you must manually set the
	# IP/netmask on the bridge interface, here we
	# assume 10.8.0.4/255.255.255.0.  Finally we
	# must set aside an IP range in this subnet
	# (start=10.8.0.50 end=10.8.0.100) to allocate
	# to connecting clients.  Leave this line commented
	# out unless you are ethernet bridging.
#	option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100"

	# Push routes to the client to allow it
	# to reach other private subnets behind
	# the server.  Remember that these
	# private subnets will also need
	# to know to route the OpenVPN client
	# address pool (10.8.0.0/255.255.255.0)
	# back to the OpenVPN server.
#	list push "route 192.168.10.0 255.255.255.0"
#	list push "route 192.168.20.0 255.255.255.0"

	# To assign specific IP addresses to specific
	# clients or if a connecting client has a private
	# subnet behind it that should also have VPN access,
	# use the subdirectory "ccd" for client-specific
	# configuration files (see man page for more info).

	# EXAMPLE: Suppose the client
	# having the certificate common name "Thelonious"
	# also has a small subnet behind his connecting
	# machine, such as 192.168.40.128/255.255.255.248.
	# First, uncomment out these lines:
#	option client_config_dir /etc/openvpn/ccd
#	list route "192.168.40.128 255.255.255.248"
	# Then create a file ccd/Thelonious with this line:
	#   iroute 192.168.40.128 255.255.255.248
	# This will allow Thelonious' private subnet to
	# access the VPN.  This example will only work
	# if you are routing, not bridging, i.e. you are
	# using "dev tun" and "server" directives.

	# EXAMPLE: Suppose you want to give
	# Thelonious a fixed VPN IP address of 10.9.0.1.
	# First uncomment out these lines:
#	option client_config_dir /etc/openvpn/ccd
#	list route "10.9.0.0 255.255.255.252"
#	list route "192.168.100.0 255.255.255.0"
	# Then add this line to ccd/Thelonious:
	#   ifconfig-push "10.9.0.1 10.9.0.2"

	# Suppose that you want to enable different
	# firewall access policies for different groups
	# of clients.  There are two methods:
	# (1) Run multiple OpenVPN daemons, one for each
	#     group, and firewall the TUN/TAP interface
	#     for each group/daemon appropriately.
	# (2) (Advanced) Create a script to dynamically
	#     modify the firewall in response to access
	#     from different clients.  See man
	#     page for more info on learn-address script.
#	option learn_address /etc/openvpn/script

	# If enabled, this directive will configure
	# all clients to redirect their default
	# network gateway through the VPN, causing
	# all IP traffic such as web browsing and
	# and DNS lookups to go through the VPN
	# (The OpenVPN server machine may need to NAT
	# the TUN/TAP interface to the internet in
	# order for this to work properly).
	# CAVEAT: May break client's network config if
	# client's local DHCP server packets get routed
	# through the tunnel.  Solution: make sure
	# client's local DHCP server is reachable via
	# a more specific route than the default route
	# of 0.0.0.0/0.0.0.0.
#	list push "redirect-gateway"

	# Certain Windows-specific network settings
	# can be pushed to clients, such as DNS
	# or WINS server addresses.  CAVEAT:
	# http://openvpn.net/faq.html#dhcpcaveats
#	list push "dhcp-option DNS 10.8.0.1"
#	list push "dhcp-option WINS 10.8.0.1"

	# Uncomment this directive to allow different
	# clients to be able to "see" each other.
	# By default, clients will only see the server.
	# To force clients to only see the server, you
	# will also need to appropriately firewall the
	# server's TUN/TAP interface.
#	option client_to_client 1

	# Uncomment this directive if multiple clients
	# might connect with the same certificate/key
	# files or common names.  This is recommended
	# only for testing purposes.  For production use,
	# each client should have its own certificate/key
	# pair.
	#
	# IF YOU HAVE NOT GENERATED INDIVIDUAL
	# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
	# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
	# UNCOMMENT THIS LINE OUT.
#	option duplicate_cn 1

	# The keepalive directive causes ping-like
	# messages to be sent back and forth over
	# the link so that each side knows when
	# the other side has gone down.
	# Ping every 10 seconds, assume that remote
	# peer is down if no ping received during
	# a 120 second time period.
	option keepalive "10 120"

	# For extra security beyond that provided
	# by SSL/TLS, create an "HMAC firewall"
	# to help block DoS attacks and UDP port flooding.
	#
	# Generate with:
	#   openvpn --genkey --secret ta.key
	#
	# The server and each client must have
	# a copy of this key.
	# The second parameter should be '0'
	# on the server and '1' on the clients.
	# This file is secret:
#	option tls_auth "/etc/openvpn/ta.key 0"

	# Select a cryptographic cipher.
	# This config item must be copied to
	# the client config file as well.
	# Blowfish (default):
#	option cipher BF-CBC
	# AES:
#	option cipher AES-128-CBC
	# Triple-DES:
#	option cipher DES-EDE3-CBC

	# Enable compression on the VPN link.
	# If you enable it here, you must also
	# enable it in the client config file.
	# LZ4 requires OpenVPN 2.4+ client and server
#	option compress lz4
	# LZO is compatible with most OpenVPN versions
	# (set "compress lzo" on 2.4+ clients, and "comp-lzo yes" on older clients)
	option compress lzo

	# The maximum number of concurrently connected
	# clients we want to allow.
#	option max_clients 100

	# The persist options will try to avoid
	# accessing certain resources on restart
	# that may no longer be accessible because
	# of the privilege downgrade.
	option persist_key 1
	option persist_tun 1
	option user nobody

	# Output a short status file showing
	# current connections, truncated
	# and rewritten every minute.
	option status /tmp/openvpn-status.log

	# By default, log messages will go to the syslog (or
	# on Windows, if running as a service, they will go to
	# the "\Program Files\OpenVPN\log" directory).
	# Use log or log-append to override this default.
	# "log" will truncate the log file on OpenVPN startup,
	# while "log-append" will append to it.  Use one
	# or the other (but not both).
#	option log         /tmp/openvpn.log
#	option log_append  /tmp/openvpn.log

	# Set the appropriate level of log
	# file verbosity.
	#
	# 0 is silent, except for fatal errors
	# 4 is reasonable for general usage
	# 5 and 6 can help to debug connection problems
	# 9 is extremely verbose
	option verb 3

	# Silence repeating messages.  At most 20
	# sequential messages of the same message
	# category will be output to the log.
#	option mute 20


##############################################
# Sample client-side OpenVPN 2.0 uci config  #
# for connecting to multi-client server.     #
##############################################

config openvpn sample_client

	# Set to 1 to enable this instance:
	option enabled 0

	# Specify that we are a client and that we
	# will be pulling certain config file directives
	# from the server.
	option client 1

	# Use the same setting as you are using on
	# the server.
	# On most systems, the VPN will not function
	# unless you partially or fully disable
	# the firewall for the TUN/TAP interface.
#	option dev tap
	option dev tun

	# Are we connecting to a TCP or
	# UDP server?  Use the same setting as
	# on the server.
#	option proto tcp
	option proto udp

	# The hostname/IP and port of the server.
	# You can have multiple remote entries
	# to load balance between the servers.
	list remote "my_server_1 1194"
#	list remote "my_server_2 1194"

	# Choose a random host from the remote
	# list for load_balancing.  Otherwise
	# try hosts in the order specified.
#	option remote_random 1

	# Keep trying indefinitely to resolve the
	# host name of the OpenVPN server.  Very useful
	# on machines which are not permanently connected
	# to the internet such as laptops.
	option resolv_retry infinite

	# Most clients don't need to bind to
	# a specific local port number.
	option nobind 1

	# Try to preserve some state across restarts.
	option persist_key 1
	option persist_tun 1
	option user nobody

	# If you are connecting through an
	# HTTP proxy to reach the actual OpenVPN
	# server, put the proxy server/IP and
	# port number here.  See the man page
	# if your proxy server requires
	# authentication.
	# retry on connection failures:
#	option http_proxy_retry 1
	# specify http proxy address and port:
#	option http_proxy "192.168.1.100 8080"

	# Wireless networks often produce a lot
	# of duplicate packets.  Set this flag
	# to silence duplicate packet warnings.
#	option mute_replay_warnings 1

	# SSL/TLS parms.
	# See the server config file for more
	# description.  It's best to use
	# a separate .crt/.key file pair
	# for each client.  A single ca
	# file can be used for all clients.
	option ca /etc/openvpn/ca.crt
	option cert /etc/openvpn/client.crt
	option key /etc/openvpn/client.key

	# Verify server certificate by checking
	# that the certicate has the nsCertType
	# field set to "server".  This is an
	# important precaution to protect against
	# a potential attack discussed here:
	#  http://openvpn.net/howto.html#mitm
	#
	# To use this feature, you will need to generate
	# your server certificates with the nsCertType
	# field set to "server".  The build_key_server
	# script in the easy_rsa folder will do this.
#	option ns_cert_type server

	# If a tls_auth key is used on the server
	# then every client must also have the key.
#	option tls_auth "/etc/openvpn/ta.key 1"

	# Select a cryptographic cipher.
	# If the cipher option is used on the server
	# then you must also specify it here.
#	option cipher x

	# Enable compression on the VPN link.
	# Don't enable this unless it is also
	# enabled in the server config file.
	# LZ4 requires OpenVPN 2.4+ on server and client
#	option compress lz4
	# LZO is compatible with most OpenVPN versions
	option compress lzo

	# Set log file verbosity.
	option verb 3

	# Silence repeating messages
#	option mute 20

An idea or indication of the nature of the problem ???

Cordially

1 Like

Hello,
The GLi-net is using an OpenWrt clone and not the original one.
Second your console output is very hard to read, edit the post above, select the text you pasted and press the Preformatted text (the </> button).
Third if you are using other routing manipulators, like mwan3 or VPN-Policy, paste the configurations here too.

I can't edit the post above because as a new member I can't add more than one picture ???
No routing manipulators.


config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'

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

config zone
	option name 'wan'
	option output 'ACCEPT'
	option masq '1'
	option mtu_fix '1'
	option input 'REJECT'
	option forward 'REJECT'
	option network 'wan wan6'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config include
	option path '/etc/firewall.user'
	option reload '1'

config include 'glfw'
	option type 'script'
	option path '/usr/bin/glfw.sh'
	option reload '1'

config include 'glqos'
	option type 'script'
	option path '/usr/sbin/glqos.sh'
	option reload '1'

config include 'mwan3'
	option type 'script'
	option path '/var/etc/mwan3.include'
	option reload '1'

config zone 'guestzone'
	option name 'guestzone'
	option network 'guest'
	option output 'ACCEPT'
	option input 'REJECT'
	option forward 'REJECT'

config rule 'guestzone_dhcp'
	option name 'guestzone_DHCP'
	option src 'guestzone'
	option target 'ACCEPT'
	option proto 'udp'
	option dest_port '67-68'

config rule 'guestzone_dns'
	option name 'guestzone_DNS'
	option src 'guestzone'
	option target 'ACCEPT'
	option proto 'tcp udp'
	option dest_port '53'

config rule 'glservice_rule'
	option name 'glservice'
	option dest_port '83'
	option proto 'tcp udp'
	option src 'wan'
	option target 'ACCEPT'
	option enabled '0'

config forwarding
	option dest 'wan'
	option src 'guestzone'
	option enabled '0'

config zone 'vpn_zone'
	option name 'ovpn'
	option output 'ACCEPT'
	option network 'ovpn'
	option masq '1'
	option mtu_fix '1'
	option input 'ACCEPT'
	option forward 'REJECT'

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

config forwarding
	option dest 'ovpn'
	option src 'guestzone'

config forwarding
	option dest 'ovpn'
	option src 'lan'


config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdb1:5fb9:b350::/48'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-MT300N-V2-fa9'
	option ifname 'eth0.1'
	option ipaddr '192.168.0.254'
	option gateway '192.168.0.1'
	option dns '89.2.0.1 89.2.0.2'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr 'e4:95:6e:43:6f:a9'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0 6t'

config interface 'guest'
	option ifname 'guest'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.9.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'ovpn'
	option ifname 'tun0'
	option proto 'none'

package openvpn

#################################################
# Sample to include a custom config file.       #
#################################################

config openvpn custom_config

	# Set to 1 to enable this instance:
	option enabled 0

	# Include OpenVPN configuration
	option config /etc/openvpn/my-vpn.conf


#################################################
# Sample OpenVPN 2.0 uci config for             #
# multi-client server.                          #
#################################################

config openvpn sample_server

	# Set to 1 to enable this instance:
	option enabled 0

	# Which local IP address should OpenVPN
	# listen on? (optional)
#	option local 0.0.0.0

	# Which TCP/UDP port should OpenVPN listen on?
	# If you want to run multiple OpenVPN instances
	# on the same machine, use a different port
	# number for each one.  You will need to
	# open up this port on your firewall.
	option port 1194

	# TCP or UDP server?
#	option proto tcp
	option proto udp

	# "dev tun" will create a routed IP tunnel,
	# "dev tap" will create an ethernet tunnel.
	# Use "dev tap0" if you are ethernet bridging
	# and have precreated a tap0 virtual interface
	# and bridged it with your ethernet interface.
	# If you want to control access policies
	# over the VPN, you must create firewall
	# rules for the the TUN/TAP interface.
	# On non-Windows systems, you can give
	# an explicit unit number, such as tun0.
	# On Windows, use "dev-node" for this.
	# On most systems, the VPN will not function
	# unless you partially or fully disable
	# the firewall for the TUN/TAP interface.
#	option dev tap
	option dev tun

	# SSL/TLS root certificate (ca), certificate
	# (cert), and private key (key).  Each client
	# and the server must have their own cert and
	# key file.  The server and all clients will
	# use the same ca file.
	#
	# See the "easy-rsa" directory for a series
	# of scripts for generating RSA certificates
	# and private keys.  Remember to use
	# a unique Common Name for the server
	# and each of the client certificates.
	#
	# Any X509 key management system can be used.
	# OpenVPN can also use a PKCS #12 formatted key file
	# (see "pkcs12" directive in man page).
	option ca /etc/openvpn/ca.crt
	option cert /etc/openvpn/server.crt
	# This file should be kept secret:
	option key /etc/openvpn/server.key

	# Diffie hellman parameters.
	# Generate your own with:
	#   openssl dhparam -out dh1024.pem 1024
	# Substitute 2048 for 1024 if you are using
	# 2048 bit keys.
	option dh /etc/openvpn/dh1024.pem

	# Configure server mode and supply a VPN subnet
	# for OpenVPN to draw client addresses from.
	# The server will take 10.8.0.1 for itself,
	# the rest will be made available to clients.
	# Each client will be able to reach the server
	# on 10.8.0.1. Comment this line out if you are
	# ethernet bridging. See the man page for more info.
	option server "10.8.0.0 255.255.255.0"

	# Maintain a record of client <-> virtual IP address
	# associations in this file.  If OpenVPN goes down or
	# is restarted, reconnecting clients can be assigned
	# the same virtual IP address from the pool that was
	# previously assigned.
	option ifconfig_pool_persist /tmp/ipp.txt

	# Configure server mode for ethernet bridging.
	# You must first use your OS's bridging capability
	# to bridge the TAP interface with the ethernet
	# NIC interface.  Then you must manually set the
	# IP/netmask on the bridge interface, here we
	# assume 10.8.0.4/255.255.255.0.  Finally we
	# must set aside an IP range in this subnet
	# (start=10.8.0.50 end=10.8.0.100) to allocate
	# to connecting clients.  Leave this line commented
	# out unless you are ethernet bridging.
#	option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100"

	# Push routes to the client to allow it
	# to reach other private subnets behind
	# the server.  Remember that these
	# private subnets will also need
	# to know to route the OpenVPN client
	# address pool (10.8.0.0/255.255.255.0)
	# back to the OpenVPN server.
#	list push "route 192.168.10.0 255.255.255.0"
#	list push "route 192.168.20.0 255.255.255.0"

	# To assign specific IP addresses to specific
	# clients or if a connecting client has a private
	# subnet behind it that should also have VPN access,
	# use the subdirectory "ccd" for client-specific
	# configuration files (see man page for more info).

	# EXAMPLE: Suppose the client
	# having the certificate common name "Thelonious"
	# also has a small subnet behind his connecting
	# machine, such as 192.168.40.128/255.255.255.248.
	# First, uncomment out these lines:
#	option client_config_dir /etc/openvpn/ccd
#	list route "192.168.40.128 255.255.255.248"
	# Then create a file ccd/Thelonious with this line:
	#   iroute 192.168.40.128 255.255.255.248
	# This will allow Thelonious' private subnet to
	# access the VPN.  This example will only work
	# if you are routing, not bridging, i.e. you are
	# using "dev tun" and "server" directives.

	# EXAMPLE: Suppose you want to give
	# Thelonious a fixed VPN IP address of 10.9.0.1.
	# First uncomment out these lines:
#	option client_config_dir /etc/openvpn/ccd
#	list route "10.9.0.0 255.255.255.252"
#	list route "192.168.100.0 255.255.255.0"
	# Then add this line to ccd/Thelonious:
	#   ifconfig-push "10.9.0.1 10.9.0.2"

	# Suppose that you want to enable different
	# firewall access policies for different groups
	# of clients.  There are two methods:
	# (1) Run multiple OpenVPN daemons, one for each
	#     group, and firewall the TUN/TAP interface
	#     for each group/daemon appropriately.
	# (2) (Advanced) Create a script to dynamically
	#     modify the firewall in response to access
	#     from different clients.  See man
	#     page for more info on learn-address script.
#	option learn_address /etc/openvpn/script

	# If enabled, this directive will configure
	# all clients to redirect their default
	# network gateway through the VPN, causing
	# all IP traffic such as web browsing and
	# and DNS lookups to go through the VPN
	# (The OpenVPN server machine may need to NAT
	# the TUN/TAP interface to the internet in
	# order for this to work properly).
	# CAVEAT: May break client's network config if
	# client's local DHCP server packets get routed
	# through the tunnel.  Solution: make sure
	# client's local DHCP server is reachable via
	# a more specific route than the default route
	# of 0.0.0.0/0.0.0.0.
#	list push "redirect-gateway"

	# Certain Windows-specific network settings
	# can be pushed to clients, such as DNS
	# or WINS server addresses.  CAVEAT:
	# http://openvpn.net/faq.html#dhcpcaveats
#	list push "dhcp-option DNS 10.8.0.1"
#	list push "dhcp-option WINS 10.8.0.1"

	# Uncomment this directive to allow different
	# clients to be able to "see" each other.
	# By default, clients will only see the server.
	# To force clients to only see the server, you
	# will also need to appropriately firewall the
	# server's TUN/TAP interface.
#	option client_to_client 1

	# Uncomment this directive if multiple clients
	# might connect with the same certificate/key
	# files or common names.  This is recommended
	# only for testing purposes.  For production use,
	# each client should have its own certificate/key
	# pair.
	#
	# IF YOU HAVE NOT GENERATED INDIVIDUAL
	# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
	# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
	# UNCOMMENT THIS LINE OUT.
#	option duplicate_cn 1

	# The keepalive directive causes ping-like
	# messages to be sent back and forth over
	# the link so that each side knows when
	# the other side has gone down.
	# Ping every 10 seconds, assume that remote
	# peer is down if no ping received during
	# a 120 second time period.
	option keepalive "10 120"

	# For extra security beyond that provided
	# by SSL/TLS, create an "HMAC firewall"
	# to help block DoS attacks and UDP port flooding.
	#
	# Generate with:
	#   openvpn --genkey --secret ta.key
	#
	# The server and each client must have
	# a copy of this key.
	# The second parameter should be '0'
	# on the server and '1' on the clients.
	# This file is secret:
#	option tls_auth "/etc/openvpn/ta.key 0"

	# Select a cryptographic cipher.
	# This config item must be copied to
	# the client config file as well.
	# Blowfish (default):
#	option cipher BF-CBC
	# AES:
#	option cipher AES-128-CBC
	# Triple-DES:
#	option cipher DES-EDE3-CBC

	# Enable compression on the VPN link.
	# If you enable it here, you must also
	# enable it in the client config file.
	# LZ4 requires OpenVPN 2.4+ client and server
#	option compress lz4
	# LZO is compatible with most OpenVPN versions
	# (set "compress lzo" on 2.4+ clients, and "comp-lzo yes" on older clients)
	option compress lzo

	# The maximum number of concurrently connected
	# clients we want to allow.
#	option max_clients 100

	# The persist options will try to avoid
	# accessing certain resources on restart
	# that may no longer be accessible because
	# of the privilege downgrade.
	option persist_key 1
	option persist_tun 1
	option user nobody

	# Output a short status file showing
	# current connections, truncated
	# and rewritten every minute.
	option status /tmp/openvpn-status.log

	# By default, log messages will go to the syslog (or
	# on Windows, if running as a service, they will go to
	# the "\Program Files\OpenVPN\log" directory).
	# Use log or log-append to override this default.
	# "log" will truncate the log file on OpenVPN startup,
	# while "log-append" will append to it.  Use one
	# or the other (but not both).
#	option log         /tmp/openvpn.log
#	option log_append  /tmp/openvpn.log

	# Set the appropriate level of log
	# file verbosity.
	#
	# 0 is silent, except for fatal errors
	# 4 is reasonable for general usage
	# 5 and 6 can help to debug connection problems
	# 9 is extremely verbose
	option verb 3

	# Silence repeating messages.  At most 20
	# sequential messages of the same message
	# category will be output to the log.
#	option mute 20


##############################################
# Sample client-side OpenVPN 2.0 uci config  #
# for connecting to multi-client server.     #
##############################################

config openvpn sample_client

	# Set to 1 to enable this instance:
	option enabled 0

	# Specify that we are a client and that we
	# will be pulling certain config file directives
	# from the server.
	option client 1

	# Use the same setting as you are using on
	# the server.
	# On most systems, the VPN will not function
	# unless you partially or fully disable
	# the firewall for the TUN/TAP interface.
#	option dev tap
	option dev tun

	# Are we connecting to a TCP or
	# UDP server?  Use the same setting as
	# on the server.
#	option proto tcp
	option proto udp

	# The hostname/IP and port of the server.
	# You can have multiple remote entries
	# to load balance between the servers.
	list remote "my_server_1 1194"
#	list remote "my_server_2 1194"

	# Choose a random host from the remote
	# list for load_balancing.  Otherwise
	# try hosts in the order specified.
#	option remote_random 1

	# Keep trying indefinitely to resolve the
	# host name of the OpenVPN server.  Very useful
	# on machines which are not permanently connected
	# to the internet such as laptops.
	option resolv_retry infinite

	# Most clients don't need to bind to
	# a specific local port number.
	option nobind 1

	# Try to preserve some state across restarts.
	option persist_key 1
	option persist_tun 1
	option user nobody

	# If you are connecting through an
	# HTTP proxy to reach the actual OpenVPN
	# server, put the proxy server/IP and
	# port number here.  See the man page
	# if your proxy server requires
	# authentication.
	# retry on connection failures:
#	option http_proxy_retry 1
	# specify http proxy address and port:
#	option http_proxy "192.168.1.100 8080"

	# Wireless networks often produce a lot
	# of duplicate packets.  Set this flag
	# to silence duplicate packet warnings.
#	option mute_replay_warnings 1

	# SSL/TLS parms.
	# See the server config file for more
	# description.  It's best to use
	# a separate .crt/.key file pair
	# for each client.  A single ca
	# file can be used for all clients.
	option ca /etc/openvpn/ca.crt
	option cert /etc/openvpn/client.crt
	option key /etc/openvpn/client.key

	# Verify server certificate by checking
	# that the certicate has the nsCertType
	# field set to "server".  This is an
	# important precaution to protect against
	# a potential attack discussed here:
	#  http://openvpn.net/howto.html#mitm
	#
	# To use this feature, you will need to generate
	# your server certificates with the nsCertType
	# field set to "server".  The build_key_server
	# script in the easy_rsa folder will do this.
#	option ns_cert_type server

	# If a tls_auth key is used on the server
	# then every client must also have the key.
#	option tls_auth "/etc/openvpn/ta.key 1"

	# Select a cryptographic cipher.
	# If the cipher option is used on the server
	# then you must also specify it here.
#	option cipher x

	# Enable compression on the VPN link.
	# Don't enable this unless it is also
	# enabled in the server config file.
	# LZ4 requires OpenVPN 2.4+ on server and client
#	option compress lz4
	# LZO is compatible with most OpenVPN versions
	option compress lzo

	# Set log file verbosity.
	option verb 3

	# Silence repeating messages
#	option mute 20

Could you post here as well the following:

uci export dhcp; echo; ip -4 addr; echo; ip -4 ro; \
ip -4 ru; echo; ip -4 ro ls tab all ; iptables-save -c

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 nonwildcard '1'
        option localservice '1'
        option resolvfile '/tmp/resolv.conf.auto'

config dhcp 'lan'
        option interface 'lan'
        option ignore '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'guest'
        option interface 'guest'
        option start '100'
        option leasetime '12h'
        option limit '150'
        option dhcpv6 'server'
        option ra 'server'

config domain 'localhost'
        option name 'console.gl-inet.com'
        option ip '192.168.0.254'


1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaul                            t qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
11: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP gr                            oup default qlen 1000
    inet 192.168.0.254/24 brd 192.168.0.255 scope global br-lan
       valid_lft forever preferred_lft forever

default via 192.168.0.1 dev br-lan proto static
81.17.28.234 via 192.168.0.1 dev br-lan
192.168.0.0/24 dev br-lan proto kernel scope link src 192.168.0.254
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

default via 192.168.0.1 dev br-lan proto static
81.17.28.234 via 192.168.0.1 dev br-lan
192.168.0.0/24 dev br-lan proto kernel scope link src 192.168.0.254
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0                            .1
broadcast 192.168.0.0 dev br-lan table local proto kernel scope link src 192.168                            .0.254
local 192.168.0.254 dev br-lan table local proto kernel scope host src 192.168.0                            .254
broadcast 192.168.0.255 dev br-lan table local proto kernel scope link src 192.1                            68.0.254
# Generated by iptables-save v1.6.2 on Thu Apr  2 16:34:35 2020
*nat
:PREROUTING ACCEPT [5673:1485300]
:INPUT ACCEPT [164:13020]
:OUTPUT ACCEPT [260:20222]
:POSTROUTING ACCEPT [1659:109015]
:GL_SPEC_DMZ - [0:0]
:GL_SPEC_FORWARDING - [0:0]
:postrouting_guestzone_rule - [0:0]
:postrouting_lan_rule - [0:0]
:postrouting_ovpn_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_guestzone_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_ovpn_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_guestzone_postrouting - [0:0]
:zone_guestzone_prerouting - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
:zone_wan_postrouting - [0:0]
:zone_wan_prerouting - [0:0]
[5673:1485300] -A PREROUTING -j GL_SPEC_DMZ
[5673:1485300] -A PREROUTING -j GL_SPEC_FORWARDING
[5673:1485300] -A PREROUTING -m comment --comment "!fw3: Custom prerouting rule                             chain" -j prerouting_rule
[5673:1485300] -A PREROUTING -i br-lan -m comment --comment "!fw3" -j zone_lan_p                            rerouting
[0:0] -A PREROUTING -i eth0.2 -m comment --comment "!fw3" -j zone_wan_prerouting
[0:0] -A PREROUTING -i br-guest -m comment --comment "!fw3" -j zone_guestzone_pr                            erouting
[1659:109015] -A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule                             chain" -j postrouting_rule
[1631:107055] -A POSTROUTING -o br-lan -m comment --comment "!fw3" -j zone_lan_p                            ostrouting
[0:0] -A POSTROUTING -o eth0.2 -m comment --comment "!fw3" -j zone_wan_postrouti                            ng
[0:0] -A POSTROUTING -o br-guest -m comment --comment "!fw3" -j zone_guestzone_p                            ostrouting
[0:0] -A zone_guestzone_postrouting -m comment --comment "!fw3: Custom guestzone                             postrouting rule chain" -j postrouting_guestzone_rule
[0:0] -A zone_guestzone_prerouting -m comment --comment "!fw3: Custom guestzone                             prerouting rule chain" -j prerouting_guestzone_rule
[1631:107055] -A zone_lan_postrouting -m comment --comment "!fw3: Custom lan pos                            trouting rule chain" -j postrouting_lan_rule
[5673:1485300] -A zone_lan_prerouting -m comment --comment "!fw3: Custom lan pre                            routing rule chain" -j prerouting_lan_rule
[0:0] -A zone_wan_postrouting -m comment --comment "!fw3: Custom wan postrouting                             rule chain" -j postrouting_wan_rule
[0:0] -A zone_wan_postrouting -m comment --comment "!fw3" -j MASQUERADE
[0:0] -A zone_wan_prerouting -m comment --comment "!fw3: Custom wan prerouting r                            ule chain" -j prerouting_wan_rule
COMMIT
# Completed on Thu Apr  2 16:34:35 2020
# Generated by iptables-save v1.6.2 on Thu Apr  2 16:34:35 2020
*mangle
:PREROUTING ACCEPT [65904:7594103]
:INPUT ACCEPT [1834:305860]
:FORWARD ACCEPT [59960:5904756]
:OUTPUT ACCEPT [2161:712514]
:POSTROUTING ACCEPT [62097:6617273]
[0:0] -A FORWARD -o eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --co                            mment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
COMMIT
# Completed on Thu Apr  2 16:34:35 2020
# Generated by iptables-save v1.6.2 on Thu Apr  2 16:34:35 2020
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:GL_SPEC_OPENING - [0:0]
:forwarding_guestzone_rule - [0:0]
:forwarding_lan_rule - [0:0]
:forwarding_ovpn_rule - [0:0]
:forwarding_rule - [0:0]
:forwarding_wan_rule - [0:0]
:input_guestzone_rule - [0:0]
:input_lan_rule - [0:0]
:input_ovpn_rule - [0:0]
:input_rule - [0:0]
:input_wan_rule - [0:0]
:output_guestzone_rule - [0:0]
:output_lan_rule - [0:0]
:output_ovpn_rule - [0:0]
:output_rule - [0:0]
:output_wan_rule - [0:0]
:reject - [0:0]
:syn_flood - [0:0]
:zone_guestzone_dest_ACCEPT - [0:0]
:zone_guestzone_dest_REJECT - [0:0]
:zone_guestzone_forward - [0:0]
:zone_guestzone_input - [0:0]
:zone_guestzone_output - [0:0]
:zone_guestzone_src_REJECT - [0:0]
:zone_lan_dest_ACCEPT - [0:0]
:zone_lan_forward - [0:0]
:zone_lan_input - [0:0]
:zone_lan_output - [0:0]
:zone_lan_src_ACCEPT - [0:0]
:zone_ovpn_forward - [0:0]
:zone_ovpn_input - [0:0]
:zone_ovpn_output - [0:0]
:zone_wan_dest_ACCEPT - [0:0]
:zone_wan_dest_REJECT - [0:0]
:zone_wan_forward - [0:0]
:zone_wan_input - [0:0]
:zone_wan_output - [0:0]
:zone_wan_src_REJECT - [0:0]
[1832:305235] -A INPUT -j GL_SPEC_OPENING
[224:16772] -A INPUT -i lo -m comment --comment "!fw3" -j ACCEPT
[1610:289088] -A INPUT -m comment --comment "!fw3: Custom input rule chain" -j i                            nput_rule
[1239:262406] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --c                            omment "!fw3" -j ACCEPT
[27:1400] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m comment --co                            mment "!fw3" -j syn_flood
[371:26682] -A INPUT -i br-lan -m comment --comment "!fw3" -j zone_lan_input
[0:0] -A INPUT -i eth0.2 -m comment --comment "!fw3" -j zone_wan_input
[0:0] -A INPUT -i br-guest -m comment --comment "!fw3" -j zone_guestzone_input
[59960:5904756] -A FORWARD -m comment --comment "!fw3: Custom forwarding rule ch                            ain" -j forwarding_rule
[0:0] -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment                             "!fw3" -j ACCEPT
[59960:5904756] -A FORWARD -i br-lan -m comment --comment "!fw3" -j zone_lan_for                            ward
[0:0] -A FORWARD -i eth0.2 -m comment --comment "!fw3" -j zone_wan_forward
[0:0] -A FORWARD -i br-guest -m comment --comment "!fw3" -j zone_guestzone_forwa                            rd
[0:0] -A FORWARD -m comment --comment "!fw3" -j reject
[224:16772] -A OUTPUT -o lo -m comment --comment "!fw3" -j ACCEPT
[1872:690543] -A OUTPUT -m comment --comment "!fw3: Custom output rule chain" -j                             output_rule
[1621:670980] -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --                            comment "!fw3" -j ACCEPT
[251:19563] -A OUTPUT -o br-lan -m comment --comment "!fw3" -j zone_lan_output
[0:0] -A OUTPUT -o eth0.2 -m comment --comment "!fw3" -j zone_wan_output
[0:0] -A OUTPUT -o br-guest -m comment --comment "!fw3" -j zone_guestzone_output
[0:0] -A reject -p tcp -m comment --comment "!fw3" -j REJECT --reject-with tcp-r                            eset
[0:0] -A reject -m comment --comment "!fw3" -j REJECT --reject-with icmp-port-un                            reachable
[27:1400] -A syn_flood -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --                            limit 25/sec --limit-burst 50 -m comment --comment "!fw3" -j RETURN
[0:0] -A syn_flood -m comment --comment "!fw3" -j DROP
[0:0] -A zone_guestzone_dest_ACCEPT -o br-guest -m comment --comment "!fw3" -j A                            CCEPT
[0:0] -A zone_guestzone_dest_REJECT -o br-guest -m comment --comment "!fw3" -j r                            eject
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3: Custom guestzone for                            warding rule chain" -j forwarding_guestzone_rule
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3: Zone guestzone to wa                            n forwarding policy" -j zone_wan_dest_ACCEPT
[0:0] -A zone_guestzone_forward -m conntrack --ctstate DNAT -m comment --comment                             "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3" -j zone_guestzone_de                            st_REJECT
[0:0] -A zone_guestzone_input -m comment --comment "!fw3: Custom guestzone input                             rule chain" -j input_guestzone_rule
[0:0] -A zone_guestzone_input -p udp -m udp --dport 67:68 -m comment --comment "                            !fw3: guestzone_DHCP" -j ACCEPT
[0:0] -A zone_guestzone_input -p tcp -m tcp --dport 53 -m comment --comment "!fw                            3: guestzone_DNS" -j ACCEPT
[0:0] -A zone_guestzone_input -p udp -m udp --dport 53 -m comment --comment "!fw                            3: guestzone_DNS" -j ACCEPT
[0:0] -A zone_guestzone_input -m conntrack --ctstate DNAT -m comment --comment "                            !fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_guestzone_input -m comment --comment "!fw3" -j zone_guestzone_src_                            REJECT
[0:0] -A zone_guestzone_output -m comment --comment "!fw3: Custom guestzone outp                            ut rule chain" -j output_guestzone_rule
[0:0] -A zone_guestzone_output -m comment --comment "!fw3" -j zone_guestzone_des                            t_ACCEPT
[0:0] -A zone_guestzone_src_REJECT -i br-guest -m comment --comment "!fw3" -j re                            ject
[60211:5924319] -A zone_lan_dest_ACCEPT -o br-lan -m comment --comment "!fw3" -j                             ACCEPT
[59960:5904756] -A zone_lan_forward -m comment --comment "!fw3: Custom lan forwa                            rding rule chain" -j forwarding_lan_rule
[59960:5904756] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to wan                             forwarding policy" -j zone_wan_dest_ACCEPT
[0:0] -A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3                            : Accept port forwards" -j ACCEPT
[59960:5904756] -A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest                            _ACCEPT
[371:26682] -A zone_lan_input -m comment --comment "!fw3: Custom lan input rule                             chain" -j input_lan_rule
[0:0] -A zone_lan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3:                             Accept port redirections" -j ACCEPT
[371:26682] -A zone_lan_input -m comment --comment "!fw3" -j zone_lan_src_ACCEPT
[251:19563] -A zone_lan_output -m comment --comment "!fw3: Custom lan output rul                            e chain" -j output_lan_rule
[251:19563] -A zone_lan_output -m comment --comment "!fw3" -j zone_lan_dest_ACCE                            PT
[371:26682] -A zone_lan_src_ACCEPT -i br-lan -m conntrack --ctstate NEW,UNTRACKE                            D -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_ACCEPT -o eth0.2 -m conntrack --ctstate INVALID -m commen                            t --comment "!fw3: Prevent NAT leakage" -j DROP
[0:0] -A zone_wan_dest_ACCEPT -o eth0.2 -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_REJECT -o eth0.2 -m comment --comment "!fw3" -j reject
[0:0] -A zone_wan_forward -m comment --comment "!fw3: Custom wan forwarding rule                             chain" -j forwarding_wan_rule
[0:0] -A zone_wan_forward -p esp -m comment --comment "!fw3: Allow-IPSec-ESP" -j                             zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -p udp -m udp --dport 500 -m comment --comment "!fw3:                             Allow-ISAKMP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3                            : Accept port forwards" -j ACCEPT
[0:0] -A zone_wan_forward -m comment --comment "!fw3" -j zone_wan_dest_REJECT
[0:0] -A zone_wan_input -m comment --comment "!fw3: Custom wan input rule chain"                             -j input_wan_rule
[0:0] -A zone_wan_input -p udp -m udp --dport 68 -m comment --comment "!fw3: All                            ow-DHCP-Renew" -j ACCEPT
[0:0] -A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment "!fw3                            : Allow-Ping" -j ACCEPT
[0:0] -A zone_wan_input -p igmp -m comment --comment "!fw3: Allow-IGMP" -j ACCEP                            T
[0:0] -A zone_wan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3:                             Accept port redirections" -j ACCEPT
[0:0] -A zone_wan_input -m comment --comment "!fw3" -j zone_wan_src_REJECT
[0:0] -A zone_wan_output -m comment --comment "!fw3: Custom wan output rule chai                            n" -j output_wan_rule
[0:0] -A zone_wan_output -m comment --comment "!fw3" -j zone_wan_dest_ACCEPT
[0:0] -A zone_wan_src_REJECT -i eth0.2 -m comment --comment "!fw3" -j reject
COMMIT
# Completed on Thu Apr  2 16:34:35 2020

Alright, post it one more time with VPN connected.
One more question:

  • According to dumbAP guide, the DHCP and gateway for the LAN hosts is the box. So even if you switch on the VPN in OpenWrt the other hosts in the LAN will ignore it. So are you trying to connect from a host in LAN or GUEST? If you are connecting from LAN, have you enabled some redirect on the box or added a static route on the hosts?

I'm trying to connect from a host on the LAN by wifi.
No redirect on the box or static route on the hosts !

Here the results of the command with VPN enabled:


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 nonwildcard '1'
        option localservice '1'
        option resolvfile '/tmp/resolv.conf.vpn'

config dhcp 'lan'
        option interface 'lan'
        option ignore '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'guest'
        option interface 'guest'
        option start '100'
        option leasetime '12h'
        option limit '150'
        option dhcpv6 'server'
        option ra 'server'

config domain 'localhost'
        option name 'console.gl-inet.com'
        option ip '192.168.0.254'


1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
11: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.0.254/24 brd 192.168.0.255 scope global br-lan
       valid_lft forever preferred_lft forever
15: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100
    inet 10.9.62.52/16 brd 10.9.255.255 scope global tun0
       valid_lft forever preferred_lft forever

0.0.0.0/1 via 10.9.0.1 dev tun0
0.0.0.0/1 dev tun0 scope link
default via 192.168.0.1 dev br-lan proto static
10.9.0.0/16 dev tun0 proto kernel scope link src 10.9.62.52
81.17.28.234 via 192.168.0.1 dev br-lan
128.0.0.0/1 via 10.9.0.1 dev tun0
128.0.0.0/1 dev tun0 scope link
136.0.2.165 via 192.168.0.1 dev br-lan
192.168.0.0/24 dev br-lan proto kernel scope link src 192.168.0.254
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

0.0.0.0/1 via 10.9.0.1 dev tun0
0.0.0.0/1 dev tun0 scope link
default via 192.168.0.1 dev br-lan proto static
10.9.0.0/16 dev tun0 proto kernel scope link src 10.9.62.52
81.17.28.234 via 192.168.0.1 dev br-lan
128.0.0.0/1 via 10.9.0.1 dev tun0
128.0.0.0/1 dev tun0 scope link
136.0.2.165 via 192.168.0.1 dev br-lan
192.168.0.0/24 dev br-lan proto kernel scope link src 192.168.0.254
broadcast 10.9.0.0 dev tun0 table local proto kernel scope link src 10.9.62.52
local 10.9.62.52 dev tun0 table local proto kernel scope host src 10.9.62.52
broadcast 10.9.255.255 dev tun0 table local proto kernel scope link src 10.9.62.52
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.0.0 dev br-lan table local proto kernel scope link src 192.168.0.254
local 192.168.0.254 dev br-lan table local proto kernel scope host src 192.168.0.254
broadcast 192.168.0.255 dev br-lan table local proto kernel scope link src 192.168.0.254
# Generated by iptables-save v1.6.2 on Thu Apr  2 16:52:43 2020
*nat
:PREROUTING ACCEPT [22:6606]
:INPUT ACCEPT [4:679]
:OUTPUT ACCEPT [8:608]
:POSTROUTING ACCEPT [8:608]
:GL_SPEC_DMZ - [0:0]
:GL_SPEC_FORWARDING - [0:0]
:postrouting_guestzone_rule - [0:0]
:postrouting_lan_rule - [0:0]
:postrouting_ovpn_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_guestzone_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_ovpn_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_guestzone_postrouting - [0:0]
:zone_guestzone_prerouting - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
:zone_ovpn_postrouting - [0:0]
:zone_ovpn_prerouting - [0:0]
:zone_wan_postrouting - [0:0]
:zone_wan_prerouting - [0:0]
[22:6606] -A PREROUTING -j GL_SPEC_DMZ
[22:6606] -A PREROUTING -j GL_SPEC_FORWARDING
[22:6606] -A PREROUTING -m comment --comment "!fw3: Custom prerouting rule chain" -j prerouting_rule
[22:6606] -A PREROUTING -i br-lan -m comment --comment "!fw3" -j zone_lan_prerouting
[0:0] -A PREROUTING -i eth0.2 -m comment --comment "!fw3" -j zone_wan_prerouting
[0:0] -A PREROUTING -i br-guest -m comment --comment "!fw3" -j zone_guestzone_prerouting
[8:608] -A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule chain" -j postrouting_rule
[5:366] -A POSTROUTING -o br-lan -m comment --comment "!fw3" -j zone_lan_postrouting
[0:0] -A POSTROUTING -o eth0.2 -m comment --comment "!fw3" -j zone_wan_postrouting
[0:0] -A POSTROUTING -o br-guest -m comment --comment "!fw3" -j zone_guestzone_postrouting
[0:0] -A zone_guestzone_postrouting -m comment --comment "!fw3: Custom guestzone postrouting rule chain" -j postrouting_guestzone_rule
[0:0] -A zone_guestzone_prerouting -m comment --comment "!fw3: Custom guestzone prerouting rule chain" -j prerouting_guestzone_rule
[5:366] -A zone_lan_postrouting -m comment --comment "!fw3: Custom lan postrouting rule chain" -j postrouting_lan_rule
[22:6606] -A zone_lan_prerouting -m comment --comment "!fw3: Custom lan prerouting rule chain" -j prerouting_lan_rule
[0:0] -A zone_ovpn_postrouting -m comment --comment "!fw3: Custom ovpn postrouting rule chain" -j postrouting_ovpn_rule
[0:0] -A zone_ovpn_postrouting -m comment --comment "!fw3" -j MASQUERADE
[0:0] -A zone_ovpn_prerouting -m comment --comment "!fw3: Custom ovpn prerouting rule chain" -j prerouting_ovpn_rule
[0:0] -A zone_wan_postrouting -m comment --comment "!fw3: Custom wan postrouting rule chain" -j postrouting_wan_rule
[0:0] -A zone_wan_postrouting -m comment --comment "!fw3" -j MASQUERADE
[0:0] -A zone_wan_prerouting -m comment --comment "!fw3: Custom wan prerouting rule chain" -j prerouting_wan_rule
COMMIT
# Completed on Thu Apr  2 16:52:43 2020
# Generated by iptables-save v1.6.2 on Thu Apr  2 16:52:43 2020
*mangle
:PREROUTING ACCEPT [93:20885]
:INPUT ACCEPT [75:14958]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [110:22587]
:POSTROUTING ACCEPT [110:22587]
[0:0] -A FORWARD -o eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
COMMIT
# Completed on Thu Apr  2 16:52:43 2020
# Generated by iptables-save v1.6.2 on Thu Apr  2 16:52:43 2020
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [2:168]
:GL_SPEC_OPENING - [0:0]
:forwarding_guestzone_rule - [0:0]
:forwarding_lan_rule - [0:0]
:forwarding_ovpn_rule - [0:0]
:forwarding_rule - [0:0]
:forwarding_wan_rule - [0:0]
:input_guestzone_rule - [0:0]
:input_lan_rule - [0:0]
:input_ovpn_rule - [0:0]
:input_rule - [0:0]
:input_wan_rule - [0:0]
:output_guestzone_rule - [0:0]
:output_lan_rule - [0:0]
:output_ovpn_rule - [0:0]
:output_rule - [0:0]
:output_wan_rule - [0:0]
:reject - [0:0]
:syn_flood - [0:0]
:zone_guestzone_dest_ACCEPT - [0:0]
:zone_guestzone_dest_REJECT - [0:0]
:zone_guestzone_forward - [0:0]
:zone_guestzone_input - [0:0]
:zone_guestzone_output - [0:0]
:zone_guestzone_src_REJECT - [0:0]
:zone_lan_dest_ACCEPT - [0:0]
:zone_lan_forward - [0:0]
:zone_lan_input - [0:0]
:zone_lan_output - [0:0]
:zone_lan_src_ACCEPT - [0:0]
:zone_ovpn_dest_ACCEPT - [0:0]
:zone_ovpn_dest_REJECT - [0:0]
:zone_ovpn_forward - [0:0]
:zone_ovpn_input - [0:0]
:zone_ovpn_output - [0:0]
:zone_ovpn_src_ACCEPT - [0:0]
:zone_wan_dest_ACCEPT - [0:0]
:zone_wan_dest_REJECT - [0:0]
:zone_wan_forward - [0:0]
:zone_wan_input - [0:0]
:zone_wan_output - [0:0]
:zone_wan_src_REJECT - [0:0]
[74:14918] -A INPUT -j GL_SPEC_OPENING
[4:547] -A INPUT -i lo -m comment --comment "!fw3" -j ACCEPT
[71:14411] -A INPUT -m comment --comment "!fw3: Custom input rule chain" -j input_rule
[67:13732] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[2:96] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m comment --comment "!fw3" -j syn_flood
[4:679] -A INPUT -i br-lan -m comment --comment "!fw3" -j zone_lan_input
[0:0] -A INPUT -i eth0.2 -m comment --comment "!fw3" -j zone_wan_input
[0:0] -A INPUT -i br-guest -m comment --comment "!fw3" -j zone_guestzone_input
[0:0] -A FORWARD -m comment --comment "!fw3: Custom forwarding rule chain" -j forwarding_rule
[0:0] -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[0:0] -A FORWARD -i br-lan -m comment --comment "!fw3" -j zone_lan_forward
[0:0] -A FORWARD -i eth0.2 -m comment --comment "!fw3" -j zone_wan_forward
[0:0] -A FORWARD -i br-guest -m comment --comment "!fw3" -j zone_guestzone_forward
[0:0] -A FORWARD -m comment --comment "!fw3" -j reject
[4:547] -A OUTPUT -o lo -m comment --comment "!fw3" -j ACCEPT
[106:22040] -A OUTPUT -m comment --comment "!fw3: Custom output rule chain" -j output_rule
[93:21266] -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[11:606] -A OUTPUT -o br-lan -m comment --comment "!fw3" -j zone_lan_output
[0:0] -A OUTPUT -o eth0.2 -m comment --comment "!fw3" -j zone_wan_output
[0:0] -A OUTPUT -o br-guest -m comment --comment "!fw3" -j zone_guestzone_output
[0:0] -A reject -p tcp -m comment --comment "!fw3" -j REJECT --reject-with tcp-reset
[0:0] -A reject -m comment --comment "!fw3" -j REJECT --reject-with icmp-port-unreachable
[2:96] -A syn_flood -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 25/sec --limit-burst 50 -m comment --comment "!fw3" -j RETURN
[0:0] -A syn_flood -m comment --comment "!fw3" -j DROP
[0:0] -A zone_guestzone_dest_ACCEPT -o br-guest -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_guestzone_dest_REJECT -o br-guest -m comment --comment "!fw3" -j reject
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3: Custom guestzone forwarding rule chain" -j forwarding_guestzone_rule
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3: Zone guestzone to ovpn forwarding policy" -j zone_ovpn_dest_ACCEPT
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3: Zone guestzone to ovpn forwarding policy" -j zone_ovpn_dest_ACCEPT
[0:0] -A zone_guestzone_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_guestzone_forward -m comment --comment "!fw3" -j zone_guestzone_dest_REJECT
[0:0] -A zone_guestzone_input -m comment --comment "!fw3: Custom guestzone input rule chain" -j input_guestzone_rule
[0:0] -A zone_guestzone_input -p udp -m udp --dport 67:68 -m comment --comment "!fw3: guestzone_DHCP" -j ACCEPT
[0:0] -A zone_guestzone_input -p tcp -m tcp --dport 53 -m comment --comment "!fw3: guestzone_DNS" -j ACCEPT
[0:0] -A zone_guestzone_input -p udp -m udp --dport 53 -m comment --comment "!fw3: guestzone_DNS" -j ACCEPT
[0:0] -A zone_guestzone_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_guestzone_input -m comment --comment "!fw3" -j zone_guestzone_src_REJECT
[0:0] -A zone_guestzone_output -m comment --comment "!fw3: Custom guestzone output rule chain" -j output_guestzone_rule
[0:0] -A zone_guestzone_output -m comment --comment "!fw3" -j zone_guestzone_dest_ACCEPT
[0:0] -A zone_guestzone_src_REJECT -i br-guest -m comment --comment "!fw3" -j reject
[11:606] -A zone_lan_dest_ACCEPT -o br-lan -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Custom lan forwarding rule chain" -j forwarding_lan_rule
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to ovpn forwarding policy" -j zone_ovpn_dest_ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to ovpn forwarding policy" -j zone_ovpn_dest_ACCEPT
[0:0] -A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
[4:679] -A zone_lan_input -m comment --comment "!fw3: Custom lan input rule chain" -j input_lan_rule
[0:0] -A zone_lan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[4:679] -A zone_lan_input -m comment --comment "!fw3" -j zone_lan_src_ACCEPT
[11:606] -A zone_lan_output -m comment --comment "!fw3: Custom lan output rule chain" -j output_lan_rule
[11:606] -A zone_lan_output -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
[4:679] -A zone_lan_src_ACCEPT -i br-lan -m conntrack --ctstate NEW,UNTRACKED -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_ovpn_forward -m comment --comment "!fw3: Custom ovpn forwarding rule chain" -j forwarding_ovpn_rule
[0:0] -A zone_ovpn_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_ovpn_forward -m comment --comment "!fw3" -j zone_ovpn_dest_REJECT
[0:0] -A zone_ovpn_input -m comment --comment "!fw3: Custom ovpn input rule chain" -j input_ovpn_rule
[0:0] -A zone_ovpn_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_ovpn_input -m comment --comment "!fw3" -j zone_ovpn_src_ACCEPT
[0:0] -A zone_ovpn_output -m comment --comment "!fw3: Custom ovpn output rule chain" -j output_ovpn_rule
[0:0] -A zone_ovpn_output -m comment --comment "!fw3" -j zone_ovpn_dest_ACCEPT
[0:0] -A zone_wan_dest_ACCEPT -o eth0.2 -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
[0:0] -A zone_wan_dest_ACCEPT -o eth0.2 -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_REJECT -o eth0.2 -m comment --comment "!fw3" -j reject
[0:0] -A zone_wan_forward -m comment --comment "!fw3: Custom wan forwarding rule chain" -j forwarding_wan_rule
[0:0] -A zone_wan_forward -p esp -m comment --comment "!fw3: Allow-IPSec-ESP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -p udp -m udp --dport 500 -m comment --comment "!fw3: Allow-ISAKMP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_wan_forward -m comment --comment "!fw3" -j zone_wan_dest_REJECT
[0:0] -A zone_wan_input -m comment --comment "!fw3: Custom wan input rule chain" -j input_wan_rule
[0:0] -A zone_wan_input -p udp -m udp --dport 68 -m comment --comment "!fw3: Allow-DHCP-Renew" -j ACCEPT
[0:0] -A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment "!fw3: Allow-Ping" -j ACCEPT
[0:0] -A zone_wan_input -p igmp -m comment --comment "!fw3: Allow-IGMP" -j ACCEPT
[0:0] -A zone_wan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_wan_input -m comment --comment "!fw3" -j zone_wan_src_REJECT
[0:0] -A zone_wan_output -m comment --comment "!fw3: Custom wan output rule chain" -j output_wan_rule
[0:0] -A zone_wan_output -m comment --comment "!fw3" -j zone_wan_dest_ACCEPT
[0:0] -A zone_wan_src_REJECT -i eth0.2 -m comment --comment "!fw3" -j reject
COMMIT
# Completed on Thu Apr  2 16:52:43 2020

Is the box advertising the OpenWrt as default gateway in dhcp then?
You do realize that if hosts use the box as gateway, without any redirects or static routes, they won't use the VPN of OpenWrt for internet.

Here the routing table of the computer That I'm using:

===========================================================================
Liste d'Interfaces
0x1 ........................... MS TCP Loopback interface
0x2 ...02 00 4c 4f 4f 01 ...... VirtNet Network Adapter - Miniport d'ordonnancement de paquets
0x20004 ...d8 eb 97 28 65 3f ...... TRENDnet Wireless N speed USB Adapter - Miniport d'ordonnancement de paquets
===========================================================================
===========================================================================
Itinéraires actifs :
Destination réseau    Masque réseau  Adr. passerelle   Adr. interface Métrique
          0.0.0.0          0.0.0.0    192.168.0.254    192.168.0.52	  1
       2.17.40.51  255.255.255.255      192.168.0.1    192.168.0.52	  1
     8.253.80.115  255.255.255.255      192.168.0.1    192.168.0.52	  1
       23.57.6.25  255.255.255.255      192.168.0.1    192.168.0.52	  1
     23.200.212.6  255.255.255.255      192.168.0.1    192.168.0.52	  1
   66.135.202.233  255.255.255.255      192.168.0.1    192.168.0.52	  1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1	  1
   139.59.210.197  255.255.255.255      192.168.0.1    192.168.0.52	  1
     185.88.181.5  255.255.255.255      192.168.0.1    192.168.0.52	  1
    185.246.211.3  255.255.255.255      192.168.0.1    192.168.0.52	  1
      192.168.0.0    255.255.255.0     192.168.0.52    192.168.0.52	  20
      192.168.0.0    255.255.255.0    192.168.0.213   192.168.0.213	  30
     192.168.0.52  255.255.255.255        127.0.0.1       127.0.0.1	  20
    192.168.0.213  255.255.255.255        127.0.0.1       127.0.0.1	  30
    192.168.0.255  255.255.255.255     192.168.0.52    192.168.0.52	  20
    192.168.0.255  255.255.255.255    192.168.0.213   192.168.0.213	  30
   205.185.216.10  255.255.255.255      192.168.0.1    192.168.0.52	  1
   216.58.204.131  255.255.255.255      192.168.0.1    192.168.0.52	  1
        224.0.0.0        240.0.0.0     192.168.0.52    192.168.0.52	  20
        224.0.0.0        240.0.0.0    192.168.0.213   192.168.0.213	  30
  255.255.255.255  255.255.255.255     192.168.0.52    192.168.0.52	  1
  255.255.255.255  255.255.255.255    192.168.0.213   192.168.0.213	  1
Passerelle par défaut :     192.168.0.254
===========================================================================
Itinéraires persistants :
  Aucun

192.168.0.254 : Gli-net router
192.168.0.1 : ISP modem

On my LAN, the gateway is the Gli-net router (192.168.0.254) not the box.
On my LAN, DHCP is provided by the box.

As a new user you have a limited amount of posts per day, so be careful with double posts. Delete unnecessary posts and use the edit to append information to existing posts.

The LAN interface of the Gli-net router has a static adress:

The gateway (box) is configured here.
For a computer on my LAN, the gateway is the Gli-net router and for the Gli-net router the gateway is the box.

I don't see any hits on the firewall from lan to vpn:
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to ovpn forwarding policy" -j zone_ovpn_dest_ACCEPT

Furthermore there are some lines missing from the ovpn zone.
The zone_ovpn_dest_ACCEPT is defined but there is no entry. There should be some ACCEPT line.
You can run the service firewall restart and see if this line is not there because of some error.
Otherwise you can assign the tun0 interface in wan zone, which already has it.
[0:0] -A zone_wan_dest_ACCEPT -o eth0.2 -m comment --comment "!fw3" -j ACCEPT

1 Like

The service firewall restart command WORKS !

with Zurich.ovpn (switzerland):

New lines added:

[0:0] -A PREROUTING -i tun0 -m comment --comment "!fw3" -j zone_ovpn_prerouting
[115:6324] -A POSTROUTING -o tun0 -m comment --comment "!fw3" -j zone_ovpn_postrouting
[63:3024] -A FORWARD -o tun0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone ovpn MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[0:0] -A INPUT -i tun0 -m comment --comment "!fw3" -j zone_ovpn_input
[0:0] -A FORWARD -i tun0 -m comment --comment "!fw3" -j zone_ovpn_forward
[13:996] -A OUTPUT -o tun0 -m comment --comment "!fw3" -j zone_ovpn_output
[0:0] -A zone_ovpn_dest_ACCEPT -o tun0 -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
[176:8764] -A zone_ovpn_dest_ACCEPT -o tun0 -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_ovpn_dest_REJECT -o tun0 -m comment --comment "!fw3" -j reject
[0:0] -A zone_ovpn_src_ACCEPT -i tun0 -m conntrack --ctstate NEW,UNTRACKED -m comment --comment "!fw3" -j ACCEPT

Are these changes are final or should I restart the firewall on each activation of the VPN connection?

Normally the change of interface status should trigger the firewall to be reloaded, so I hope you'll be fine.

Many thanks for your kindness and first class support! :smile:

A last question, how to switch from a ovpn file to another at the command line ?

You can have them all loaded and toggle the disabled option on and off I guess.

uci set openvpn.name.disabled=0
uci commit openvpn
service openvpn restart

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