1

Temat: Wi-Fi Extender + Wireguard

Cześć,

mam obecnie skonfigurowany Wi-Fi Extender/Repeater with relayd - działa.

Do tego chciałem skonfigurować Wireguard wg. instrukcji: https://mullvad.net/en/help/running-wireguard-router, połączenie zostaje nawiązane (menu /status/wireguard) "Latest Handshake" Sun, 10 Nov 2024 21:43:33 GMT (1m ago), lecz ruch nie idzie przez VPN (wifi/lan).

Zależy mi właśnie na tym, aby każde podłączone urządzenie szło przez tego VPNa, nie jestem w tym biegły, już kilka godzin przy tym siedziałem i brak oczekiwanego rezultatu sad Proszę o pomoc

Sprzęt Cudy TR3000, OpenWrt 23.05.5 r24106-10cc5fcd00 / LuCI openwrt-23.05

/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 'fd5c:da04:d9b1::/48'  

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

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

config interface 'wwan'
        option proto 'static'
        option ipaddr '192.168.1.222'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        list dns '192.168.1.1'

config interface 'Bridge'
        option proto 'relay'
        option ipaddr '192.168.1.222'
        list network 'lan'
        list network 'wwan'

config interface 'WGINTERFACE'
        option proto 'wireguard'
        option force_link '1'
        option private_key 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
        list addresses '10.70.238.196/32'

config wireguard_WGINTERFACE
        option description 'Peer'
        option public_key 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
        list allowed_ips '0.0.0.0/0'
        option route_allowed_ips '1'
        option endpoint_host 'xxx.xx.144.34'
        option endpoint_port '51820'

config route
        option interface 'WGINTERFACE'
        option target '100.64.0.7/32'

/etc/config/firewall

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

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

config zone
        option name 'WGZONE'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'WGINTERFACE'

config forwarding
        option src 'lan'
        option dest 'WGZONE'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/18000000.wifi'
        option channel '1'
        option band '2g'
        option htmode 'HE20'
        option disabled '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/18000000.wifi+1'
        option channel '100'
        option band '5g'
        option htmode 'HE160'
        option country 'PL'
        option cell_density '0'

config wifi-iface 'wifinet2'
        option device 'radio1'
        option mode 'sta'
        option network 'wwan'
        option ssid 'xxxxxx_5GHz'
        option encryption 'sae'
        option key 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

2

Odp: Wi-Fi Extender + Wireguard

skoro Cudy TR3000 jest Repeater-em w sieci tzn że  jest zwykłym hostem bez WAN-u, nie rozdaje adresów po DHCP i nie wskazuje na siebie jako na bramę.
Aby wszystkie hosty w sieci mogły wychodzić przez Wireguard  z tego hosta to spróbuj np.

1. Na głównym routerze (którego nie znamy) tak ustawić serwer DHCP, żeby wysyłał do hostów trasę domyślną przez tego klienta-Repeatera (192.168.1.222) a nie przez siebie (1.1). Tam gdzie hosty mają statyczny IP to należy ustawić na każdym hoście bramę domyślną przez (1.222)

PS. pod Openwrt robi się to w pliku /etc/config/dhcp stosując "czary" opisane tutaj https://openwrt.org/docs/guide-user/bas … dhcp_pools :

....
list dhcp_option '3,192.168.1.222'
list dhcp_option '6,192.168.1.222'
....

Wtedy pozostałe hosty powinny atakować 1.222 gdy będą chciały wyjść na świat.

Xiaomi AX3000T @ Netgear R6220
* DVBT2 - T230C *