Skip to content

Can’t get Zerotier routing working #132

@javiernar1

Description

@javiernar1

Hi, I have followed your instructions on the wiki but I can't get it fully working:

My setup:
WAN-Interface of the OpenWrt router : a public IP on the internet
LAN-Interface of the OpenWrt router : 192.168.3.1
IP-Range of the LAN switch on the OpenWrt router : 192.168.3.0/24
IP-Address of the zt interface on the OpenWrt router : 10.147.20.1
ZeroTier network route on the OpenWrt router : 10.147.20.1/24 via zt

“Allow Ethernet Bridging” is enabled on 10.147.20.1 on ZT.

I am using OpenWrt 23.05.5, and I have installed latest zerotier using the official repository (1.12.2-2).

At this moment, I can connect to the router via SSH from a remote computer connected to the ZT network using both Ips: 10.147.20.1 and 192.168.3.1, and I can ping, and get reply from other computers in 192.168.3.0/24, however I cannot access any TCP service (like web) there, I always get a timeout connecting.

My config:

root@OpenWrt:~# uci show zerotier
zerotier.openwrt_network=zerotier
zerotier.openwrt_network.join='xxxxxxxxxxx'
zerotier.openwrt_network.enabled='1'
zerotier.openwrt_network.port='9993'
zerotier.openwrt_network.secret=’xxxxxxxxxxxxxxxx'

root@OpenWrt:~# cat /etc/config/zerotier

config zerotier 'openwrt_network'
        list join 'xxxxxxxxxxxxx'
        option enabled '1'
        option port '9993'
        option secret ‘xxxxxxxxx'

root@OpenWrt:~# ip a
... (several networks)
11: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.3.1/24 brd 192.168.3.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd3d:9a67:9561::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::9683:c4ff:fea4:3426/64 scope link
       valid_lft forever preferred_lft forever
12: ztklhtwidz: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 03:96:28:c8:dc:f5 brd ff:ff:ff:ff:ff:ff
    inet 10.147.20.1/24 brd 10.147.20.255 scope global ztklhtwidz
       valid_lft forever preferred_lft forever
    inet6 fe80::ecfc:a9ff:fede:7bd7/64 scope link
       valid_lft forever preferred_lft forever

root@OpenWrt:~# zerotier-cli info
200 info xxxxxxxx 1.12.2 ONLINE

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

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

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

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

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 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 rule
        option name 'Allow-ZeroTier-Inbound'
        option src '*'
        option target 'ACCEPT'
        option proto 'udp'
        option dest_port '9993'

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

config forwarding
        option src 'vpn'
        option dest 'lan'

config forwarding
        option src 'vpn'
        option dest 'wan'

config forwarding
        option src 'lan'
        option dest 'vpn'

Any idea? Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions