I need help to block specific blacklist from accessing my set-top-box which is behind NAT.
I have port forwarding rule that points to my STB in my private home network. I use this port forwarding for watching TV from my STB when I am not at home, but I want to block specific IP addresses from accessing it.
I see the following in my logs. Looks firewall is blocking it, BUT I see the intruder connected to my Set-Top-Box!
When I connect to my STB (which is Linux) and type netstat I see the intruder connected to port 8001(streaming port).
I guess some other rule is overwriting blocking rule and/or order of rules is incorrect.
Please help. I am attaching my config below.
Code: Select all
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
11:43:31 firewall,info blacklist input: in:ether1 out:(none), src-mac cc:e1:7f:fb:2a:00, proto TCP (RST), 111.222.111.222:40362->MY_REAL_IP:8001, len 40
Code: Select all
/ip firewall address-list
add address=111.222.111.222 list=blacklist
add address=111.222.111.223 list=blacklist
/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input connection-state=established
add action=accept chain=input connection-state=related
add action=accept chain=input in-interface=ether1 ipsec-policy=in,ipsec
add action=accept chain=input dst-port=500,4500 in-interface=ether1 protocol=udp
add action=accept chain=input in-interface=ether1 protocol=ipsec-esp
add action=drop chain=input in-interface=ether1 log=yes log-prefix=blacklist src-address-list=blacklist
add action=drop chain=input in-interface=ether1
/ip firewall nat
add action=accept chain=srcnat comment="IPSEC" dst-address=192.168.0.0/24 src-address=192.168.1.0/24
add action=masquerade chain=srcnat out-interface=ether1
add action=dst-nat chain=dstnat comment="Enigma Stream" dst-address=MY_REAL_IP dst-port=8001 in-interface=ether1 port="" protocol=tcp to-addresses=192.168.0.30 to-ports=8001