One Way connection only in VPN

I am using a Linux OpenVPN server that work fine for handhelds devices. I want to extend my home network to my second house and add cameras that will be reccorded with my home NVR at my main home. I have added a AX3000 GL iNET router with openVPN connection but have issue on making it work both ways.

My remote cam, can reach my NVR without any issues, even recording is working, and of course ping !!

But from the NVR side, unable to ping, the far I can get a response is the VPN Interface from client. What is missing !!!! ??

I cant figure it out. I know I havent provide relase, config and IT tables, but I have to start somewhere, and I am pretty sure it's nothing big !!!

See network diag in attache

Let's see the OpenWrt side configuration:

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
cat /etc/config/openvpn
BusyBox v1.33.2 (2024-03-30 04:26:28 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02-SNAPSHOT, r15812+885-46b6ee7ffc
 -----------------------------------------------------
root@GL-MT3000:~# ubus call system board
{
        "kernel": "5.4.211",
        "hostname": "GL-MT3000",
        "system": "ARMv8 Processor rev 4",
        "model": "GL.iNet GL-MT3000",
        "board_name": "glinet,mt3000-snand",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02-SNAPSHOT",
                "revision": "r15812+885-46b6ee7ffc",
                "target": "mediatek/mt7981",
                "description": "OpenWrt 21.02-SNAPSHOT r15812+885-46b6ee7ffc"
        }
}
root@GL-MT3000:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd07:a488:85da::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        option macaddr '94:83:c4:4a:fd:34'
        option igmp_snooping '1'

config device
        option name 'eth1'
        option macaddr '94:83:c4:4a:fd:34'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.8.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option isolate '0'

config device
        option name 'eth0'
        option macaddr '94:83:c4:4a:fd:33'

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'
        option force_link '0'
        option ipv6 '0'
        option metric '10'
        option disabled '0'

config rule 'policy_direct_rt'
        option lookup 'main'
        option suppress_prefixlength '0'
        option priority '1100'

config rule 'policy_default_rt_vpn'
        option mark '0x8000/0xc000'
        option lookup '8000'
        option priority '1101'
        option invert '1'

config rule6 'policy_direct_rt6'
        option lookup 'main'
        option suppress_prefixlength '0'
        option priority '1100'

config rule6 'policy_default_rt_vpn6'
        option mark '0x8000/0xc000'
        option lookup '8000'
        option priority '1101'
        option invert '1'

config rule 'policy_default_rt_vpn_ts'
        option lookup 'main'
        option priority '1099'
        option mark '0x80000/0xc0000'
        option invert '0'

config interface 'ovpnclient'
        option proto 'ovpnclient'
        option config '99925_1'
        option disabled '0'

root@GL-MT3000:~# cat /etc/config/firewall

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

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

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

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

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

config include 'swap_wan_in_conn_mark'
        option type 'script'
        option reload '1'
        option path '/etc/firewall.swap_wan_in_conn_mark.sh'
        option enabled '1'

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

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

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

config include 'vpn_server_policy'
        option type 'script'
        option path '/etc/firewall.vpn_server_policy.sh'
        option reload '1'
        option enabled '1'

config zone 'ovpnclient'
        option name 'ovpnclient'
        option output 'ACCEPT'
        option mtu_fix '1'
        option masq6 '1'
        option enabled '1'
        option input 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        list network 'ovpnclient'

config forwarding 'lan2ovpnclient'
        option src 'lan'
        option dest 'ovpnclient'
        option enabled '1'

config forwarding 'guest2ovpnclient'
        option src 'guest'
        option dest 'ovpnclient'
        option enabled '1'

config forwarding 'ovpnclient2lan'
        option src 'ovpnclient'
        option dest 'lan'
        option enabled '1'

config rule
        option target 'ACCEPT'
        option src 'ovpnclient'
        option name 'All'
        option dest 'lan'

config rule
        option dest 'ovpnclient'
        option src 'lan'
        option name 'all2'
        option target 'ACCEPT'

root@GL-MT3000:~# cat /etc/config/openvpn
package openvpn

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

