Buongiorno a tutti, riprendo la discussione perchè mi ritrovo in una situazione simile ma non riesco a completare con successo la configurazione.
Tempo fa ho installato OperWrt su un TP-Link RE 450 (IP statico 192.168.0.3); questo è collegato tramite cavo ethernet al modem/router TIM Hub (192.168.0.1) e attualmente fa da access point wireless per coprire una parte di casa che è raggiunta a fatica dal wifi del Tim Hub.
Ho seguito passo passo il tutorial su https://openwrt.org/docs/guide-user/services/vpn/wireguard/server per Wireguard, configurato il forward della porta 22 dal router verso la porta 51820 del TP-Link e dopo smanettamenti vari la VPN sembra funzionare ma riesco a raggiungere solamente l'IP del TP-Link (192.168.0.3 oppure quello in VPN 192.168.9.1), nessun IP locale della 192.168.0.x e non riesco a navigare su internet. Credo che il problema sia la configurazione del firewall lato OpenWrt sul Tp-Link ma non ho idea di cosa andare a modificare. Purtroppo non ho la possibilità di impostare una rotta statica sul Tim Hub. Avete qualche suggerimento?
Di seguito vi riporto l'output dei comandi
cat /etc/config/network
cat /etc/config/firewall
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option device 'lo'
config globals 'globals'
option ula_prefix 'fde0:8fac:e820::/48'
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.0.3'
option gateway '192.168.0.1'
list dns '192.168.0.1'
option device 'br-lan'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config interface 'vpn'
option proto 'wireguard'
option private_key '<private-key>'
option listen_port '51820'
list addresses '192.168.9.1/24'
list addresses 'fdf1:e8a1:8d3f:9::1/64'
config wireguard_vpn
option description 'OP5'
list allowed_ips '192.168.9.2/32'
option route_allowed_ips '1'
option persistent_keepalive '25'
option public_key '<public-key>'
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone 'lan'
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'vpn'
config zone 'wan'
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 src_ip 'fc00::/6'
option dest_ip 'fc00::/6'
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 include
option path '/etc/firewall.user'
config rule 'wg'
option name 'Allow-WireGuard'
option src 'wan'
option dest_port '51820'
option proto 'udp'
option target 'ACCEPT'
