Возникла проблема, у меня есть роутер (OpenWrt, урезанная версия, работать можно только через терминал и scp) ip адрес 192.168.1.1(главная сеть), к нему подключен второй роутер через wan по адресу 192.168.2.1(подсеть). На 1.1 я пробросил маршрут к 2.1 (то есть, я могу управлять роутером 2.1 в главной сети). Но, у меня не получилось пробросить порты. Задача подключится к камере с 192.168.2.214:6638 через главную сеть. Если я выключу firewall на роутере 1.1, доступ к камере появляется. Вот настройки firewall, в конце я пытался пробросить порт(в идеале, чтобы они все прокидывались, как с подсетью)
config defaults
#temp disable syn_flood proctect.
option syn_flood 0
option input ACCEPT
option output ACCEPT
option forward ACCEPT
option drop_invalid 1
# Uncomment this line to disable ipv6 rules
option disable_ipv6 1
config zone
option name 'lan'
list network 'lan'
option 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 REJECT
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
# Allow DHCPv6 replies
# see
https://dev.openwrt.org/ticket/10381
config rule
option name Allow-DHCPv6
option src wan
option proto udp
option src_ip fe80::/10
option src_port 547
option dest_ip fe80::/10
option dest_port 546
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 lan
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 'Forbidden_Wan_RA'
option name 'Forbidden_Wan_RA'
option dest 'wan'
option proto 'icmp'
list icmp_type 'router-advertisement'
option family ipv6
option target 'REJECT'
# include a file with users custom iptables rules
#
#nat
config include 'webinitrdr'
option path '/lib/firewall.sysapi.loader webinitrdr'
option reload '1'
option enabled '1'
#nat
config include 'dnsmiwifi'
option path '/lib/firewall.sysapi.loader dnsmiwifi'
option reload '1'
option enabled '1'
config include 'macfilter'
option path '/lib/firewall.sysapi.loader macfilter'
option reload '1'
option enabled '1'
config include 'ipv6_masq'
option path '/lib/firewall.sysapi.loader ipv6_masq'
option reload '1'
config rule 'guest_8999'
option name 'Hello wifi 8999'
option src 'guest'
option proto 'tcp'
option dest_port '8999'
option target 'ACCEPT'
config rule 'guest_8300'
option name 'Hello wifi 8300'
option src 'guest'
option proto 'tcp'
option dest_port '8300'
option target 'ACCEPT'
config rule 'guest_7080'
option name 'Hello wifi 7080'
option src 'guest'
option proto 'tcp'
option dest_port '7080'
option target 'ACCEPT'
config zone 'ready_zone'
option name 'ready'
list network 'ready'
option input 'DROP'
option forward 'DROP'
option output 'DROP'
config rule 'ready_dhcp'
option name 'DHCP for ready'
option src 'ready'
option src_port '67-68'
option dest_port '67-68'
option proto 'udp'
option family ipv4
option target 'ACCEPT'
config rule 'ready_dhcp_out'
option name 'DHCP for ready'
option dest 'ready'
option src_port '67-68'
option dest_port '67-68'
option proto 'udp'
option family ipv4
option target 'ACCEPT'
config include 'miot'
option type 'script'
option path '/lib/firewall.sysapi.loader miot'
option enabled '1'
option reload '1'
config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'IPv4'
option reload '1'
config include 'qcanssecm'
option type 'script'
option path '/etc/firewall.d/qca-nss-ecm'
option family 'any'
option reload '1'
config rule
option src lan
option src_ip 192.168.2.214
option dest_port 6638
option target ACCEPT
option proto 'tcp udp'