Hello!
I want to setup bridged OpenVPN on OpenWRT router (TP-Link Archer C7 v5) client to be able to access devices connected to this router from another OpenVPN client, as on this schema:
For now, OpenVPN server is working well, my PC client and router client can see each other, but I am having trouble configuring router so that I will be able to access devices connected to it from my PC client. Now I am testing with another PC, but in perspective I want to access Siemens PLC connected to that router.
I tried creating bridges from tap interface to LAN on my router but it didn’t help unfortunately, maybe I was setting them up wrong as well... I also tried to assign separate LAN ports to the tap bridge as in this one tutorial https://coderazzi.net/howto/openwrt/tl841n/openvpn-bridge.htm but it didn’t work.
I am new to OpenWRT/VPN/networking stuff, so it is kind of hard for me to understand what steps I should do as there are not so many tutorials on this one case. Even tried to assign OpenWRT router LAN IP to the same subnet 192.168.8.X as OpenVPN server, didn’t help as well (got more problems with that one). Tried to play with firewall settings as well. Please don’t be angry at me if I say something stupid because I am still a noob trying to get it.
My configurations: (PS I set up routed OpenVPN previously on this OpenWRT router so it may have leftover configurations for tun interface as well)
Server config
port 1194
proto udp
dev tap0
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
server-bridge 192.168.8.4 255.255.255.0 192.168.8.50 192.168.8.100
client-to-client
keepalive 10 120
tls-auth ta.key 0 # This file is secret
key-direction 0
cipher AES-256-CBC # AES
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
OpenWRT router client config
client
dev tap0
proto udp
remote (server ip) 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
dhcp-option DNS (server ip)
comp-lzo
verb 3
cipher AES-256-CBC
auth SHA256
key-direction 1
(keys here)
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 'fdd2:90c8:5cc7::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option device 'br-lan'
option ipaddr '192.168.1.1'
config device
option name 'eth0.2'
option macaddr 'e8:48:b8:7f:6f:61'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '2 3 4 5 0t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 0t'
config interface 'OVPN'
option proto 'none'
option device 'tap0'
config device
option name 'br0'
option type 'bridge'
list ports 'eth0.1'
list ports 'tap0'
Router: ip address show; ip route show table all
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether e8:48:b8:7f:6f:60 brd ff:ff:ff:ff:ff:ff
inet6 fe80::ea48:b8ff:fe7f:6f60/64 scope link
valid_lft forever preferred_lft forever
6: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:48:b8:7f:6f:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fdd2:90c8:5cc7::1/60 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::ea48:b8ff:fe7f:6f60/64 scope link
valid_lft forever preferred_lft forever
7: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e8:48:b8:7f:6f:60 brd ff:ff:ff:ff:ff:ff
8: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:48:b8:7f:6f:61 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.131/24 brd 192.168.0.255 scope global eth0.2
valid_lft forever preferred_lft forever
inet6 fe80::ea48:b8ff:fe7f:6f61/64 scope link
valid_lft forever preferred_lft forever
9: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:48:b8:7f:6f:60 brd ff:ff:ff:ff:ff:ff
inet6 fe80::ea48:b8ff:fe7f:6f60/64 scope link
valid_lft forever preferred_lft forever
10: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:48:b8:7f:6f:5f brd ff:ff:ff:ff:ff:ff
inet6 fe80::ea48:b8ff:fe7f:6f5f/64 scope link
valid_lft forever preferred_lft forever
11: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 26:91:6f:08:93:df brd ff:ff:ff:ff:ff:ff
inet6 fe80::2491:6fff:fe08:93df/64 scope link
valid_lft forever preferred_lft forever
12: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 76:0b:17:3a:58:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.8.52/24 scope global tap0
valid_lft forever preferred_lft forever
inet6 fe80::740b:17ff:fe3a:589d/64 scope link
valid_lft forever preferred_lft forever
default via 192.168.0.1 dev eth0.2 proto static src 192.168.0.131
192.168.0.0/24 dev eth0.2 proto kernel scope link src 192.168.0.131
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.8.0/24 dev tap0 proto kernel scope link src 192.168.8.52
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
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
broadcast 192.168.0.0 dev eth0.2 table local proto kernel scope link src 192.168.0.131
local 192.168.0.131 dev eth0.2 table local proto kernel scope host src 192.168.0.131
broadcast 192.168.0.255 dev eth0.2 table local proto kernel scope link src 192.168.0.131
broadcast 192.168.1.0 dev br-lan table local proto kernel scope link src 192.168.1.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
broadcast 192.168.8.0 dev tap0 table local proto kernel scope link src 192.168.8.52
local 192.168.8.52 dev tap0 table local proto kernel scope host src 192.168.8.52
broadcast 192.168.8.255 dev tap0 table local proto kernel scope link src 192.168.8.52
fdd2:90c8:5cc7::/64 dev br-lan proto static metric 1024 pref medium
unreachable fdd2:90c8:5cc7::/48 dev lo proto static metric 2147483647 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0.2 proto kernel metric 256 pref medium
fe80::/64 dev br-lan proto kernel metric 256 pref medium
fe80::/64 dev wlan1 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
fe80::/64 dev br0 proto kernel metric 256 pref medium
fe80::/64 dev tap0 proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
anycast fdd2:90c8:5cc7:: dev br-lan table local proto kernel metric 0 pref medium
local fdd2:90c8:5cc7::1 dev br-lan table local proto kernel metric 0 pref medium
anycast fe80:: dev eth0.2 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 wlan1 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan0 table local proto kernel metric 0 pref medium
anycast fe80:: dev br0 table local proto kernel metric 0 pref medium
anycast fe80:: dev tap0 table local proto kernel metric 0 pref medium
local fe80::2491:6fff:fe08:93df dev br0 table local proto kernel metric 0 pref medium
local fe80::740b:17ff:fe3a:589d dev tap0 table local proto kernel metric 0 pref medium
local fe80::ea48:b8ff:fe7f:6f5f dev wlan0 table local proto kernel metric 0 pref medium
local fe80::ea48:b8ff:fe7f:6f60 dev eth0 table local proto kernel metric 0 pref medium
local fe80::ea48:b8ff:fe7f:6f60 dev br-lan table local proto kernel metric 0 pref medium
local fe80::ea48:b8ff:fe7f:6f60 dev wlan1 table local proto kernel metric 0 pref medium
local fe80::ea48:b8ff:fe7f:6f61 dev eth0.2 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 eth0.2 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev br0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev tap0 table local proto kernel metric 256 pref medium
Router: ip rule show; iptables-save -c
*nat
:PREROUTING ACCEPT [249:62028]
:INPUT ACCEPT [3:328]
:OUTPUT ACCEPT [36:2736]
:POSTROUTING ACCEPT [0:0]
:postrouting_VPN_FW_rule - [0:0]
:postrouting_lan_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_VPN_FW_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_VPN_FW_postrouting - [0:0]
:zone_VPN_FW_prerouting - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
:zone_wan_postrouting - [0:0]
:zone_wan_prerouting - [0:0]
[249:62028] -A PREROUTING -m comment --comment "!fw3: Custom prerouting rule chain" -j prerouting_rule
[0:0] -A PREROUTING -i br-lan -m comment --comment "!fw3" -j zone_lan_prerouting
[235:59296] -A PREROUTING -i eth0.2 -m comment --comment "!fw3" -j zone_wan_prerouting
[14:2732] -A PREROUTING -i tap0 -m comment --comment "!fw3" -j zone_VPN_FW_prerouting
[36:2736] -A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule chain" -j postrouting_rule
[0:0] -A POSTROUTING -o br-lan -m comment --comment "!fw3" -j zone_lan_postrouting
[36:2736] -A POSTROUTING -o eth0.2 -m comment --comment "!fw3" -j zone_wan_postrouting
[0:0] -A POSTROUTING -o tap0 -m comment --comment "!fw3" -j zone_VPN_FW_postrouting
[0:0] -A zone_VPN_FW_postrouting -m comment --comment "!fw3: Custom VPN_FW postrouting rule chain" -j postrouting_VPN_FW_rule
[0:0] -A zone_VPN_FW_postrouting -m comment --comment "!fw3" -j MASQUERADE
[14:2732] -A zone_VPN_FW_prerouting -m comment --comment "!fw3: Custom VPN_FW prerouting rule chain" -j prerouting_VPN_FW_rule
[0:0] -A zone_lan_postrouting -m comment --comment "!fw3: Custom lan postrouting rule chain" -j postrouting_lan_rule
[0:0] -A zone_lan_prerouting -m comment --comment "!fw3: Custom lan prerouting rule chain" -j prerouting_lan_rule
[36:2736] -A zone_wan_postrouting -m comment --comment "!fw3: Custom wan postrouting rule chain" -j postrouting_wan_rule
[36:2736] -A zone_wan_postrouting -m comment --comment "!fw3" -j MASQUERADE
[235:59296] -A zone_wan_prerouting -m comment --comment "!fw3: Custom wan prerouting rule chain" -j prerouting_wan_rule
COMMIT
*mangle
:PREROUTING ACCEPT [624:110712]
:INPUT ACCEPT [412:54694]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [516:97404]
:POSTROUTING ACCEPT [516:97404]
[0:0] -A FORWARD -o eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[0:0] -A FORWARD -i eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[0:0] -A FORWARD -o tap0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone VPN_FW MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[0:0] -A FORWARD -i tap0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone VPN_FW MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:forwarding_VPN_FW_rule - [0:0]
:forwarding_lan_rule - [0:0]
:forwarding_rule - [0:0]
:forwarding_wan_rule - [0:0]
:input_VPN_FW_rule - [0:0]
:input_lan_rule - [0:0]
:input_rule - [0:0]
:input_wan_rule - [0:0]
:output_VPN_FW_rule - [0:0]
:output_lan_rule - [0:0]
:output_rule - [0:0]
:output_wan_rule - [0:0]
:reject - [0:0]
:syn_flood - [0:0]
:zone_VPN_FW_dest_ACCEPT - [0:0]
:zone_VPN_FW_forward - [0:0]
:zone_VPN_FW_input - [0:0]
:zone_VPN_FW_output - [0:0]
:zone_VPN_FW_src_ACCEPT - [0:0]
:zone_lan_dest_ACCEPT - [0:0]
:zone_lan_forward - [0:0]
:zone_lan_input - [0:0]
:zone_lan_output - [0:0]
:zone_lan_src_ACCEPT - [0:0]
:zone_wan_dest_ACCEPT - [0:0]
:zone_wan_dest_REJECT - [0:0]
:zone_wan_forward - [0:0]
:zone_wan_input - [0:0]
:zone_wan_output - [0:0]
:zone_wan_src_REJECT - [0:0]
[0:0] -A INPUT -i lo -m comment --comment "!fw3" -j ACCEPT
[418:55237] -A INPUT -m comment --comment "!fw3: Custom input rule chain" -j input_rule
[380:49195] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[1:52] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m comment --comment "!fw3" -j syn_flood
[0:0] -A INPUT -i br-lan -m comment --comment "!fw3" -j zone_lan_input
[36:5746] -A INPUT -i eth0.2 -m comment --comment "!fw3" -j zone_wan_input
[2:296] -A INPUT -i tap0 -m comment --comment "!fw3" -j zone_VPN_FW_input
[0:0] -A FORWARD -m comment --comment "!fw3: Custom forwarding rule chain" -j forwarding_rule
[0:0] -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[0:0] -A FORWARD -i br-lan -m comment --comment "!fw3" -j zone_lan_forward
[0:0] -A FORWARD -i eth0.2 -m comment --comment "!fw3" -j zone_wan_forward
[0:0] -A FORWARD -i tap0 -m comment --comment "!fw3" -j zone_VPN_FW_forward
[0:0] -A FORWARD -m comment --comment "!fw3" -j reject
[0:0] -A OUTPUT -o lo -m comment --comment "!fw3" -j ACCEPT
[533:102354] -A OUTPUT -m comment --comment "!fw3: Custom output rule chain" -j output_rule
[497:99618] -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[0:0] -A OUTPUT -o br-lan -m comment --comment "!fw3" -j zone_lan_output
[36:2736] -A OUTPUT -o eth0.2 -m comment --comment "!fw3" -j zone_wan_output
[0:0] -A OUTPUT -o tap0 -m comment --comment "!fw3" -j zone_VPN_FW_output
[0:0] -A reject -p tcp -m comment --comment "!fw3" -j REJECT --reject-with tcp-reset
[34:5682] -A reject -m comment --comment "!fw3" -j REJECT --reject-with icmp-port-unreachable
[1:52] -A syn_flood -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 25/sec --limit-burst 50 -m comment --comment "!fw3" -j RETURN
[0:0] -A syn_flood -m comment --comment "!fw3" -j DROP
[0:0] -A zone_VPN_FW_dest_ACCEPT -o tap0 -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
[0:0] -A zone_VPN_FW_dest_ACCEPT -o tap0 -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_VPN_FW_forward -m comment --comment "!fw3: Custom VPN_FW forwarding rule chain" -j forwarding_VPN_FW_rule
[0:0] -A zone_VPN_FW_forward -p udp -m comment --comment "!fw3: Test" -j zone_lan_dest_ACCEPT
[0:0] -A zone_VPN_FW_forward -m comment --comment "!fw3: Zone VPN_FW to lan forwarding policy" -j zone_lan_dest_ACCEPT
[0:0] -A zone_VPN_FW_forward -m comment --comment "!fw3: Zone VPN_FW to wan forwarding policy" -j zone_wan_dest_ACCEPT
[0:0] -A zone_VPN_FW_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_VPN_FW_forward -m comment --comment "!fw3" -j zone_VPN_FW_dest_ACCEPT
[2:296] -A zone_VPN_FW_input -m comment --comment "!fw3: Custom VPN_FW input rule chain" -j input_VPN_FW_rule
[1:244] -A zone_VPN_FW_input -p udp -m comment --comment "!fw3: Allow-Luci-from-VPN" -j ACCEPT
[0:0] -A zone_VPN_FW_input -p udp -m udp --dport 22 -m comment --comment "!fw3: Allow-SSH-from-VPN" -j ACCEPT
[0:0] -A zone_VPN_FW_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[1:52] -A zone_VPN_FW_input -m comment --comment "!fw3" -j zone_VPN_FW_src_ACCEPT
[0:0] -A zone_VPN_FW_output -m comment --comment "!fw3: Custom VPN_FW output rule chain" -j output_VPN_FW_rule
[0:0] -A zone_VPN_FW_output -m comment --comment "!fw3" -j zone_VPN_FW_dest_ACCEPT
[1:52] -A zone_VPN_FW_src_ACCEPT -i tap0 -m conntrack --ctstate NEW,UNTRACKED -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_lan_dest_ACCEPT -o br-lan -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Custom lan forwarding rule chain" -j forwarding_lan_rule
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to wan forwarding policy" -j zone_wan_dest_ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to VPN_FW forwarding policy" -j zone_VPN_FW_dest_ACCEPT
[0:0] -A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
[0:0] -A zone_lan_input -m comment --comment "!fw3: Custom lan input rule chain" -j input_lan_rule
[0:0] -A zone_lan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_lan_input -m comment --comment "!fw3" -j zone_lan_src_ACCEPT
[0:0] -A zone_lan_output -m comment --comment "!fw3: Custom lan output rule chain" -j output_lan_rule
[0:0] -A zone_lan_output -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
[0:0] -A zone_lan_src_ACCEPT -i br-lan -m conntrack --ctstate NEW,UNTRACKED -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_ACCEPT -o eth0.2 -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
[36:2736] -A zone_wan_dest_ACCEPT -o eth0.2 -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_REJECT -o eth0.2 -m comment --comment "!fw3" -j reject
[0:0] -A zone_wan_forward -m comment --comment "!fw3: Custom wan forwarding rule chain" -j forwarding_wan_rule
[0:0] -A zone_wan_forward -p esp -m comment --comment "!fw3: Allow-IPSec-ESP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -p udp -m udp --dport 500 -m comment --comment "!fw3: Allow-ISAKMP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_wan_forward -m comment --comment "!fw3" -j zone_wan_dest_REJECT
[36:5746] -A zone_wan_input -m comment --comment "!fw3: Custom wan input rule chain" -j input_wan_rule
[0:0] -A zone_wan_input -p udp -m udp --dport 68 -m comment --comment "!fw3: Allow-DHCP-Renew" -j ACCEPT
[0:0] -A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment "!fw3: Allow-Ping" -j ACCEPT
[2:64] -A zone_wan_input -p igmp -m comment --comment "!fw3: Allow-IGMP" -j ACCEPT
[0:0] -A zone_wan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[34:5682] -A zone_wan_input -m comment --comment "!fw3" -j zone_wan_src_REJECT
[36:2736] -A zone_wan_output -m comment --comment "!fw3: Custom wan output rule chain" -j output_wan_rule
[36:2736] -A zone_wan_output -m comment --comment "!fw3" -j zone_wan_dest_ACCEPT
[34:5682] -A zone_wan_src_REJECT -i eth0.2 -m comment --comment "!fw3" -j reject
You mean that I cannot bridge networks with IP 192.168.8.52 and 192.168.1.1 right? Does it mean that if I change my router LAN IP to 192.168.8.X it may work apparently?
I changed my router LAN IP to 192.168.8.101, but I cant access it from openvpn now before that I could see all my devices that are connected to openvpn in the routes arp table of the router, now it has only tap ip and ip of connected to it pc (which is 192.168.8.150 now).
OpenWrt already has an IP in 192.168.8.X subnet in tap interface. OpenVPN server doesn't know about the .101 which you assigned to the lan interface. So, you'll have to use that IP on the bridge interface. Also you'll need to fix the DHCP server to allocate addresses which are not offered by OpenVPN server. Maybe the OpenVPN server will need to be configured about the existence of the lan hosts in case they are not reachable.
OpenWrt already has an IP in 192.168.8.X subnet in tap interface. OpenVPN server doesn't know about the .101 which you assigned to the lan interface. So, you'll have to use that IP on the bridge interface.
Sorry I dont really get this one. Let me double check please
My OpenWrt router LAN has to be 192.168.8.X right? So I assigned it to 192.168.8.101
It also has tap interface at 192.168.8.52 - I can acces my router from another OpenVPN client by this address.
And I need a bridge between LAN 192.168.8.101 and tap 192.168.8.52, am I right? And after that I need to configure my server and let him know about LAN hosts of this router, like 192.168.8.150, right?
But after I changed my LAN to 192.168.8.101, my other vpn client cannot get access to router by 192.168.8.52, and I dont understand the reason why.. and what should I do about it. Is there possibly some conflict between lan and tap being in the same subnet..?
Also you'll need to fix the DHCP server to allocate addresses which are not offered by OpenVPN server.
I didnt understand this one You mean allocate addresses of my router hosts or my new router LAN? Sorry if my questions are stupid... I am very new to networking...
You cannot have 2 interfaces having IP addresses in the same network. What you can do is to bridge them (you have already done that from what I see in br0) and then use a single IP from 192.168.8.X on the br0 interface.
Although it would be easier if you omitted the br0 configuration part and added the tap0 here:
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
list ports 'tap0'
after all this is what you want to achieve. This way you can configure the IP on the br-lan directly as you did.
Both the router and the OpenVPN server are allocating IPs to the clients. Just make sure that they don't overlap. By default the dhcp pool of lan interface is from .100-249 . If OpenVPN server doesn't allocate in there you're good.