Hello,
I am trying to block outbound connects to know bad host from my LAN/ Wireless. I am running the script located below and have the below firewall rules so it looks to be working. Any know what else to check?
Running this script under the heading "Malware Filter"
https://github.com/RMerl/asuswrt-merlin/wiki/Using-ipset
Firewall Rule
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 set malware-filter dst
256K 21M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT all -- tun21 * 0.0.0.0/0 0.0.0.0/0
33 3014 DROP all -- !br0 eth0 0.0.0.0/0 0.0.0.0/0
0 0 DROP all -- eth0 * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 ACCEPT all -- br0 br0 0.0.0.0/0 0.0.0.0/0
433 22328 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate DNAT
92238 7445K ACCEPT all -- br0 * 0.0.0.0/0 0.0.0.0/0
Install script seems to work
admin@rt-:/jffs/scripts# sh -x firewall-start
+ path=/jffs/filters
+ echo \b([0-9]{1,3}\.){3}[0-9]{1,3}\b
+ regexp=\b([0-9]{1,3}\.){3}[0-9]{1,3}\b
+ lsmod
+ grep ipt_set
+ uname -m
+ MATCH_SET=--set
+ ipset --swap malware-filter malware-filter
+ grep Unknown set
+ [ != ]
+ ipset --destroy malware-update
+ echo -e -N malware-update iphash\n
+ get_update
+ mkdir -p /jffs/filters
+ wget -q --show-progress -i /jffs/filters/malware-filter.list -O /jffs/filters/malware-list.pre
+ nice ipset --restore
+ nice sed s/^/-A malware-update /
/jffs/filters/malware-list.pre 100%[====================================================================>] 158.12K 753KB/s in 0.2s
/jffs/filters/malware-list.pre [ <=> ] 2.28K --.-KB/s in 0.002s
/jffs/filters/malware-list.pre [ <=> ] 10.21K --.-KB/s in 0.1s
/jffs/filters/malware-list.pre 100%[====================================================================>] 17.06K --.-KB/s in 0.02s
/jffs/filters/malware-list.pre 100%[====================================================================>] 92.21K --.-KB/s in 0.1s
+ cat /jffs/filters/malware-list.pre
+ grep -oE \b([0-9]{1,3}\.){3}[0-9]{1,3}\b
+ sort -u
+ echo -e \nCOMMIT\n
+ nice ipset --swap malware-update malware-filter
+ nice ipset --destroy malware-update
+ exit 0
I am trying to block outbound connects to know bad host from my LAN/ Wireless. I am running the script located below and have the below firewall rules so it looks to be working. Any know what else to check?
Running this script under the heading "Malware Filter"
https://github.com/RMerl/asuswrt-merlin/wiki/Using-ipset
Firewall Rule
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 set malware-filter dst
256K 21M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT all -- tun21 * 0.0.0.0/0 0.0.0.0/0
33 3014 DROP all -- !br0 eth0 0.0.0.0/0 0.0.0.0/0
0 0 DROP all -- eth0 * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 ACCEPT all -- br0 br0 0.0.0.0/0 0.0.0.0/0
433 22328 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate DNAT
92238 7445K ACCEPT all -- br0 * 0.0.0.0/0 0.0.0.0/0
Install script seems to work
admin@rt-:/jffs/scripts# sh -x firewall-start
+ path=/jffs/filters
+ echo \b([0-9]{1,3}\.){3}[0-9]{1,3}\b
+ regexp=\b([0-9]{1,3}\.){3}[0-9]{1,3}\b
+ lsmod
+ grep ipt_set
+ uname -m
+ MATCH_SET=--set
+ ipset --swap malware-filter malware-filter
+ grep Unknown set
+ [ != ]
+ ipset --destroy malware-update
+ echo -e -N malware-update iphash\n
+ get_update
+ mkdir -p /jffs/filters
+ wget -q --show-progress -i /jffs/filters/malware-filter.list -O /jffs/filters/malware-list.pre
+ nice ipset --restore
+ nice sed s/^/-A malware-update /
/jffs/filters/malware-list.pre 100%[====================================================================>] 158.12K 753KB/s in 0.2s
/jffs/filters/malware-list.pre [ <=> ] 2.28K --.-KB/s in 0.002s
/jffs/filters/malware-list.pre [ <=> ] 10.21K --.-KB/s in 0.1s
/jffs/filters/malware-list.pre 100%[====================================================================>] 17.06K --.-KB/s in 0.02s
/jffs/filters/malware-list.pre 100%[====================================================================>] 92.21K --.-KB/s in 0.1s
+ cat /jffs/filters/malware-list.pre
+ grep -oE \b([0-9]{1,3}\.){3}[0-9]{1,3}\b
+ sort -u
+ echo -e \nCOMMIT\n
+ nice ipset --swap malware-update malware-filter
+ nice ipset --destroy malware-update
+ exit 0