Add block trap to dpi

parent 0e3077c8
...@@ -25,6 +25,8 @@ online_streamer = NFStreamer(source="eth1", promiscuous_mode=False, splt_analysi ...@@ -25,6 +25,8 @@ online_streamer = NFStreamer(source="eth1", promiscuous_mode=False, splt_analysi
templconf = """ templconf = """
{ {
"Log": "ERROR",
"Cats":{ "Cats":{
"Network":{ "Network":{
......
...@@ -134,5 +134,14 @@ ipset create block_ip hash:ip family inet ...@@ -134,5 +134,14 @@ ipset create block_ip hash:ip family inet
iptables -I FORWARD -i $LLAN -m set --match-set block_ip src -j DROP iptables -I FORWARD -i $LLAN -m set --match-set block_ip src -j DROP
iptables -I FORWARD -i $LLAN -p udp --dport 53 -m set --match-set block_ip src -j ACCEPT iptables -I FORWARD -i $LLAN -p udp --dport 53 -m set --match-set block_ip src -j ACCEPT
# BLOCK TRAP FOR DPI
iptables -I FORWARD -i $LLAN -m set --match-set dpiblock_ip src -j DROP
iptables -I FORWARD -i $LLAN -m set --match-set dpiblock_extip dst -j DROP
iptables -I FORWARD -i $LLAN -m set --match-set dpiblock_ip src -j DROP
ip6tables -I FORWARD -i $LLAN -m set --match-set dpiblock_ip6 src -j DROP
ip6tables -I FORWARD -i $LLAN -m set --match-set dpiblock_extip6 dst -j DROP
ip6tables -I FORWARD -i $LLAN -m set --match-set dpiblock_triplet6 dst,dst,src -j DROP
exit 0 exit 0
...@@ -19,7 +19,7 @@ DEFBAND="1024" ...@@ -19,7 +19,7 @@ DEFBAND="1024"
DOUPLOAD=true DOUPLOAD=true
DODOWNLOAD=true DODOWNLOAD=true
IPSET_DURATION=3600 # Seconds IPSET_DURATION=3600 # Seconds
IPSETS_NAMES="social kids system full streaming" IPSETS_NAMES="social kids system full streaming dpiblock"
NAT=true NAT=true
MARKSTART=5 MARKSTART=5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment