1 (edytowany przez hiuman 2024-11-21 19:22:45)

Temat: OpenVPN+pbr

Witam. Wszystko działa dobrze prócz jednego urządzenia które działa w tunelu a nie chce działać po za nim. Połączenie jest na kablu. Obraz 24.02

Firewall:

config defaults
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option synflood_protect '1'
    option flow_offloading '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'
    list network 'wan6'

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 'Support-UDP-Traceroute'
    option src 'wan'
    option dest_port '33434:33689'
    option proto 'udp'
    option family 'ipv4'
    option target 'REJECT'
    option enabled '0'

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

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

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

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

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 'fddf:1124:4997::/48'

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'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config device
    option name 'wan'
    option macaddr 'ea:7ef:80:2c:f5:f2'

config interface 'wan'
    option device 'wan'
    option proto 'dhcp'
    option dns '8.8.8.8 8.8.4.4'
    option peerdns '0'


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

config interface 'vpn'
    option proto 'none'
    option device 'tun0'

OpenVpn:

config openvpn 'custom_config'
    option config '/etc/openvpn/client.udp.ovpn'

config openvpn 'sample_server'
    option port '1194'
    option proto 'udp'
    option dev 'tun'
    option ca '/etc/openvpn/ca.crt'
    option cert '/etc/openvpn/server.crt'
    option key '/etc/openvpn/server.key'
    option dh '/etc/openvpn/dh2048.pem'
    option server '10.8.0.0 255.255.255.0'
    option ifconfig_pool_persist '/tmp/ipp.txt'
    option keepalive '10 120'
    option persist_key '1'
    option persist_tun '1'
    option user 'nobody'
    option status '/tmp/openvpn-status.log'
    option verb '3'

config openvpn 'sample_client'
    option client '1'
    option dev 'tun'
    option proto 'udp'
    list remote 'my_server_1 1194'
    option resolv_retry 'infinite'
    option nobind '1'
    option persist_key '1'
    option persist_tun '1'
    option user 'nobody'
    option ca '/etc/openvpn/ca.crt'
    option cert '/etc/openvpn/client.crt'
    option key '/etc/openvpn/client.key'
    option verb '3'

config openvpn 'ProtonVPN'
    option config '/etc/openvpn/ProtonVPN.ovpn'
    option enabled '1'

pbr:

config pbr 'config'
    option enabled '1'
    option verbosity '2'
    option strict_enforcement '1'
    option resolver_set 'none'
    list resolver_instance '*'
    option ipv6_enabled '0'
    list ignored_interface 'vpnserver'
    option boot_timeout '30'
    option rule_create_option 'add'
    option procd_boot_delay '0'
    option procd_reload_delay '1'
    option webui_show_ignore_target '0'
    option nft_rule_counter '0'
    option nft_set_auto_merge '1'
    option nft_set_counter '0'
    option nft_set_flags_interval '1'
    option nft_set_flags_timeout '0'
    option nft_set_policy 'performance'
    list webui_supported_protocol 'all'
    list webui_supported_protocol 'tcp'
    list webui_supported_protocol 'udp'
    list webui_supported_protocol 'tcp udp'
    list webui_supported_protocol 'icmp'

config include
    option path '/usr/share/pbr/pbr.user.aws'
    option enabled '0'

config include
    option path '/usr/share/pbr/pbr.user.netflix'
    option enabled '0'

config dns_policy
    option name 'Redirect Local IP DNS'
    option src_addr '192.168.1.5'
    option dest_dns '1.1.1.1'
    option enabled '0'

config policy
    option name 'Ignore Local Requests'
    option interface 'ignore'
    option dest_addr '10.0.0.0/24 10.0.1.0/24 192.168.100.0/24 192.168.1.0/24'
    option enabled '0'

config policy
    option name 'Plex/Emby Local Server'
    option interface 'wan'
    option src_port '8096 8920 32400'
    option enabled '0'

config policy
    option name 'Plex/Emby Remote Servers'
    option interface 'wan'
    option dest_addr 'plex.tv my.plexapp.com emby.media app.emby.media tv.emby.media'
    option enabled '0'

config policy
    option name 'MojLaptop'
    option src_addr '192.168.1.103'
    option interface 'wan'

config policy
    option name 'WDMyCloud'
    option src_addr '192.168.1.227'
    option interface 'wan'

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'
    option confdir '/tmp/dnsmasq.d'

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/hosts/odhcpd'
    option leasetrigger '/usr/sbin/odhcpd-update'
    option loglevel '4'

config host
    option mac '10:90:A9:E8:2C:AB'
    option name 'WDMyCloud'
    option dns '1'
    option ip '192.168.1.247'

config host
    option mac 'A4:65:19:1C:2F:1C'
    option ip '192.168.1.208'
    option dns '1'
    option name Tv-bravia'

2

Odp: OpenVPN+pbr

Które konkretnie nie chce działać?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: OpenVPN+pbr

config host
    option mac '00:1E:EC:17:56:E6'
    option name 'Vuuno4kse'
    option dns '1'
    option ip '192.168.1.101'

4

Odp: OpenVPN+pbr

Nie masz go w konfigu pbr'a, wiec leci trasą domyślą. Chcesz go przez wan to go dodaj w pbr.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5 (edytowany przez hiuman 2024-11-21 15:21:18)

Odp: OpenVPN+pbr

Dodawałem go już do pbr i dalej nie działało. To są tylko wycinki configów bez wszystkich urządzeń.

6

Odp: OpenVPN+pbr

Ale jak go nie masz to tym bardziej nie będzie działało. Dodaj, zrestartuj, nie działa to sprawdzaj reguły gdzie i co przechodzi.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7 (edytowany przez hiuman 2024-11-21 19:23:01)

Odp: OpenVPN+pbr

Dodałem tak i brak neta
pbr:

config policy
    option name 'vu+'
    option src_addr '192.168.1.101'
    option interface 'vpn'

Zmieniłem teraz tak i brak neta
pbr

config policy
    option name 'vu+'
    option src_addr '192.168.1.101'
    option interface 'wan'

Te urządzenie ma iść w tunelu ale po braku vpn musi dalej działać urządzenie w necie. Tak miałem na obrazie 21.02 i było super

8

Odp: OpenVPN+pbr

Zostaw tą drugą, zrób

uci set pbr.config.verbosity='2'
uci commit pbr
/etc/init.d/pbr reload
/etc/init.d/pbr status


I pokaż co z tego wyszło.

Czy ten host, .101 ma ustawionego gatewaya?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

9

Odp: OpenVPN+pbr

root@OpenWrt:~# uci set pbr.config.verbosity='2'
root@OpenWrt:~# uci commit pbr
root@OpenWrt:~# /etc/init.d/pbr reload
Loading environment (on_start) Using wan interface (on_start): wan
Found wan gateway (on_start): 10.9.147.254
Setting up routing for 'wan/10.9.147.254' [✓]
Setting up routing for 'vpn/tun0/10.96.0.28' [✓]
Routing 'MojLaptop' via wan [✓]
Routing 'WDMyCloud' via wan [✓]
Routing 'ElizyTelefon' via wan [✓]
Routing 'POCOM3' via wan [✓]
Routing 'PS4' via wan [✓]
Routing 'ElizaTablet' via wan [✓]
Routing 'Drukarka' via wan [✓]
Routing 'iRobot-2FDF77BAABCB4BC5BE245CE3D9508648' via wan [✓]
Routing 'TvBRAVIA' via wan [✓]
Routing 'rapb' via wan [✓]
Routing 'raspberrypi' via wan [✓]
Routing 'ElizaIphon' via wan [✓]
Routing 'MotoTomek' via wan [✓]
Routing 'Laptop-tomek' via wan [✓]
Routing 'KasiaMoto' via wan [✓]
Routing 'ElizyLaptop' via wan [✓]
Routing 'OPPO-Reno5-Lite' via wan [✓]
Routing 'adam-Maly-Komputer' via wan [✓]
Routing 'vu+' via wan [✓]
Installing fw4 nft file [✓]
pbr 1.1.7-47 monitoring interfaces: wan vpn
pbr 1.1.7-47 (fw4 nft file mode) started with gateways:
wan/10.9.147.254
vpn/tun0/10.96.0.28 [✓]
WARNING: Please set 'dhcp.lan.force=1' to speed up service start-up.
root@OpenWrt:~# /etc/init.d/pbr status

pbr - environment
pbr 1.1.7-47 running on OpenWrt 24.10-SNAPSHOT.

Dnsmasq version 2.90  Copyright (c) 2000-2024 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile

