Odp: OpenWrt 25.12 internet przez Zerotier tylko w jednym porcie LAN
Generalnie to możesz ręcznie porobić reguły: https://eko.one.pl/?p=openwrt-routing
Nie jesteś zalogowany. Proszę się zalogować lub zarejestrować.
eko.one.pl → Oprogramowanie / Software → OpenWrt 25.12 internet przez Zerotier tylko w jednym porcie LAN
Strony Poprzednia 1 2 3 Następna
Zaloguj się lub zarejestruj by napisać odpowiedź
Generalnie to możesz ręcznie porobić reguły: https://eko.one.pl/?p=openwrt-routing
Chyba mam skopaną konfigurację Zerotier:
ip addr show ztugaydjd5
21: ztugaydjd5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 12:a9:f6:e3:70:9e brd ff:ff:ff:ff:ff:ff
inet6 fe80::10a9:f6ff:fee3:709e/64 scope link proto kernel_ll
valid_lft forever preferred_lft foreverDlaczego nie uzyskuje adresu IPv4?
Zobacz w gui (panelu zerotier) czy się musisz tego ponownie autoryzować.
Doszedłem znowu do tego samego. Bez publicznego IP nic nie zdziałam.
Zrobiłem to. Właśnie piszę z takiej konfiguracji. Po kolei:
- na obu routerach instalujesz zerotier, nazwijmy jest R1 który ma być gatewayem i R2 do którego do portu lan1 ma być dołączony host.
- aktywujesz zeroter, nadaje się im adresy albo nadaj ręcznie, wszystko jedno. Ale jakieś mają być. Załóżmy że R1 ma adres 10.1.1.100 a R2 ma 10.1.1.200
- zakładamy że R1 ma na lan adres 192.168.1.1 a R2 ma 192.168.2.1. Dodatkowa sieć na R2 będzie miała 192.168.3.1
- w ZeroTier Central (ja używam legacy bo mam stare konto) dodaje się route Destination 192.168.3.0/24 via 10.1.1.200. Zapisz i tyle
W R1.
Do network dodajesz
config interface zt
option proto none
option device ztt6jynhmagdzie to ztt6jynhma to nazwa interfejsu, zrób ifconfig to go zobaczysz.
Do firewalla:
config zone
option name zt
list network 'zt'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1
config forwarding
option src zt
option dest wanI to wszystko na R1. Restart
Na R2:
- wydzielasz sobie port lan1. Jak masz DSA to robisz coś w rodzaju
config device
option name br-lan1
option type bridge
option ports lan1
config interface lan1
option device br-lan1
option proto static
list ipaddr 192.168.3.1/24
option ip4table 100i wyjmujesz lan1 z bridge lan.
do firewalla
config zone
option name lan1
list network 'lan1'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1Robisz także
echo "100 vpn" >> /etc/iproute2/rt_tables(tylko jeden raz!)
Następnie zt:
do network
config interface zt
option proto static
option device ztt6jynhma
option ipaddr 10.1.1.200
option netmask 255.255.255.0
option ip4table 100
config route
option target '0.0.0.0/0'
option interface 'zt'
option gateway 10.1.1.100
config rule
option src '192.168.3.0/24'
option lookup '100'
option priority '10'Gdzie ztt6jynhma to znów nazwa interfejsu zt, będzie chyba taka sama jest jesteś do tego samego networku podłączony.
To ważne żeby tu był statyczny adres IP, bo ip route show table vpn nie będzie działać. W obecnym wydaniu netifd nie podniesie routing jak da się proto none, nie zczytuje tego z interfejsu, więc trzeba mu jawnie podać.
W firewallu
config zone
option name zt
list network zt
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1
config forwarding
option src zt
option dest wan
config forwarding
option src lan1
option dest zt
config forwarding
option dest lan1
option src ztw dhcp
config dhcp lan1
option interface lan1
option start 100
option limit 150
option leasetime 2hReboot i musi działać. Sprawdzałem na 25.12, zerotier wymaga kilku sekund żeby przetrawić wszystko, jeżeli bedziesz ręcznie restartował network to pamiętaj żeby później zrestartować zerotier bo może nie mieć adresu. Wspomniane
ip route show table vpnma wyświetlać coś w postaci
default via 10.1.1.100 dev ztt6jynhma proto static
192.168.3.0/24 dev br-lan4 proto static scope link
10.1.1.0/24 dev ztt6jynhma proto static scope link Do diagnostyki możesz używać traceroute i zobaczysz jak przekiety przechodzą.
PS. Mam wrażenie że ZeroTier obecnie działa tak sobie. Wymaga sporo czasu żeby sie rozpędzić i zacząć działać, tak ze jak coś robisz to nie wiesz czy coś zepsułeś czy musisz poczekać i po kilku(nastu/dziesięciu) sekundach nagle się okazuje że coś tam jednak działa.
Dzięki za konfigurację.
Postawiłem Zerotier od początku na czystych routerach zgodnie z instrukcją https://eko.one.pl/?p=openwrt-zerotier do akapitu Weryfikacja połączenia.
Gdzieś popełniam jednak jakiś błąd.
Na routerze R2 jest ok:
ip route show table vpn
default via 10.1.1.100 dev ztugaydjd5 proto static
10.1.1.0/24 dev ztugaydjd5 proto static scope link
192.168.30.0/24 dev br-lan1 proto static scope link PS. 30 to nie literówka, wszędzie .3. zamieniłem na .30.
Na komputerze po podpięciu komputera do poru lan1 mam:
traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 OpenWrt.lan (192.168.30.1) 1.075 ms 1.540 ms 1.130 ms
2 10.1.1.200 (10.1.1.200) 94.986 ms !H 95.251 ms !H 95.550 ms !H
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 10.1.1.200 icmp_seq=1 Destination Host Unreachable
From 10.1.1.200 icmp_seq=2 Destination Host Unreachable
From 10.1.1.200 icmp_seq=3 Destination Host Unreachable
From 10.1.1.200 icmp_seq=4 Destination Host Unreachable
From 10.1.1.200 icmp_seq=5 Destination Host Unreachable
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, +5 errors, 100% packet loss, time 5090ms
pipe 3R2:
network
config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'
config globals 'globals'
option dhcp_default_duid '000475415d2aa2ca41a5b07666a9de2fc00b'
option ula_prefix 'fdd3:5ddd:a9b::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
#### list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
list ipaddr '192.168.20.1/24'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config device
option name br-lan1
option type bridge
option ports lan1
config interface lan1
option device br-lan1
option proto static
list ipaddr 192.168.30.1/24
option ip4table 100
config interface zt
option proto static
option device ztugaydjd5
option ipaddr 10.1.1.200
option netmask 255.255.255.0
option ip4table 100
config route
option target '0.0.0.0/0'
option interface 'zt'
option gateway 10.1.1.100
config rule
option src '192.168.30.0/24'
option lookup '100'
option priority '10'firewall
config defaults
option syn_flood 1
option input REJECT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 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 DROP
option masq 1
option mtu_fix 1
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
# Allow IPv4 ping
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
# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
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
# Allow essential incoming IPv6 ICMP traffic
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
# Allow essential forwarded IPv6 ICMP traffic
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 zone
option name lan1
list network 'lan1'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1
config zone
option name zt
list network zt
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1
config forwarding
option src zt
option dest wan
config forwarding
option src lan1
option dest zt
config forwarding
option dest lan1
option src ztdhcp:
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
list rebind_domain 'free.aero2.net.pl'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/odhcpd.leases'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
option piodir '/tmp/odhcpd-piodir'
option hostsdir '/tmp/hosts'
config dhcp lan1
option interface lan1
option start 100
option limit 150
option leasetime 2hoption ip4table 100
w zt jest zbędne, wywal to. Upewnij się że masz option masq 1 w sekcji dotyczącej zt na R1. Zobacz czy z R1 możesz pingować 10.1.1.100 oraz czy działa ping -I ztugaydjd5 8.8.8.8
option ip4table 100 - wywaliłem, nie wiem skąd się to wzięło ![]()
option masq 1 w firewall w sekcji zt mam.
Z routera R1, który ma udostępniać internet mam
ping 10.1.1.100
PING 10.1.1.100 (10.1.1.100): 56 data bytes
--- 10.1.1.100 ping statistics ---
24 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:/etc/config# ping -I ztugaydjd5 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
--- 8.8.8.8 ping statistics ---
24 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:/etc/config# ping -I ztugaydjd5 172.25.129.2
PING 172.25.129.2 (172.25.129.2): 56 data bytes
64 bytes from 172.25.129.2: seq=0 ttl=64 time=0.561 ms
64 bytes from 172.25.129.2: seq=1 ttl=64 time=0.320 ms
64 bytes from 172.25.129.2: seq=2 ttl=64 time=0.320 ms
64 bytes from 172.25.129.2: seq=3 ttl=64 time=0.338 ms
^Z[1]+ Stopped ping -I ztugaydjd5 172.25.129.2
root@OpenWrt:/etc/config# ping -I ztugaydjd5 172.25.129.25
PING 172.25.129.25 (172.25.129.25): 56 data bytes
64 bytes from 172.25.129.25: seq=0 ttl=64 time=701.679 ms
64 bytes from 172.25.129.25: seq=1 ttl=64 time=57.873 ms
64 bytes from 172.25.129.25: seq=2 ttl=64 time=285.291 ms
64 bytes from 172.25.129.25: seq=3 ttl=64 time=56.240 ms
64 bytes from 172.25.129.25: seq=4 ttl=64 time=57.708 ms
64 bytes from 172.25.129.25: seq=5 ttl=64 time=56.957 ms
^Z[2]+ Stopped ping -I ztugaydjd5 172.25.129.25Jak widać routery się widzą w sieci Zerotier.
Na routerze R1 mam:
Zerotier:
config zerotier 'global'
option enabled '1'
option secret '7991bf8106c7e2157c30b825df48103efc503116d1262566dc5f2baaba1b77ceeb5f0233bc:f56aeb99e8db>
config network 'earth'
option id '8056c2e21c000001'
option allow_managed '1'
option allow_global '0'
option allow_default '0'
option allow_dns '0'
config network 'home'
option id 'xxxxx'Na routerze R2 mam:
config zerotier 'global'
option enabled '1'
option secret '62fded198a417d24e0b692f54ace498215021143e58314d3df46fc1e1169ece81d:be80e72fae23>
#config network 'earth'
# option id '8056c2e21c000001'
# option allow_managed '1'
# option allow_global '0'
# option allow_default '0'
# option allow_dns '0'
config network 'home'
option id 'xxxxxx'
option allow_global '1'I też pinguje router przez zerotier.
ping 10.1.1.100
PING 10.1.1.100 (10.1.1.100): 56 data bytes
^C
--- 10.1.1.100 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:/etc/config# ping -I ztugaydjd5 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:/etc/config# ping -I ztugaydjd5 172.25.129.2
PING 172.25.129.2 (172.25.129.2): 56 data bytes
64 bytes from 172.25.129.2: seq=0 ttl=64 time=494.536 ms
64 bytes from 172.25.129.2: seq=1 ttl=64 time=55.976 ms
64 bytes from 172.25.129.2: seq=2 ttl=64 time=53.304 ms
64 bytes from 172.25.129.2: seq=3 ttl=64 time=57.022 ms
^C
--- 172.25.129.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 53.304/165.209/494.536 ms
Czy na stronie Zerotier powinno być tylko to
Managed Routes 2/128
0.0.0.0/0
via 172.25.129.2
172.25.0.0/16
(LAN) Czy trzeba dodać jeszcze routingi?
Czemu w konfigach dałeś 10.1.1.100 jak masz adresy 172.25.129.2 ?
Na stronie zerotietr NIE POWINNO być 0.0.0.0/0 via 172.25.129.2, nic takiego nie napisałem.
Jak już wszytko poprawiłem to wywalił się zerotier na R2 i nie ma dostępu do internetu na żadnym z portów.
etc/init.d/zerotier reload
root@OpenWrt:/etc/config# zerotier-cli info
200 info 227f25d414 1.16.0 OFFLINE
root@OpenWrt:/etc/config# ip route show table vpn
Dump terminatedZerotier
config zerotier 'global'
option enabled '1'
option secret '2xxx3>
config network 'earth'
option id 'xxxxxx'
option allow_managed '1'
option allow_global '0'
option allow_default '0'
option allow_dns '0'
config network 'home'
option id 'xxxxx'
option allow_global '1'achine: Netgear R6220 |
| Uptime: 0d, 00:01:03 |
| Load: 2.73 0.74 0.25 |
| Flash: total: 12.0MB, free: 9.8MB, used: 14% |
| Memory: total: 116.1MB, free: 64.4MB, used: 44% |
| Leases: 1 |
| lan: static, 192.168.20.1 |
| wan: dhcp, 10.10.5.114 |
| wan6: dhcpv6, ? |
| lan1: static, 192.168.30.1 |
| zt: static, 172.25.129.25 network
config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'
config globals 'globals'
option dhcp_default_duid '000475415d2aa2ca41a5b07666a9de2fc00b'
option ula_prefix 'fdd3:5ddd:a9b::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
#### list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
list ipaddr '192.168.20.1/24'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config device
option name br-lan1
option type bridge
option ports lan1
config interface lan1
option device br-lan1
option proto static
list ipaddr 192.168.30.1/24
option ip4table 100
config interface zt
option proto static
option device ztugaydjd5
option ipaddr 172.25.129.25 ##### Ip routera R2 - taki sam ma na stronie zerotier
option netmask 255.255.255.0
config route
option target '0.0.0.0/0'
option interface 'zt'
option gateway 172.25.129.2 ##### Ip routera R1 - taki sam ma na stronie zerotier - udostępnia internet
config rule
option src '192.168.30.0/24'
option lookup '100'
option priority '10'firewall - tylko to co dopisałem na końcu
config zone
option name lan1
list network 'lan1'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1
config zone
option name zt
list network zt
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option masq 1
config forwarding
option src zt
option dest wan
config forwarding
option src lan1
option dest zt
config forwarding
option dest lan1
option src zt dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
list rebind_domain 'free.aero2.net.pl'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/odhcpd.leases'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
option piodir '/tmp/odhcpd-piodir'
option hostsdir '/tmp/hosts'
config dhcp lan1
option interface lan1
option start 100
option limit 150
option leasetime 2h Na stronie zerotier mam:
anaged Routes 2/128
172.25.0.0/16
(LAN)
192.168.30.0/24
via 172.25.129.2 Zerotier routera R2 nie widzi.
PS.
Na stronie zerotietr NIE POWINNO być 0.0.0.0/0 via 172.25.129.2, nic takiego nie napisałem.
To akturat wziąłem z tego poradnika - https://eko.one.pl/?p=openwrt-zerotier
PS2.
Nie mieszaj tamtego poradnika z tym, bo to dotyczy innego przypadku.
Już nie mieszam, tylko nie wiem dlaczego zerotier nie chce wstać.
Zaorać R2 i postawić wszystko od początku?
ma nadal wyjście w świat?
Adres do wan przypisany jest prawidłowy. Pinguje router z internetem, ale sam internetu nie widzi.
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 46 byte packets
1 172.25.129.25 (172.25.129.25) 2207.323 ms !H 3114.519 ms !H 3118.695 ms !H
root@OpenWrt:~# Czemu masz trasę domyślną przez zerotier? Miałeś tego nie robić przecież...
Tak zinterpretowałem Twój zapis:
config route
option target '0.0.0.0/0'
option interface 'zt'
option gateway 10.1.1.100gdzie: R1 ma adres 10.1.1.100 - rozumiem, że to adres w zerotier.
To adres zerotier dla R1, tak. Ale to ma być trasa dla zerotier, a nie domyślna dla routera. Upewnij się że nie ma masz tego 0.0.0.0/0 w panelu zerotier oraz wywaliłeś te option allow_global '1' z konfiga zerotier
Przywróciłem internet na portach.
p route show table vpn
192.168.30.0/24 dev br-lan1 proto static scope link linkdown
root@OpenWrt:/etc/config# ip route show
default via 10.10.5.1 dev wan proto static src 10.10.5.114
10.10.5.0/24 dev wan proto kernel scope link src 10.10.5.114
172.25.129.0/24 dev ztugaydjd5 proto kernel scope link src 172.25.129.25
192.168.20.0/24 dev br-lan proto kernel scope link src 192.168.20.1
192.168.30.0/24 via 172.25.129.2 dev ztugaydjd5 proto static metric 5000 config zerotier 'global'
option enabled '1'
option secret '2xxxe>
config network 'earth'
option id '8xxxx'
option allow_managed '1'
option allow_global '0'
option allow_default '0'
option allow_dns '0'
config network 'home'
option id 'dxxxx'
### option allow_global '1'Jak podłącze do lan1, nie ma itenetu ale w komputer widzi router 1
ping 172.25.129.2
PING 172.25.129.2 (172.25.129.2) 56(84) bytes of data.
64 bytes from 172.25.129.2: icmp_seq=1 ttl=63 time=501 ms
64 bytes from 172.25.129.2: icmp_seq=2 ttl=63 time=56.7 ms
64 bytes from 172.25.129.2: icmp_seq=3 ttl=63 time=51.9 ms
64 bytes from 172.25.129.2: icmp_seq=4 ttl=63 time=52.0 ms
64 bytes from 172.25.129.2: icmp_seq=5 ttl=63 time=56.2 ms
^C
--- 172.25.129.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005mstraceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * OpenWrt.lan (192.168.30.1) 0.513 msNa stronie zerorier mam:
Managed Routes 2/128
172.25.0.0/16
(LAN)
192.168.30.0/24
via 172.25.129.2 z R2:
ifstatus zt
ip route show table 100
uci show network
uci show firewall
ifstatus zt
ifstatus zt
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 37627,
"l3_device": "ztugaydjd5",
"proto": "static",
"device": "ztugaydjd5",
"updated": [
"addresses",
"routes"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "172.25.129.25",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "0.0.0.0",
"mask": 0,
"nexthop": "172.25.129.2",
"source": "0.0.0.0/0"
}
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
}
ip route show table 100
ip route show table 100
192.168.30.0/24 dev br-lan1 proto static scope link uci show network
uci show network
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1/8'
network.globals=globals
network.globals.dhcp_default_duid='000475415d2aa2ca41a5b07666a9de2fc00b'
network.globals.ula_prefix='fdd3:5ddd:a9b::/48'
network.globals.packet_steering='1'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='lan2' 'lan3' 'lan4'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ipaddr='192.168.20.1/24'
network.lan.ip6assign='60'
network.wan=interface
network.wan.device='wan'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.device='wan'
network.wan6.proto='dhcpv6'
network.@device[1]=device
network.@device[1].name='br-lan1'
network.@device[1].type='bridge'
network.@device[1].ports='lan1'
network.lan1=interface
network.lan1.device='br-lan1'
network.lan1.proto='static'
network.lan1.ipaddr='192.168.30.1/24'
network.lan1.ip4table='100'
network.zt=interface
network.zt.proto='static'
network.zt.device='ztugaydjd5'
network.zt.ipaddr='172.25.129.25'
network.zt.netmask='255.255.255.0'
network.@route[0]=route
network.@route[0].target='0.0.0.0/0'
network.@route[0].interface='zt'
network.@route[0].gateway='172.25.129.2'
network.@rule[0]=rule
network.@rule[0].src='192.168.30.0/24'
network.@rule[0].lookup='100'
network.@rule[0].priority='10'uci show firewall
uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].input='REJECT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@defaults[0].synflood_protect='1'
firewall.@defaults[0].flow_offloading='1'
firewall.@defaults[0].flow_offloading_hw='1'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].network='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].network='wan' 'wan6'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].forward='DROP'
firewall.@zone[1].masq='1'
firewall.@zone[1].mtu_fix='1'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@zone[2]=zone
firewall.@zone[2].name='lan1'
firewall.@zone[2].network='lan1'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].forward='ACCEPT'
firewall.@zone[2].masq='1'
firewall.@zone[3]=zone
firewall.@zone[3].name='zt'
firewall.@zone[3].network='zt'
firewall.@zone[3].input='ACCEPT'
firewall.@zone[3].output='ACCEPT'
firewall.@zone[3].forward='ACCEPT'
firewall.@zone[3].masq='1'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='zt'
firewall.@forwarding[1].dest='wan'
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].src='lan1'
firewall.@forwarding[2].dest='zt'
firewall.@forwarding[3]=forwarding
firewall.@forwarding[3].dest='lan1'
firewall.@forwarding[3].src='zt'krok bliżej. Na R2:
ping -I ztugaydjd5 8.8.8.8
ping -I ztugaydjd5 172.25.129.2Czyżbym coś na R1 skopał?
ping -I ztugaydjd5 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
8 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~# ping -I ztugaydjd5 172.25.129.2
PING 172.25.129.2 (172.25.129.2): 56 data bytes
64 bytes from 172.25.129.2: seq=0 ttl=64 time=535.134 ms
64 bytes from 172.25.129.2: seq=1 ttl=64 time=58.598 ms
64 bytes from 172.25.129.2: seq=2 ttl=64 time=58.420 ms
64 bytes from 172.25.129.2: seq=3 ttl=64 time=57.853 ms
64 bytes from 172.25.129.2: seq=4 ttl=64 time=57.487 ms
^C
--- 172.25.129.2 ping statistics ---
6 packets transmitted, 5 packets received, 16% packet loss
round-trip min/avg/max = 57.487/153.498/535.134 ms traceroute 172.25.129.2
traceroute to 172.25.129.2 (172.25.129.2), 30 hops max, 46 byte packets
1 172.25.129.2 (172.25.129.2) 490.479 ms 55.717 ms 55.566 msSprawdź czy masz option masq 1 w strefie zt na R1
Jest:
uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood='1'
firewall.@defaults[0].input='REJECT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].network='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].network='wan' 'wan6'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].forward='DROP'
firewall.@zone[1].masq='1'
firewall.@zone[1].mtu_fix='1'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@zone[2]=zone
firewall.@zone[2].name='zt'
firewall.@zone[2].network='zt'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].forward='ACCEPT'
firewall.@zone[2].masq='1'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='zt'
firewall.@forwarding[1].dest='wan'network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1/8'
network.globals=globals
network.globals.dhcp_default_duid='0004ba04f685086a485bb2471ef87ac1595c'
network.globals.ula_prefix='fdeb:998a:a360::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='eth0.1'
network.@device[1]=device
network.@device[1].name='eth0.1'
network.@device[1].macaddr='00:90:a9:0b:95:66'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ipaddr='192.168.10.1/24'
network.lan.ip6assign='60'
network.@device[2]=device
network.@device[2].name='eth0.2'
network.@device[2].macaddr='00:90:a9:0b:95:65'
network.wan=interface
network.wan.device='eth0.2'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.device='eth0.2'
network.wan6.proto='dhcpv6'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='1 2 3 4 0t'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='5 0t'
network.zt=interface
network.zt.proto='none'
network.zt.device='ztugaydjd5'I oczywiście pinguje drugi router
ping 172.25.129.25
PING 172.25.129.25 (172.25.129.25): 56 data bytes
64 bytes from 172.25.129.25: seq=0 ttl=64 time=522.183 ms
64 bytes from 172.25.129.25: seq=1 ttl=64 time=58.054 ms
64 bytes from 172.25.129.25: seq=2 ttl=64 time=57.375 ms
64 bytes from 172.25.129.25: seq=3 ttl=64 time=57.250 ms
64 bytes from 172.25.129.25: seq=4 ttl=64 time=56.767 ms
64 bytes from 172.25.129.25: seq=5 ttl=64 time=53.562 ms
64 bytes from 172.25.129.25: seq=6 ttl=64 time=57.541 ms
64 bytes from 172.25.129.25: seq=7 ttl=64 time=57.301 ms
^C
--- 172.25.129.25 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 53.562/115.004/522.183 msCzy w Zerotier jest coś skopane?
Managed Routes 2/128
172.25.0.0/16 (LAN)
192.168.30.0/24 via 172.25.129.25 Czy ta pierwsza linia powinna być?
Czy nie powinno być via 172.25.129.2, czyli router R1? Choć tak też już testowałem.
Czy w sekcji DNS na stronie Zerotier trzeba coś ustawiać?
DNS
Requires ZeroTier version 1.6. See Settings Help below.
Search Domain
Server AddressPoczekaj. Muszę ponownie złożyć sobie taką konfigurację bo na razie nie widzę gdzie jest problem.
Nie, w gui nic nie ruszasz. Żadnych dnsów, nie zmieniasz tras, ma być tak jak teraz.
Strony Poprzednia 1 2 3 Następna
Zaloguj się lub zarejestruj by napisać odpowiedź
eko.one.pl → Oprogramowanie / Software → OpenWrt 25.12 internet przez Zerotier tylko w jednym porcie LAN
Forum oparte o PunBB, wspierane przez Informer Technologies, Inc