Hi, I'm beginner in the world of Openwrt. Since few day, I trying configure, firewall for 2 WAN.
My planned scheme.
1.wanb -> Firewall(allow all network without youtube, facebook, twitter, and more social) -> lan
2.wan -> Firewall(reject all network with excluding youtube, facebook, twitter, and more social) -> lan
I installed mwan3, and configured like (point 1.) this working ok.
My configuration:
=================WAN B==================
in /etc/config/dhcp
dnsmasq
list ipset '/youtube.com/social'
list ipset '/facebook.com/social'
...
/etc/config/firewall:
config ipset
option name 'social'
option match 'src_ip'
option storage 'hash'
option enabled 1
config rule
option name ''wanb denny social'
option src 'lan'
option dest 'wanb'
option proto 'all'
option ipset 'social'
option target 'REJECT'
I have problem with configuration (point 2)
=================WAN==================
in /etc/config/dhcp
dnsmasq
list ipset '/youtube.com/social2'
list ipset '/facebook.com/social2'
...
/etc/config/firewall:
config ipset
option name 'social2'
option match 'dest_ip'
option storage 'hash'
option enabled 1
config rule
option name ''accept DNS'
option src 'lan'
option dest 'wan'
option proto 'tcp udp'
option dest_port '53-67'
option target 'ACCEPT'
config rule
option name ''wan allow social2'
option src 'lan'
option dest 'wan'
option proto 'all'
option ipset 'social2'
option target 'ACCEPT'
config rule
option name ''reject rest'
option src 'lan'
option dest 'wan'
option proto 'all'
option target 'REJECT'
This configuration blocking all network, but if configuration look like below, all working correctly.
/etc/config/firewall:
config rule
option name ''accept DNS'
option src 'lan'
option dest 'wan'
option proto 'tcp udp'
option dest_port '53-67'
option target 'ACCEPT'
config rule
option name ''wan allow youtube'
option src 'lan'
option dest 'wan'
option proto 'all'
option dest_ip '216.58.207.46'
option target 'ACCEPT'
config rule
option name ''reject rest'
option src 'lan'
option dest 'wan'
option proto 'all'
option target 'REJECT'
I am asking for help, I am struggling with this for a week