config openvpn custom_config

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

        # Credentials to login
        #option username 'login'
        #option password 'password'

        # Password for client certificate
        #option cert_password 'cert_password'

        # 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 dh2048.pem 2048
        # Substitute 2048 for 1024 if you are using
        # 1024 bit keys.
        option dh /etc/openvpn/dh2048.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"

        # For additional privacy, a shared secret key
        # can be used for both authentication (as in tls_auth)
        # and encryption of the TLS control channel.
        #
        # Generate a shared secret with:
        # openvpn --genkey --secret ta.key
        #
        # The server and each client must have
        # a copy of this key.
        #
        # tls_auth and tls_crypt should NOT
        # be combined, as tls_crypt implies tls_auth.
        # Use EITHER tls_crypt, tls_auth, or neither option.
#       option tls_crypt "/etc/openvpn/ta.key"

        # Set the minimum required TLS protocol version
        # for all connections.
        #
        # Require at least TLS 1.1
#       option tls_version_min "1.1"
        # Require at least TLS 1.2
#       option tls_version_min "1.2"
        # Require TLS 1.2, or the highest version supported
        # on the system
#       option tls_version_min "1.2 'or-highest'"

        # List the preferred ciphers to use for the data channel.
        # Run openvpn --show-ciphers to see all supported ciphers.
#       list data_ciphers 'AES-256-GCM'
#       list data_ciphers 'AES-128-GCM'
#       list data_ciphers 'CHACHA20-POLY1305'

        # Set a fallback cipher in order to be compatible with
        # peers that do not support cipher negotiation.
        #
        # Use AES-256-CBC as fallback
#       option data_ciphers_fallback 'AES-128-CBC'
        # Use AES-128-CBC as fallback
#       option data_ciphers_fallback 'AES-256-CBC'
        # Use Triple-DES as fallback
#       option data_ciphers_fallback 'DES-EDE3-CBC'
        # Use BF-CBC as fallback
#       option data_ciphers_fallback 'BF-CBC'

        # OpenVPN versions 2.4 and later will attempt to
        # automatically negotiate the most secure cipher
        # between the client and server, regardless of a
        # configured "option cipher" (see below).
        # Automatic negotiation is recommended.
        #
        # Uncomment this option to disable this behavior,
        # and force all OpenVPN peers to use the configured
        # cipher option instead (not recommended).
#       option ncp_disable

        # Enable compression on the VPN link.
        # If you enable it here, you must also
        # enable it in the client config file.
        #
        # Compression is not recommended, as compression and
        # encryption in combination can weaken the security
        # of the connection.
        #
        # LZ4 requires OpenVPN 2.4+ client and server
#       option compress lz4
        # LZO is available by default only in openvpn-openssl variant
        # LZO is compatible with most OpenVPN versions
#       option compress lzo

        # Control how OpenVPN handles peers using compression
        #
        # Do not allow any connections using compression
#       option allow_compression 'no'
        # Allow incoming compressed packets, but do not send compressed packets to other peers
        # This can be useful when migrating old configurations with compression activated
#       option allow_compression 'asym'
        # Both incoming and outgoing packets may be compressed
#       option allow_compression 'yes'

        # 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 key usage
        # 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 remote_cert_tls 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"

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

        # Set the minimum required TLS protocol version
        # for all connections.
        #
        # Require at least TLS 1.1
#       option tls_version_min "1.1"
        # Require at least TLS 1.2
#       option tls_version_min "1.2"
        # Require TLS 1.2, or the highest version supported
        # on the system
#       option tls_version_min "1.2 'or-highest'"

        # List the preferred ciphers for the data channel.
#       list data_ciphers 'AES-256-GCM'
#       list data_ciphers 'AES-128-GCM'
#       list data_ciphers 'CHACHA20-POLY1305'

        # Set a fallback cipher if you connect to a peer that does
        # not support cipher negotiation.
        # Use AES-256-CBC as fallback
#       option data_ciphers_fallback 'AES-128-CBC'
        # Use AES-128-CBC as fallback