pbr fw4 nft file: /usr/share/nftables.d/ruleset-post/30-pbr.nft
add chain inet fw4 pbr_mark_0x010000
add rule inet fw4 pbr_mark_0x010000  mark set mark and 0xff00ffff xor 0x010000
add rule inet fw4 pbr_mark_0x010000 return
add chain inet fw4 pbr_mark_0x020000
add rule inet fw4 pbr_mark_0x020000  mark set mark and 0xff00ffff xor 0x020000
add rule inet fw4 pbr_mark_0x020000 return
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.103 }  goto pbr_mark_0x010000 comment "MojLaptop"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.247 }  goto pbr_mark_0x010000 comment "WDMyCloud"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.208 }  goto pbr_mark_0x010000 comment "ElizyTelefon"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.179 }  goto pbr_mark_0x010000 comment "POCOM3"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.115 }  goto pbr_mark_0x010000 comment "PS4"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.105 }  goto pbr_mark_0x010000 comment "ElizaTablet"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.203 }  goto pbr_mark_0x010000 comment "Drukarka"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.209 }  goto pbr_mark_0x010000 comment "iRobot-2FDF77BAABCB4BC5BE245CE3D9508648"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.188 }  goto pbr_mark_0x010000 comment "TvBRAVIA"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.176 }  goto pbr_mark_0x010000 comment "rapb"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.211 }  goto pbr_mark_0x010000 comment "raspberrypi"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.157 }  goto pbr_mark_0x010000 comment "ElizaIphon"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.114 }  goto pbr_mark_0x010000 comment "MotoTomek"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.182 }  goto pbr_mark_0x010000 comment "Laptop-tomek"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.173 }  goto pbr_mark_0x010000 comment "KasiaMoto"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.164 }  goto pbr_mark_0x010000 comment "ElizyLaptop"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.122 }  goto pbr_mark_0x010000 comment "OPPO-Reno5-Lite"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.110 }  goto pbr_mark_0x010000 comment "adam-Maly-Komputer"
add rule inet fw4 pbr_prerouting ip saddr { 192.168.1.101 }  goto pbr_mark_0x010000 comment "vu+"

pbr chains - policies
        chain pbr_forward { # handle 36
        }
        chain pbr_input { # handle 37
        }
        chain pbr_output { # handle 38
        }
        chain pbr_postrouting { # handle 40
        }
        chain pbr_prerouting { # handle 39
                ip saddr 192.168.1.103 goto pbr_mark_0x010000 comment "MojLaptop" # handle 2480
                ip saddr 192.168.1.247 goto pbr_mark_0x010000 comment "WDMyCloud" # handle 2481
                ip saddr 192.168.1.208 goto pbr_mark_0x010000 comment "ElizyTelefon" # handle 2482
                ip saddr 192.168.1.179 goto pbr_mark_0x010000 comment "POCOM3" # handle 2483
                ip saddr 192.168.1.115 goto pbr_mark_0x010000 comment "PS4" # handle 2484
                ip saddr 192.168.1.105 goto pbr_mark_0x010000 comment "ElizaTablet" # handle 2485
                ip saddr 192.168.1.203 goto pbr_mark_0x010000 comment "Drukarka" # handle 2486
                ip saddr 192.168.1.209 goto pbr_mark_0x010000 comment "iRobot-2FDF77BAABCB4BC5BE245CE3D9508648" # handle 2487
                ip saddr 192.168.1.188 goto pbr_mark_0x010000 comment "TvBRAVIA" # handle 2488
                ip saddr 192.168.1.176 goto pbr_mark_0x010000 comment "rapb" # handle 2489
                ip saddr 192.168.1.211 goto pbr_mark_0x010000 comment "raspberrypi" # handle 2490
                ip saddr 192.168.1.157 goto pbr_mark_0x010000 comment "ElizaIphon" # handle 2491
                ip saddr 192.168.1.114 goto pbr_mark_0x010000 comment "MotoTomek" # handle 2492
                ip saddr 192.168.1.182 goto pbr_mark_0x010000 comment "Laptop-tomek" # handle 2493
                ip saddr 192.168.1.173 goto pbr_mark_0x010000 comment "KasiaMoto" # handle 2494
                ip saddr 192.168.1.164 goto pbr_mark_0x010000 comment "ElizyLaptop" # handle 2495
                ip saddr 192.168.1.122 goto pbr_mark_0x010000 comment "OPPO-Reno5-Lite" # handle 2496
                ip saddr 192.168.1.110 goto pbr_mark_0x010000 comment "adam-Maly-Komputer" # handle 2497
                ip saddr 192.168.1.101 goto pbr_mark_0x010000 comment "vu+" # handle 2498
        }
        chain pbr_dstnat { # handle 35
        }

pbr chains - marking
        chain pbr_mark_0x010000 { # handle 2474
                meta mark set meta mark & 0xff01ffff | 0x00010000 # handle 2475
                return # handle 2476
        }
        chain pbr_mark_0x020000 { # handle 2477
                meta mark set meta mark & 0xff02ffff | 0x00020000 # handle 2478
                return # handle 2479
        }

pbr nft sets

IPv4 table 256 route: default via 10.9.147.254 dev wan
IPv4 table 256 rule(s):
30000:  from all fwmark 0x10000/0xff0000 lookup pbr_wan
IPv4 table 257 route: default via 10.96.0.28 dev tun0
IPv4 table 257 rule(s):
29998:  from all fwmark 0x20000/0xff0000 lookup pbr_vpn
root@OpenWrt:~#

Jest dodane do dhcp

10

Odp: OpenVPN+pbr

Jeżeli ci pozostałe działają a ten nie to w nim szukaj problemu. Konfigi wyglądają normalnie tu raczej nie ma do czego się przyczepić.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

11 (edytowany przez hiuman 2024-11-21 15:45:45)

Odp: OpenVPN+pbr

No właśnie nie wiem czemu nie chce działać po za vpn. Ja nie jestem lotny w tej dziedzinie. Sam już nie mam pomysłów. Dlatego siedziałem na starej wersji openwrt bo tam było git.

12

Odp: OpenVPN+pbr

On ma adres ip 192.168.1.101. Co to kokretnie jest? Możesz zobaczyć jaki ma gaetway, dns, tablice routingu?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

13

Odp: OpenVPN+pbr

Dekoder. A podpowiesz jak to sprawdzić?

14

Odp: OpenVPN+pbr

W nim nie wiem. Masz tam jakieś menu żeby sprawdzić parametry sieci?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

15

Odp: OpenVPN+pbr

Można sprawdzić.
Adres IP: 192.168.1.101
Subnet: 255.255.255.0
Brama: 192.168.1.1
Pierwszy DNS: 192.168.1.1
Drugi DNS: 0.0.0.0

16

Odp: OpenVPN+pbr

On jest na linuxie, to można sprawdzić komendami. Jak podpowiesz jakie użyć komendy.

17

Odp: OpenVPN+pbr

Zapewne

route -n

lub

ip r

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

18 (edytowany przez hiuman 2024-11-21 16:09:45)

Odp: OpenVPN+pbr

root@vuuno4kse:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
root@vuuno4kse:~#

Teraz działa w vpn. Po wyłączeniu Vpn są takie same dane.

19

Odp: OpenVPN+pbr

Zwykłe dane, nie ma powodu dla którego nie miał by działać w wanie.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

20

Odp: OpenVPN+pbr

