Manage Zyxel GS1200 connected to RPi4 OpenWrt router via VPN

Hi!

I have a strange problem with accessing Zyxel GS1200-8 managed switch via VPN between my RPi4 OpenWrt router and my PC. The problem is: I can't access web GUI, I can't even ping this switch. From any device, that is connected to this switch I can. I can ping this switch from the OpenWrt router when I log in via SSH.
From my PC via VPN I can access OpenWrt router web GUI and other devices that are connected to this switch, but not the switch itself.
Zyxel switch has default configuration with it's address changed to 192.168.10.3.
Managing is set to VID=1 and all ports has VID=1 so it should work. I really don't know what is going on here but I suspect there is something missing in OpenWrt config... I will be very grateful for your help!

Here is my network configuration:
image

OpenWrt router config.
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 'fd64:f678:5434::/48'

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

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

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

config interface 'wg0'
        option proto 'wireguard'
        option private_key '***'
        list addresses '10.0.10.3/24'
        option listen_port '51820'

config wireguard_wg0
        option public_key '***'
        list allowed_ips '10.0.10.0/24'
        option endpoint_host '51.xxx.xxx.xxx'
        option endpoint_port '51820'
        option persistent_keepalive '23'

config wireguard_wg0
        option public_key '***'
        list allowed_ips '10.0.10.100/32'
        option route_allowed_ips '1'

config device
        option name 'eth2'

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 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network '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 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 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 forwarding
        option src 'lan'
        option dest 'wan'

config zone
        option name 'wg'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'wg0'

config forwarding
        option src 'lan'
        option dest 'wg'

config forwarding
        option src 'wg'
        option dest 'lan'

config redirect
        option dest 'lan'
        option target 'DNAT'
        list proto 'udp'
        option src 'wan'
        option src_dport '51820'
        option dest_ip '192.168.10.1'
        option dest_port '51820'

PC wg config:

[Interface]
PrivateKey = ***
Address = 10.0.10.100/32
MTU = 1400

[Peer]
PublicKey = ***
Endpoint = 192.168.0.135:51820
AllowedIPs = 10.0.10.0/24,192.168.10.0/24
PersistentKeepalive = 23

And switch config.


Okey, we have the solution. Gateway address was missing in the switch. I set it to 192.168.10.1 and now everything works, thanks to my friend :slight_smile:

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