#       option data_ciphers_fallback 'AES-256-CBC'
        # Use Triple-DES as fallback
#       option data_ciphers_fallback 'DES-EDE3-CBC'
        # Use BF-CBC as fallback
#       option data_ciphers_fallback 'BF-CBC'

        # Enable compression on the VPN link.
        # Don't enable this unless it is also
        # enabled in the server config file.
        #
        # Compression is not recommended, as compression and
        # encryption in combination can weaken the security
        # of the connection.
        #
        # LZ4 requires OpenVPN 2.4+ on server and client
#       option compress lz4
        # LZO is available by default only in openvpn-openssl variant
        # LZO is compatible with most OpenVPN versions
#       option compress lzo

        # Set log file verbosity.
        option verb 3

        # Silence repeating messages
#       option mute 20
root@GL-MT3000:~#

You're currently running the GL-Inet firmware. For help with that, you need to ask on their support channels.

Alternatively, you can install official OpenWrt -- it works really well. If you do the upgrade, do not keep settings as the GL-Inet configuration is not compatible with official OpenWrt.

https://firmware-selector.openwrt.org/?version=23.05.3&target=mediatek%2Ffilogic&id=glinet_gl-mt3000

1 Like

Ok the official version OpenWRT is fully compatible with GL-Inet Device ?

Yes. I've got one myself and it works really well!

I also just noticed that I am few versions away of the original one.
So I'll do the change, and let you know then :slight_smile:
Thank you

Many of the GL-Inet products (with the factory firmware) use rather old versions of OpenWrt... it is likely because they will develop the product over a long-ish period of time, forking what was current at the time and then making their slew of modifications.

While you are at it change your vpn from openvpn to wireguard which is easier to setup and much faster.

1 Like

why not wireguard ? Why OpenVPN is better than WireGuard?

I didn't ask for any WireGuard help, so why are you ??
WireGuard is different, not THE solution !!! WireGuard is only easier to configure, my OpenVPN is working great and configured well too !!! A way before everybody were focus on WireGuard. The issue, if you read carefully the post and look a the diag, is not a VPN issu ( as far as my Knowledge in routing ). Since everything else in my VPN is working. Sure, IT could be a Ovpn missing info, like recursing routing, but it's seems not !!

1 Like

The problem is certainly an OpenVPN issue, routing from server to client takes additional and not particularly easy steps (ccd files , iroute), this in contrast to WireGuard which is a peer to peer setup and has "two way communication" baked in.

So just a friendly advice to make it easier for you, take it or leave it.

Thanks for the advice. When well explain, I mean the WHY behind, it's always welcome.

So I did whats 2 of you told me, install OpenWRT official, and Wireguard et YES, it's working really well !!

Thanks !

Glad you got it working :slight_smile:

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

I will, but its not over yet !!!
I have a little traffic rule missing I think !!!
Main Office can reach remote A1, My remote Office with OpenWRT can reach main office WG server only, no boby else on the LAN. Main is running a basic Debian Bullseye without anything on it ( container ). I am not able to find out what could be missing.

I founded, that when packet arrives at my WG0 Int a main Office, packet are tagged with SRC WG0 remote office, instead of far end devices !! So ICMP from Remote Office, arrives at Devices of the Main, tagged with wrong SRC, so never get back to destination for Pincg echoes !!!

Is there a way to fix this, NAT/MAsq are disabled in Zone, but doesn't seems to change anything !!!

This should be fixable, 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:

Remember to redact keys, passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/firewall
ip route show
wg show

We need information from both sides

root@TanLan:~# ubus call system board
{
        "kernel": "5.15.150",
        "hostname": "TanLan",
        "system": "ARMv8 Processor rev 4",
        "model": "GL.iNet GL-MT3000",
        "board_name": "glinet,gl-mt3000",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.3",
                "revision": "r23809-234f1a2efa",
                "target": "mediatek/filogic",
                "description": "OpenWrt 23.05.3 r23809-234f1a2efa"
        }
}
root@TanLan:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fdfa:3295:7514::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'

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

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'

config interface 'WireGuard'
        option proto 'wireguard'
        option private_key '************************'
        option mtu '1412'
        list addresses '10.0.2.2/24'

config wireguard_WireGuard
        option description 'WG Server'
        option public_key '******************'
        option endpoint_host 'mydomain.net'
        option endpoint_port '51194'
        option route_allowed_ips '1'
        option persistent_keepalive '25'
        list allowed_ips '10.0.0.0/24'
        list allowed_ips '10.0.2.0/24'

root@TanLan:~# cat /etc/config/firewall

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

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

config zone
        option name 'wan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list device 'tun0'
        list network 'WireGuard'
        list network 'lan'

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

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 family 'ipv4'
        option target 'ACCEPT'
        list icmp_type 'echo-request'

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 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 rule
        option name 'Ssh Wan'
        option src 'wan'
        option dest_port '22'
        option target 'ACCEPT'
        option proto 'tcp'

config rule
        option name 'Allow-Admin'
        option enabled '0'
        option src 'wan'
        option proto 'tcp'
        option dest_port '22 80 443'
        option target 'ACCEPT'

config rule
        option enabled '0'

config rule
        option name 'Allow-Admin'
        option src 'wan'
        option proto 'tcp'
        option dest_port '22 80 443'
        option target 'ACCEPT'

config rule
        option name 'DMZ'
        option src 'wan'
        option target 'ACCEPT'
        option dest 'lan'
        list proto 'tcp'
        list proto 'udp'
        list proto 'icmp'

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

root@TanLan:~# ip route sho
default via 192.168.2.1 dev eth0  src 192.168.2.22
10.0.0.0/16 dev WireGuard scope link
10.0.1.0/24 dev br-lan scope link  src 10.0.1.1
10.0.2.0/24 dev WireGuard scope link  src 10.0.2.2
PUBLIC IP  via 192.168.2.1 dev eth0
192.168.2.0/24 dev eth0 scope link  src 192.168.2.22
root@TanLan:~# wg show
interface: WireGuard
  public key: ********
  private key: (hidden)
  listening port: 51496

peer: *****************
  endpoint: PUBLIC IP :51194
  allowed ips: 10.0.0.0/16
  latest handshake: 37 seconds ago
  transfer: 47.60 MiB received, 896.94 MiB sent
  persistent keepalive: every 25 seconds

Thats the remote site
Main site, Debian 11 in a Proxmox Container, with a plain config. No FW !

Thanks :slight_smile:

As this is a site-to-site setup connecting two sites try the following:

Remove list network 'WireGuard' and list network 'lan' from the wan zone

Add list network 'WireGuard' to the LAN zone

I assume that this is an internal system protected by the upstream network as your settings are otherwise unsafe

There looks to be an inconsistency in your posting:

The 10.0.0.0/16 is wrong and in contrast to the WireGuard settings.
Did you add this as a static route?
If so delete it otherwise it could a leftover of earlier settings? If so you need to reboot

Your LAN subnet seems 10.0.1.0/24.
Your WG subnets seems 10.0.2.0/24

What is the subnet of the other side?
Without adequate information of the other side it is difficult to troubleshoot.

WireGuard is routed so there should be three different subnets for both sides and for wg subnet.
In the peer config you set the wg subnet and the peers subnet
Furthermore you do not NAT on the wg interface

10.0.0.0/24 is LAN of the SiteA Main site server
10.0.1.0/24 is LAN of SiteB OpenWRT, behind an other lan 192.168.2.0/24 that is not part of tunnel, or remote LAN, juste give connectivity

Look a my drawing in the 1st post

SiteA
10.0.0.0/24
Wireguard on 10.0.0.59, running debian with NOTHING in it, flat a basic config
WG Interface 10.0.2.1

SiteB
HomeOwner LAN of the owner 192.168.2.1
OpenWRT router Wan port connected in Lan of the Home owner
OpenWRT ( SiteB ) Lan 10.0.1.0/24
WireGuard Interface 10.0.2.2

Security is not my concern by now, juste make it work first. Security will come after !!!