root@vuuno4kse:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1D:EC:17:75:F6
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fddf:1124:4997:0:21d:ecff:fe17:75e6/64 Scope:Global
          inet6 addr: fe80::21d:ecff:fe17:75e6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:272440 errors:0 dropped:3 overruns:0 frame:0
          TX packets:289739 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:194838242 (185.8 MiB)  TX bytes:89314847 (85.1 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8121 (7.9 KiB)  TX bytes:8121 (7.9 KiB)

21 (edytowany przez PiotrekK 2024-11-21 16:18:52)

Odp: OpenVPN+pbr

Sprawdzaliście już?

ip rule show
ip route show table all
Korzystam z: MF286D; r32225 Kernel 6.12.60 i AW1000; r34139 Kernel 6.12.80
Wypełnij ankietę. Poprawiamy tłumaczenie LuCI. Szczegóły w tym poście

22

Odp: OpenVPN+pbr

Przez vpn:

PING google.com (142.250.203.206): 56 data bytes
64 bytes from 142.250.203.206: seq=0 ttl=113 time=52.784 ms
64 bytes from 142.250.203.206: seq=1 ttl=113 time=52.402 ms
64 bytes from 142.250.203.206: seq=2 ttl=113 time=52.115 ms
64 bytes from 142.250.203.206: seq=3 ttl=113 time=52.194 ms
64 bytes from 142.250.203.206: seq=4 ttl=113 time=52.580 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 52.115/52.415/52.784 ms
root@vuuno4kse:~#

Bez VPN:

root@vuuno4kse:~# ping google.com
PING google.com (142.250.203.206): 56 data bytes
64 bytes from 142.250.203.206: seq=0 ttl=118 time=2.980 ms
64 bytes from 142.250.203.206: seq=1 ttl=118 time=2.869 ms
64 bytes from 142.250.203.206: seq=2 ttl=118 time=2.821 ms
64 bytes from 142.250.203.206: seq=3 ttl=118 time=2.897 ms
64 bytes from 142.250.203.206: seq=4 ttl=118 time=2.881 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 2.821/2.889/2.980 ms
root@vuuno4kse:~#

I ciągle brak neta.

23

Odp: OpenVPN+pbr

Ale czekaj. Ty nie masz internetu tak czy problem jest to że idzie przez vpn?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

24

Odp: OpenVPN+pbr

root@OpenWrt:~# ip rule show
0:      from all lookup local
29998:  from all fwmark 0x20000/0xff0000 lookup pbr_vpn
30000:  from all fwmark 0x10000/0xff0000 lookup pbr_wan
32766:  from all lookup main
32767:  from all lookup default
root@OpenWrt:~# ip route show table all
default via 10.9.147.254 dev wan table pbr_wan
192.168.1.0/24 dev br-lan table pbr_wan proto kernel scope link src 192.168.1.1
default via 10.96.0.32 dev tun0 table pbr_vpn
0.0.0.0/1 via 10.96.0.1 dev tun0
default via 10.9.147.254 dev wan proto static src 10.9.146.169
10.9.144.0/22 dev wan proto kernel scope link src 10.9.146.169
10.96.0.0/16 dev tun0 proto kernel scope link src 10.96.0.32
89.39.107.188 via 10.9.147.254 dev wan
128.0.0.0/1 via 10.96.0.1 dev tun0
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
local 10.9.146.169 dev wan table local proto kernel scope host src 10.9.146.169
broadcast 10.9.147.255 dev wan table local proto kernel scope link src 10.9.146.169
local 10.96.0.32 dev tun0 table local proto kernel scope host src 10.96.0.32
broadcast 10.96.255.255 dev tun0 table local proto kernel scope link src 10.96.0.32
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
local 192.168.1.1 dev br-lan table local proto kernel scope host src 192.168.1.1
broadcast 192.168.1.255 dev br-lan table local proto kernel scope link src 192.168.1.1
fddf:1124:4997::/64 dev br-lan proto static metric 1024 pref medium
unreachable fddf:1124:4997::/48 dev lo proto static metric 2147483647 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev br-lan proto kernel metric 256 pref medium
fe80::/64 dev wan proto kernel metric 256 pref medium
fe80::/64 dev tun0 proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
anycast fddf:1124:4997:: dev br-lan table local proto kernel metric 0 pref medium
local fddf:1124:4997::1 dev br-lan table local proto kernel metric 0 pref medium
anycast fe80:: dev eth0 table local proto kernel metric 0 pref medium
anycast fe80:: dev br-lan table local proto kernel metric 0 pref medium
anycast fe80:: dev wan table local proto kernel metric 0 pref medium
anycast fe80:: dev tun0 table local proto kernel metric 0 pref medium
local fe80::65af:ad30:b915:23f1 dev tun0 table local proto kernel metric 0 pref medium
local fe80::e89f:80ff:fe1b:5ff8 dev wan table local proto kernel metric 0 pref medium
local fe80::ea9f:80ff:fe1b:5ff8 dev eth0 table local proto kernel metric 0 pref medium
local fe80::ea9f:80ff:fe1b:5ff8 dev br-lan table local proto kernel metric 0 pref medium
multicast ff00::/8 dev eth0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev br-lan table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wan table local proto kernel metric 256 pref medium
multicast ff00::/8 dev tun0 table local proto kernel metric 256 pref medium

25 (edytowany przez hiuman 2024-11-21 16:28:01)

Odp: OpenVPN+pbr

Cezary napisał/a:

Ale czekaj. Ty nie masz internetu tak czy problem jest to że idzie przez vpn?

Chcę żeby urządzenie szło przez vpn, ale w razie utraty vpn żeby nadal działało w sieci.
W tej chwili działa w vpn, a jak wyłącze vpn to już nie działa w necie.